The attached code causes ICE on GCC version 3.2.2 (it seems GCC 3.2 20020927 has the same problem). GCC 2.95.4 compiles the same source perfectly (if you use the non-preprocessed code), so I believe the code is legal... --------------- $ g++ -O0 array.ii array.h: In member function `ARRAYBASE* ArrayMakerKeyTemplate<ARRAYBASE>::MakeEntry(ARRAYBASE::hashkey_t) [with ARRAYBASE = ArrayEntry<ulong>]': hash.h:546: instantiated from here array.h:215: Internal compiler error in convert_from_eh_region_ranges_1, at except.c:1404 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions. $ g++ -v Reading specs from /usr/lib/gcc-lib/i386-linux/3.2.2/specs Configured with: ../src/configure -v --enable-languages=c,c++,java,f77,proto,pascal,objc,ada --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-gxx-include-dir=/usr/include/c++/3.2 --enable-shared --with-system-zlib --enable-nls --without-included-gettext --enable-__cxa_atexit --enable-clocale=gnu --enable-java-gc=boehm --enable-objc-gc i386-linux Thread model: posix gcc version 3.2.2 20030109 (Debian prerelease) --------------- Release: gcc version 3.2.2 20030109 (Debian prerelease) i386-linux Environment: Debian GNU/Linux with kernel updated to 2.4.20 How-To-Repeat: Compile the attached file: g++ -O0 array.ii
State-Changed-From-To: open->analyzed State-Changed-Why: Giovanni analyzed this.
From: "Giovanni Bajo" <giovannibajo@libero.it> To: <gcc-gnats@gcc.gnu.org>, <gcc-bugs@gcc.gnu.org>, <nobody@gcc.gnu.org>, <gcc-prs@gcc.gnu.org>, <t-gcc@snowelm.com> Cc: Subject: Re: c++/9429: ICE in template instantiation with a pointered new operator Date: Fri, 24 Jan 2003 15:45:32 +0100 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&p r=9429 Reduced snippet: ------------------------ struct B { ~B() throw() {} void* foo(void) { return 0; } }; void* operator new(unsigned int, void* __p) { return __p; } void operator delete (void*, void*) { }; void A(void) { (void)new (B().foo()) int(); } ------------------------ ice5.cpp: In function `void A()': ice5.cpp:15: Internal compiler error in convert_from_eh_region_ranges_1, at except.c:1404 Please submit a full bug report, GCC is confused by a temporary with exception specification in destructor created within a placement-new expression. For the submitter, the easy fix is to modify all the Array*Template<>::MakeEntry() so that the temporary is created at function scope instead of within the placement new. Giovanni Bajo
From: Wolfgang Bangerth <bangerth@ices.utexas.edu> To: Giovanni Bajo <giovannibajo@libero.it> Cc: gcc-gnats@gcc.gnu.org, <gcc-bugs@gcc.gnu.org>, <nobody@gcc.gnu.org>, <gcc-prs@gcc.gnu.org>, <t-gcc@snowelm.com> Subject: Re: c++/9429: ICE in template instantiation with a pointered new operator Date: Mon, 7 Apr 2003 09:00:12 -0500 (CDT) > http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9429 > > Fixed in GCC 3.3 20030401, and worked on 2.95. If it's fixed in 3.4, it > should be marked as 3.2 regression. Indeed fixed in 3.4. W. ------------------------------------------------------------------------- Wolfgang Bangerth email: bangerth@ices.utexas.edu www: http://www.ices.utexas.edu/~bangerth/
From: "Giovanni Bajo" <giovannibajo@libero.it> To: <gcc-gnats@gcc.gnu.org>, <gcc-bugs@gcc.gnu.org>, <nobody@gcc.gnu.org>, <gcc-prs@gcc.gnu.org>, <t-gcc@snowelm.com> Cc: "Wolfgang Bangerth" <bangerth@ices.utexas.edu> Subject: Re: c++/9429: ICE in template instantiation with a pointered new operator Date: Mon, 7 Apr 2003 12:48:12 +0200 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&p r=9429 Fixed in GCC 3.3 20030401, and worked on 2.95. If it's fixed in 3.4, it should be marked as 3.2 regression. Otherwise, it's a 3.2/3.4 regression (I can't test on 3.4 since it's still broken for cygwin target). Giovanni Bajo
State-Changed-From-To: analyzed->closed State-Changed-Why: Fixed for 3.3 and trunk.