This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

g++ ICE: When overloading "new".


Hi there!

It seems that certain formats of "new" overloading cause ICE in gcc 2.96 
20000910 (I'm running a RH 6.2 Linux on i686 system with glibc2.1.3 kernel 
2.2.17).
Here's a minimal code that causes this failure.

/opt/gcc-2.96/bin/gcc -v --save-temps -c -g -Wall bug.cc
Reading specs from /opt/gcc-2.96/lib/gcc-lib/i686-pc-linux-gnu/2.96/specs
gcc version 2.96 20000910 (experimental)
/opt/gcc-2.96/lib/gcc-lib/i686-pc-linux-gnu/2.96/cpp0 -lang-c++ -D__GNUG__=2 
-v -D__GNUC__=2 -D__GNUC_MINOR__=96 -D__GNUC_PATCHLEVEL__=0 -D__ELF__ -Dunix 
-Dlinux -D__ELF__ -D__unix__ -D__linux__ -D__unix -D__linux -Asystem(posix) 
-g -Wall -Acpu(i386) -Amachine(i386) -Di386 -D__i386 -D__i386__ 
-D__tune_pentiumpro__ bug
.cc bug.ii
GNU CPP version 2.96 20000910 (experimental) (cpplib)
(i386 Linux/ELF)
#include "..." search starts here:
#include <...> search starts here:
/usr/local/qt/include
/opt/gcc-2.96/include/g++-3
/usr/local/include
/opt/gcc-2.96/lib/gcc-lib/i686-pc-linux-gnu/2.96/include
/opt/gcc-2.96/i686-pc-linux-gnu/include
/usr/include
End of search list.
/opt/gcc-2.96/lib/gcc-lib/i686-pc-linux-gnu/2.96/cc1plus -lang-c++ bug.ii 
-quiet -dumpbase bug.cc -g -Wall -version -o bug.s
GNU C++ version 2.96 20000910 (experimental) (i686-pc-linux-gnu) compiled by 
GNU C version 2.96 20000910 (experimental).
bug.cc:3: `operator new' takes type `size_t' as first parameter
bug.cc:3: Internal error #73.
bug.cc:3: Internal compiler error in process_overload_item, at method.c:1461
   Please submit a full bug report.
   See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.

Here's postprocessed source bug.ii:

# 1 "bug.cc"
void *operator new(unsigned long size,const char *curFile,unsigned long
curLine,const char *curFunction)
{
}


int main()
{
}


Thanks,
  Sefer
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Share information about yourself, create your own public profile at 
http://profiles.msn.com.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]