This is the mail archive of the 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]
Other format: [Raw text]

c++/8046: ICE on (admittedly very silly) input

>Number:         8046
>Category:       c++
>Synopsis:       ICE on (admittedly very silly) input
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    unassigned
>State:          open
>Class:          ice-on-illegal-code
>Submitter-Id:   net
>Arrival-Date:   Wed Sep 25 14:36:01 PDT 2002
>Originator:     Andrew Pollard
>Release:        3.2.1 20020914 (prerelease)
System: Linux 2.4.18-10smp #1 SMP Wed Aug 7 11:17:48 EDT 2002 i686 unknown
Architecture: i686
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: /usr/local/src/cvs/gcc-3_2-branch/configure --prefix=/usr/local/gcc-3.2.1-20020914-i686-pc-linux-gnu --with-gnu-as --with-gnu-ld --enable-version-specific-runtime-libs --enable-threads=posix --with-dwarf2 --disable-shared --enable-languages=c++ --enable-__cxa_atexit
The following (admittedly very silly) code fragment causes an ICE in all gcc
versions I tried (gcc-2.96/gcc-3.0.5/gcc-3.2.1/gcc-3.3)

    struct A {};
    namespace a {}

        A a;

% gcc -v
Reading specs from /usr/local/gcc-3.2.1-20020914-i686-pc-linux-gnu/lib/gcc-lib/i686-pc-linux-gnu/3.2.1/specs
Configured with: /usr/local/src/cvs/gcc-3_2-branch/configure --prefix=/usr/local/gcc-3.2.1-20020914-i686-pc-linux-gnu --with-gnu-as --with-gnu-ld --enable-version-specific-runtime-libs --enable-threads=posix --with-dwarf2 --disable-shared --enable-languages=c++ --enable-__cxa_atexit
Thread model: posix
gcc version 3.2.1 20020914 (prerelease)
% g++ ice.cxx
ice.cxx: In function `void foo()':
ice.cxx:8: Internal compiler error in lookup_namespace_name, at cp/decl.c:5532
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:> for instructions.

This was distilled from a much larger piece of code, but, basically, what
I meant to do was


and not


to call the destructor. A polite error message pointing out that I had
submitted complete garbage to the compiler would have been better than
the ICE :-)
Compile the above code fragment.
Don't do something as daft as what I actually did.

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