I just tried to compile the package tog-pegasus-2.11.1-5 on gcc-4.8 trunk dated 20120328 on an AMD x86_64 box. The compiler said NameSpaceManager.cpp: In function ‘void test01()’: NameSpaceManager.cpp:139:1: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. Here is a valgrind dump ==24018== Invalid read of size 4 ==24018== at 0x7D9787: create_preheader(loop*, int) (cfgloopmanip.c:1391) ==24018== by 0x7D9AFD: create_preheaders(int) (cfgloopmanip.c:1443) ==24018== by 0x9FBD0E: loop_optimizer_init(unsigned int) (loop-init.c:89) ==24018== by 0x9FBDEE: rtl_loop_init() (loop-init.c:201) ==24018== by 0xA5408C: execute_one_pass(opt_pass*) (passes.c:2079) ==24018== by 0xA54606: execute_pass_list(opt_pass*) (passes.c:2134) ==24018== by 0xB935CD: tree_rest_of_compilation(tree_node*) (tree-optimize.c:422) ==24018== by 0x7ECFDD: cgraph_expand_function(cgraph_node*) (cgraphunit.c:1837) ==24018== by 0x7F0D8B: cgraph_optimize() (cgraphunit.c:1904) ==24018== by 0x7F1439: cgraph_finalize_compilation_unit() (cgraphunit.c:1344) ==24018== by 0x5F49FA: cp_write_global_declarations() (decl2.c:4077) ==24018== by 0xB19929: toplev_main(int, char**) (toplev.c:572) ==24018== Address 0x30 is not stack'd, malloc'd or (recently) free'd ==24018== Preprocessed source code attached. Flag -O2 required.
Created attachment 27039 [details] C++ source code
Mine. Maybe a dup.
My patch for PR52772 also fixes this testcase. *** This bug has been marked as a duplicate of bug 52772 ***