The code snippet goes as follows: *snip* namespace Bar { typedef void MyVoid; } using Bar::MyVoid; *snip* Compiling with "g++-4.3.0 -save-temps -g -Wall -o simple simple.cc -c" results in this: simple.cc:6: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See <http://bugs.gentoo.org/> for instructions. Could reproduce this bug on Gentoo 2008.0 with g++ 4.3.0 and 4.2.3 and on Fedora Core 8.
Works for me with the trunk on both i686-linux-gnu and i386-apple-darwin. Also works with "4.3.0 20070729" and 4.3.0 20080128 on i386-apple-darwin.
Confirmed. -g is the key. Program received signal SIGSEGV, Segmentation fault. 0x000000000081eed9 in prune_unused_types_mark (die=0x0, dokids=1) at /space/rguenther/src/svn/trunk/gcc/dwarf2out.c:14913 14913 if (die->die_mark == 0)
Subject: Bug 36278 Author: jakub Date: Thu Jul 31 08:01:25 2008 New Revision: 138361 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=138361 Log: PR debug/36278 * dwarf2out.c (get_context_die): New function. (force_decl_die, force_type_die): Use it. (dwarf2out_imported_module_or_decl): Likewise. If base_type_die returns NULL, force generation of DW_TAG_typedef and put that into DW_AT_import. * g++.dg/debug/namespace2.C: New test. Added: trunk/gcc/testsuite/g++.dg/debug/namespace2.C Modified: trunk/gcc/ChangeLog trunk/gcc/dwarf2out.c trunk/gcc/testsuite/ChangeLog
Subject: Bug 36278 Author: jakub Date: Thu Jul 31 08:48:26 2008 New Revision: 138369 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=138369 Log: PR debug/36278 * dwarf2out.c (get_context_die): New function. (force_decl_die, force_type_die): Use it. (dwarf2out_imported_module_or_decl): Likewise. If base_type_die returns NULL, force generation of DW_TAG_typedef and put that into DW_AT_import. * g++.dg/debug/namespace2.C: New test. Added: branches/gcc-4_3-branch/gcc/testsuite/g++.dg/debug/namespace2.C Modified: branches/gcc-4_3-branch/gcc/ChangeLog branches/gcc-4_3-branch/gcc/dwarf2out.c branches/gcc-4_3-branch/gcc/testsuite/ChangeLog
Fixed.