Bug 36083 - g++ segfault
Summary: g++ segfault
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 4.1.1
: P3 normal
Target Milestone: 4.1.2
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-04-30 07:21 UTC by Pontus Astrom
Modified: 2008-04-30 10:24 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pontus Astrom 2008-04-30 07:21:25 UTC
The compiler exits with segmentation fault for this source file. There are errors in the syntax but this still should not result in a segfault.

Begin code ---------------------

namespace a
{
   struct exception_base
   {
	 virtual ~exception_base() throw();
   };
}

a::~exception_base() throw(){}

End code --------------------------------


Command line: 
> g++ -v -c -o bug.o bug.cc -save-temps

Output:
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../gcc-4.1.1/configure --prefix=/opt/gcc/4.1.1
Thread model: posix
gcc version 4.1.1
 /opt/gcc/4.1.1/libexec/gcc/i686-pc-linux-gnu/4.1.1/cc1plus -E -quiet -v -D_GNU_SOURCE bug.cc -mtune=pentiumpro -fpch-preprocess -o bug.ii
ignoring duplicate directory "/usr/local/include"
ignoring nonexistent directory "/opt/gcc/4.1.1/lib/gcc/i686-pc-linux-gnu/4.1.1/../../../../i686-pc-linux-gnu/include"
ignoring duplicate directory "/usr/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include
 /usr/include
 /usr/X11/include
 /opt/gcc/4.1.1/lib/gcc/i686-pc-linux-gnu/4.1.1/../../../../include/c++/4.1.1
 /opt/gcc/4.1.1/lib/gcc/i686-pc-linux-gnu/4.1.1/../../../../include/c++/4.1.1/i686-pc-linux-gnu
 /opt/gcc/4.1.1/lib/gcc/i686-pc-linux-gnu/4.1.1/../../../../include/c++/4.1.1/backward
 /opt/gcc/4.1.1/include
 /opt/gcc/4.1.1/lib/gcc/i686-pc-linux-gnu/4.1.1/include
End of search list.
 /opt/gcc/4.1.1/libexec/gcc/i686-pc-linux-gnu/4.1.1/cc1plus -fpreprocessed bug.ii -quiet -dumpbase bug.cc -mtune=pentiumpro -auxbase-strip bug.o -version -o bug.s
GNU C++ version 4.1.1 (i686-pc-linux-gnu)
        compiled by GNU C version 4.0.2 20050901 (prerelease) (SUSE Linux).
GGC heuristics: --param ggc-min-expand=98 --param ggc-min-heapsize=128290
Compiler executable checksum: 15f7450715807b4e1d2bded670d0f376
bug.cc:9: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
Comment 1 Richard Biener 2008-04-30 10:24:13 UTC
g++-4.1 -S t.C
t.C:9: error: scope 'a' before '~' is not a class-name

works for me since 4.1.2.