c++/2709: Ice in remove_unnecessary_notes (gcc 2.95 regression)

Peter Schmid schmid@snake.iap.physik.tu-darmstadt.de
Tue May 1 13:36:00 GMT 2001


>Number:         2709
>Category:       c++
>Synopsis:       Ice in remove_unnecessary_notes (gcc 2.95 regression)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          ice-on-legal-code
>Submitter-Id:   net
>Arrival-Date:   Tue May 01 13:36:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Peter Schmid
>Release:        3.0 20010501 (prerelease)
>Organization:
TU Darmstadt
>Environment:
System: Linux kiste 2.4.3 #35 Sat Mar 31 22:08:25 CEST 2001 i686 unknown
Architecture: i686
SuSE 7.1
Glibc 2.2
GNU ld 2.11.90.0.4
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: ../gcc/configure --enable-shared --disable-nls --enable-threads=posix --enable-long-long --enable-languages=c,c++,f77,objc
>Description:
The following simple, legal source t3.C causes an Internal compiler error in
remove_unnecessary_notes, at emit-rtl.c: 2883 when compiled by gcc
3.0 20010501 (prerelease). If the using namespace directive is
removed, the compiler no longer crashes. 

The code exposes a g++ 3.0 regression with respect to gcc 2.95.2. 

>How-To-Repeat:
Source code t3.C

namespace ns
{
class A {};
} //namespace ns

void f()
{
  using namespace ns;
}



Compiling the code by gcc 3.0:

g++ -v t3.C -W -Wall -c
Reading specs from /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.0/specs
Configured with: ../gcc/configure --enable-shared --disable-nls --enable-threads=posix --enable-long-long --enable-languages=c,c++,f77,objc
Thread model: posix
gcc version 3.0 20010501 (prerelease)
 /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.0/cc1plus -v -D__GNUC__=3 -D__GNUC_MINOR__=0 -D__GNUC_PATCHLEVEL__=0 -D__ELF__ -Dunix -Dlinux -D__ELF__ -D__unix__ -D__linux__ -D__unix -D__linux -Asystem=posix -D__STDC_HOSTED__=1 -W -Wall -Acpu=i386 -Amachine=i386 -Di386 -D__i386 -D__i386__ -D__tune_i686__ -D__tune_pentiumpro__ t3.C -D__GNUG__=3 -D_GNU_SOURCE -D__EXCEPTIONS -D__GXX_ABI_VERSION=100 -quiet -dumpbase t3.C -W -Wall -version -o /tmp/ccK2mr8J.s
GNU CPP version 3.0 20010501 (prerelease) (cpplib) (i386 Linux/ELF)
GNU C++ version 3.0 20010501 (prerelease) (i686-pc-linux-gnu)
	compiled by GNU C version 3.0 20010501 (prerelease).
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include/g++-v3
 /usr/local/include/g++-v3/i686-pc-linux-gnu
 /usr/local/include
 /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.0/include
 /usr/local/i686-pc-linux-gnu/include
 /usr/include
End of search list.
t3.C: In function `void f()':
t3.C:9: Internal compiler error in remove_unnecessary_notes, at emit-rtl.c:2883
Please submit a full bug report, with preprocessed source if appropriate.
See <URL: http://www.gnu.org/software/gcc/bugs.html > for instructions.

Compiling the code by gcc 2.95.2: 
/usr/bin/g++ -v t3.C -W -Wall -c
Reading specs from /usr/lib/gcc-lib/i486-suse-linux/2.95.2/specs
gcc version 2.95.2 19991024 (release)
 /usr/lib/gcc-lib/i486-suse-linux/2.95.2/cpp -lang-c++ -v -D__GNUC__=2 -D__GNUG__=2 -D__GNUC_MINOR__=95 -D__cplusplus -D__ELF__ -Dunix -D__i386__ -Dlinux -D__ELF__ -D__unix__ -D__i386__ -D__linux__ -D__unix -D__linux -Asystem(posix) -D__EXCEPTIONS -W -Wall -Acpu(i386) -Amachine(i386) -Di386 -D__i386 -D__i386__ -Di486 -D__i486 -D__i486__ t3.C /tmp/ccdLOLmL.ii
GNU CPP version 2.95.2 19991024 (release) (i386 Linux/ELF)
#include "..." search starts here:
#include <...> search starts here:
 /usr/include/g++
 /usr/local/include
 /usr/lib/gcc-lib/i486-suse-linux/2.95.2/include
 /usr/include
End of search list.
The following default directories have been omitted from the search path:
 /usr/lib/gcc-lib/i486-suse-linux/2.95.2/../../../../i486-suse-linux/include
End of omitted list.
 /usr/lib/gcc-lib/i486-suse-linux/2.95.2/cc1plus /tmp/ccdLOLmL.ii -quiet -dumpbase t3.cc -W -Wall -version -o /tmp/ccWxIbwo.s
GNU C++ version 2.95.2 19991024 (release) (i486-suse-linux) compiled by GNU C version 2.95.2 19991024 (release).
 /usr/i486-suse-linux/bin/as -V -Qy -o t3.o /tmp/ccWxIbwo.s
GNU assembler version 2.10.91 (i486-suse-linux) using BFD version 2.10.0.33


>Fix:
	
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the Gcc-bugs mailing list