https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88450
--- Comment #7 from Bence Szabó <sbence92 at gmail dot com> --- New info: when built with --enable-checking=yes, the selftests already produce segfault in stage2 cc1 and cc1plus at the same point as the below cc1plus. backtrace for cc1 with r266345. Thread 1 received signal SIGSEGV, Segmentation fault. 0x000000000045953d in c_parser_declspecs (parser=parser@entry=0x1965b708, specs=specs@entry=0x1967d750, scspec_ok=scspec_ok@entry=true, typespec_ok=typespec_ok@entry=true, start_attr_ok=<optimized out>, start_attr_ok@entry=true, alignspec_ok=<optimized out>, alignspec_ok@entry=true, auto_type_ok=<optimized out>, auto_type_ok@entry=true, la=<optimized out>, la@entry=cla_nonabstract_decl) at ../../src/gcc/c/c-parser.c:2776 2776 declspecs_add_type (loc, specs, t); (gdb) bt #0 0x000000000045953d in c_parser_declspecs (parser=parser@entry=0x1965b708, specs=specs@entry=0x1967d750, scspec_ok=scspec_ok@entry=true, typespec_ok=typespec_ok@entry=true, start_attr_ok=<optimized out>, start_attr_ok@entry=true, alignspec_ok=<optimized out>, alignspec_ok@entry=true, auto_type_ok=<optimized out>, auto_type_ok@entry=true, la=<optimized out>, la@entry=cla_nonabstract_decl) at ../../src/gcc/c/c-parser.c:2776 #1 0x0000000000471579 in c_parser_declaration_or_fndef (parser=0x1965b708, fndef_ok=true, static_assert_ok=<optimized out>, empty_ok=true, nested=false, start_attr_ok=true, objc_foreach_object_declaration=0x0, omp_declare_simd_clauses=..., oacc_routine_data=0x0, fallthru_attr_p=0x0) at ../../src/gcc/c/c-parser.c:1850 #2 0x0000000000479f33 in c_parser_external_declaration (parser=0x1965b708) at ../../src/gcc/c/c-parser.c:1653 #3 0x000000000047a95c in c_parser_translation_unit (parser=<optimized out>) at ../../src/gcc/c/c-parser.c:1534 #4 c_parse_file () at ../../src/gcc/c/c-parser.c:19771 #5 0x00000000004d1af7 in c_common_parse_file () at ../../src/gcc/c-family/c-opts.c:1151 #6 0x0000000000925a4d in compile_file () at ../../src/gcc/toplev.c:456 #7 0x0000000001587bff in do_compile () at ../../src/gcc/toplev.c:2176 #8 toplev::main(int, char**) () at ../../src/gcc/toplev.c:2311 #9 0x00000000016d67f3 in main (argc=2, argv=0x197115d0) at ../../src/gcc/main.c:39 === backtrace for cc1plus with r266345: Thread 1 received signal SIGSEGV, Segmentation fault. 0x0000000000855ac6 in gimplify_expr (expr_p=<optimized out>, pre_p=<optimized out>, pre_p@entry=0x1ab1f948, post_p=<optimized out>, post_p@entry=0x0, gimple_test_f=<optimized out>, gimple_test_f@entry=0x8478f0 <is_gimple_stmt(tree)>, fallback=<optimized out>, fallback@entry=0) at ../../src/gcc/gimplify.c:13249 13249 annotate_all_with_location_after (*pre_p, pre_last_gsi, input_location); (gdb) bt #0 0x0000000000855ac6 in gimplify_expr (expr_p=<optimized out>, pre_p=<optimized out>, pre_p@entry=0x1ab1f948, post_p=<optimized out>, post_p@entry=0x0, gimple_test_f=<optimized out>, gimple_test_f@entry=0x8478f0 <is_gimple_stmt(tree)>, fallback=<optimized out>, fallback@entry=0) at ../../src/gcc/gimplify.c:13249 #1 0x000000000085f0bf in gimplify_stmt (stmt_p=stmt_p@entry=0x1ab1f3f8, seq_p=seq_p@entry=0x1ab1f948) at ../../src/gcc/gimplify.c:6656 #2 0x000000000086a17a in gimplify_and_add (seq_p=0x1ab1f948, t=<optimized out>) at ../../src/gcc/gimplify.c:465 #3 gimplify_return_expr (stmt=stmt@entry=0x1decc5a0, pre_p=pre_p@entry=0x1ab1f948) at ../../src/gcc/gimplify.c:1591 #4 0x0000000000857c1e in gimplify_expr (expr_p=<optimized out>, pre_p=pre_p@entry=0x1ab1f948, post_p=<optimized out>, post_p@entry=0x0, gimple_test_f=<optimized out>, gimple_test_f@entry=0x8478f0 <is_gimple_stmt(tree)>, fallback=<optimized out>, fallback@entry=0) at ../../src/gcc/gimplify.c:12634 #5 0x000000000085f0bf in gimplify_stmt (stmt_p=<optimized out>, seq_p=seq_p@entry=0x1ab1f948) at ../../src/gcc/gimplify.c:6656 #6 0x0000000000857fb3 in gimplify_statement_list (pre_p=0x1ab1f948, expr_p=<optimized out>) at ../../src/gcc/tree-iterator.h:86 #7 gimplify_expr (expr_p=<optimized out>, pre_p=pre_p@entry=0x1ab1f948, post_p=<optimized out>, post_p@entry=0x0, gimple_test_f=<optimized out>, gimple_test_f@entry=0x8478f0 <is_gimple_stmt(tree)>, fallback=<optimized out>, fallback@entry=0) at ../../src/gcc/gimplify.c:12802 #8 0x000000000085f0bf in gimplify_stmt (stmt_p=stmt_p@entry=0x1ded4ec0, seq_p=seq_p@entry=0x1ab1f948) at ../../src/gcc/gimplify.c:6656 #9 0x0000000000860ada in gimplify_body (fndecl=fndecl@entry=0x1ded4e00, do_parms=do_parms@entry=true) at ../../src/gcc/tree.h:3155 #10 0x0000000000860eaa in gimplify_function_tree (fndecl=fndecl@entry=0x1ded4e00) at ../../src/gcc/gimplify.c:13726 #11 0x00000000006e34f3 in cgraph_node::analyze (this=this@entry=0x1d0a82e0) at ../../src/gcc/cgraphunit.c:667 #12 0x00000000006e5f5e in analyze_functions (first_time=first_time@entry=true) at ../../src/gcc/cgraphunit.c:1126 #13 0x00000000006e6ce5 in symbol_table::finalize_compilation_unit (this=0x1d0a9100) at ../../src/gcc/cgraphunit.c:2835 #14 0x0000000000a90739 in compile_file () at ../../src/gcc/toplev.c:481 #15 0x00000000017b39df in do_compile () at ../../src/gcc/toplev.c:2176 #16 toplev::main(int, char**) () at ../../src/gcc/toplev.c:2311 #17 0x0000000001902d73 in main (argc=2, argv=0x1a15d0) at ../../src/gcc/main.c:39