g++ 3.2.1 crashes with segmentation fault

Oliver Kullmann O.Kullmann@Swansea.ac.uk
Tue Jan 7 12:39:00 GMT 2003


Hi,

hunting down the bug was easier than I thought, and thus
The Bughunter proudly presents the Bug of the Week:

-------------------------------------------------------

namespace N {
  template < typename T > class C : T {};
}

int main() {
 N::C();
}

-------------------------------------------------------

given this little innocent (but incorrect) program we get

> g++ Fehler.cpp
Fehler.cpp: In function `int main()':
Fehler.cpp:6: internal error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.

using

> g++ -v
Reading specs from /compsci/partition1/csoliver/GCC/gcc-3.2.1/lib/gcc-lib/i686-pc-linux-gnu/3.2.1/specs
Configured with: /compsci/partition1/csoliver/GCC/gcc-3.2.1/configure --enable-threads=posix --enable-long-long --prefix=/compsci/partition1/csoliver/GCC/gcc-3.2.1 --with-local-prefix=/compsci/partition1/csoliver/GCC/Include_3.2.1 --enable-languages=c,c++ --disable-nls --enable-shared
Thread model: posix
gcc version 3.2.1

Using version 3.0.4 I get the same error.

Oliver




More information about the Gcc-help mailing list