Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 21843

Summary: GCC Internal Compiler Error in grokdeclarator at cp/decl.c
Product: Gentoo Linux Reporter: Peter Gavin <pbg1854>
Component: [OLD] GCC PortingAssignee: Please assign to toolchain <gcc-porting>
Status: RESOLVED FIXED    
Severity: major CC: mholzer
Priority: High    
Version: unspecified   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Peter Gavin 2003-05-28 14:13:56 UTC
I'm using sys-devel/gcc-3.2.3-r1, and I get an ICE when compiling the following:

#include <memory>

int main (void)
{
    typedef std::allocator<int> alloc1;
    typedef alloc1::template rebind<double> binder;
}


Reproducible: Always
Steps to Reproduce:
cat << __EOF > test.cc
#include <memory>

int main (void)
{
    typedef std::allocator<int> alloc1;
    typedef alloc1::template rebind<double> binder;
}
__EOF
gcc -o test test.cc
Actual Results:  
test.cc: In function `int main()':
test.cc:6: Internal compiler error in grokdeclarator, at cp/decl.c:9970
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugs.gentoo.org/> for instructions.


Expected Results:  
It should compile cleanly without errors.
Comment 1 Peter Gavin 2003-05-28 14:35:55 UTC
An even simpler file that crashes GCC:

template<typename type1> class A
{ public: template<typename type2> class B {}; };

typedef A<int> type3;
typedef type3::template B<double> blah;

Also, I've submitted this bug at the GCC bugzilla.
Comment 2 Caleb Tennis (RETIRED) gentoo-dev 2003-06-23 19:51:08 UTC
Closing as a cantfix as it's a gcc bug.  Let's hope they can get it fixed :) 
Comment 3 Martin Holzer (RETIRED) gentoo-dev 2003-10-29 14:07:59 UTC
closing with latest gcc