User account creation filtered due to spam.

Bug 9429 - [3.2 regression] ICE in template instantiation with a pointered new operator
Summary: [3.2 regression] ICE in template instantiation with a pointered new operator
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 3.2.2
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-valid-code
: 9430 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-01-24 09:56 UTC by t-gcc
Modified: 2003-07-25 17:33 UTC (History)
4 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments
array.ii (130.52 KB, text/x-c++)
2003-05-21 15:17 UTC, t-gcc
Details

Note You need to log in before you can comment on or make changes to this bug.
Description t-gcc 2003-01-24 09:56:00 UTC
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
Comment 1 Wolfgang Bangerth 2003-01-24 15:06:08 UTC
State-Changed-From-To: open->analyzed
State-Changed-Why: Giovanni analyzed this.
Comment 2 Giovanni Bajo 2003-01-24 15:45:32 UTC
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
 
Comment 3 Wolfgang Bangerth 2003-04-07 09:00:12 UTC
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/
 
 
Comment 4 Giovanni Bajo 2003-04-07 12:48:12 UTC
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
 

Comment 5 Joe Buck 2003-04-25 19:32:07 UTC
State-Changed-From-To: analyzed->closed
State-Changed-Why: Fixed for 3.3 and trunk.