Bug 147385

Summary: Compiler error in gcc 3.4
Product: [Fedora] Fedora Reporter: Christian Lessig <christian.lessig>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED UPSTREAM QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 3   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-02-07 21:58:40 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Preprocessed source
none
Preprocessed source
none
Source code none

Description Christian Lessig 2005-02-07 20:22:02 UTC
Description of problem:

Compiler error in gcc

Version-Release number of selected component (if applicable):

gcc 3.4

How reproducible:

Attached a source code fragment (otherwise OpenSG required). Full
example available upon request.

Steps to Reproduce:
1.
2.
3.
  
Actual results: Compiling fails.

Expected results: Compiling succeeds.

Additional info:

Comment 1 Christian Lessig 2005-02-07 20:24:59 UTC
Created attachment 110747 [details]
Preprocessed source

Comment 2 Christian Lessig 2005-02-07 20:25:06 UTC
Created attachment 110748 [details]
Preprocessed source

Comment 3 Christian Lessig 2005-02-07 20:26:04 UTC
Created attachment 110749 [details]
Source code

Attached the source file. The lines above the error causing code (ln. 66 and
ln. 72) are accepted by the compiler.

Regards,

Christian Lessig
Fraunhofer IGD / Bauhaus-Universität Weimar

Comment 4 Jakub Jelinek 2005-02-07 21:45:20 UTC
Simplified testcase:

extern double foo (double);

template <class T>
struct A
{
  T y () const;
};

typedef A <float> B;

template <unsigned int T>
struct C
{
  C ();
  B c;
  float r;
};

template <unsigned int T>
C<T>::C ()
{
  r = foo (c.y);
}

G++ 3.4 ICEs on this, G++ 3.2 accepts it, G++ CVS HEAD rejects it with:
147385.ii: In constructor <T>::C()':
147385.ii:22: error: not enough type information


Comment 5 Jakub Jelinek 2005-02-07 21:58:40 UTC
Given that this is ICE on invalid as far as I can judge (you want
cartesian.y () instead of cartesian.y and similarly for x and z), I'm moving this
upstream.