http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58627
Bug ID: 58627 Summary: [4.9 Regression] crash during compilation of boost testsuite Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: markus at trippelsdorf dot de Crash happened during compilation of the boost testsuite. It's hard to reduce the testcase, because it appears to be a bug in the garbage-collector. [With --enable-checking=release] % g++ -O0 -std=c++11 -c test.ii test.ii: In member function ‘boost::chrono::duration<Rep, Period>& boost::chrono::duration<Rep, Period>::operator--() [with Rep = double; Period = boost::ratio<1l>]’: test.ii:3207:286: internal compiler error: Segmentation fault [gcc-4.8.1 is fine] % /usr/x86_64-pc-linux-gnu/gcc-bin/4.8.1/g++ -O2 -std=c++11 -c test.i % [Backtrace with --enable-checking] % gdb --args /var/tmp/gcc_test/usr/local/bin/g++ -w -O0 -std=c++11 -Wfatal-errors -c test.ii -pipe -o /dev/null Reading symbols from /var/tmp/gcc_test/usr/local/bin/g++...done. (gdb) run Starting program: /var/tmp/gcc_test/usr/local/bin/g++ -w -O0 -std=c++11 -Wfatal-errors -c test.ii -pipe -o /dev/null [New process 20470] process 20470 is executing new program: /var/tmp/gcc_test/usr/local/libexec/gcc/x86_64-unknown-linux-gnu/4.9.0/cc1plus Program received signal SIGSEGV, Segmentation fault. [Switching to process 20470] 0x0000000000c8e9f8 in tree_class_check_failed (node=<optimized out>, cl=<optimized out>, file=0xff512d "../../gcc/gcc/c-family/c-common.h", line=1063, function=0xff514f "c_tree_chain_next") at ../../gcc/gcc/tree.c:9223 9223 ../../gcc/gcc/tree.c: No such file or directory. (gdb) bt #0 0x0000000000c8e9f8 in tree_class_check_failed (node=<optimized out>, cl=<optimized out>, file=0xff512d "../../gcc/gcc/c-family/c-common.h", line=1063, function=0xff514f "c_tree_chain_next") at ../../gcc/gcc/tree.c:9223 #1 0x00000000006807f1 in tree_class_check (__class=<optimized out>, __f=<optimized out>, __l=<optimized out>, __g=<optimized out>, __t=<optimized out>, __class=<optimized out>, __f=<optimized out>, __l=<optimized out>, __g=<optimized out>) at ../../gcc/gcc/tree.h:2732 #2 c_tree_chain_next (t=<optimized out>) at ../../gcc/gcc/c-family/c-common.h:1063 #3 gt_ggc_mx_lang_tree_node (x_p=<optimized out>) at ./gt-cp-tree.h:158 #4 0x000000000067f79a in gt_ggc_mx_lang_tree_node (x_p=<optimized out>) at ./gt-cp-tree.h:706 #5 0x0000000000680ba3 in gt_ggc_mx_tinst_level (x_p=<optimized out>) at ./gt-cp-tree.h:124 #6 0x000000000057b363 in gt_ggc_mx_pending_template (x_p=<optimized out>) at ./gt-cp-pt.h:44 #7 0x00000000008dfa6b in ggc_mark_root_tab (rt=<optimized out>) at ../../gcc/gcc/ggc-common.c:133 #8 ggc_mark_roots () at ../../gcc/gcc/ggc-common.c:152 #9 0x000000000072d91b in ggc_collect () at ../../gcc/gcc/ggc-page.c:2077 #10 0x000000000079f9c3 in cgraph_finalize_function (decl=<optimized out>, no_collect=<optimized out>) at ../../gcc/gcc/cgraphunit.c:456 #11 0x000000000065c3fc in expand_or_defer_fn (fn=0x7fffeeb57500) at ../../gcc/gcc/cp/semantics.c:3949 #12 0x0000000000574935 in instantiate_decl (d=0x7fffeeb57500, defer_ok=<error reading variable: Cannot access memory at address 0x0>, expl_inst_class_mem_p=<optimized out>) at ../../gcc/gcc/cp/pt.c:19406 #13 0x0000000000577738 in instantiate_pending_templates (retries=<optimized out>) at ../../gcc/gcc/cp/pt.c:19493 #14 0x00000000005b9454 in cp_write_global_declarations () at ../../gcc/gcc/cp/decl2.c:4065 #15 0x0000000000aa2196 in compile_file () at ../../gcc/gcc/toplev.c:560 #16 0x0000000000aa1f67 in do_compile () at ../../gcc/gcc/toplev.c:1893 #17 toplev_main (argc=16, argv=0x7fffffffe028) at ../../gcc/gcc/toplev.c:1969 #18 0x00007ffff74d3a6e in __libc_start_main () from /lib/libc.so.6 #19 0x00000000004e090d in _start ()