[Bug debug/70297] New: GCC Segfaults when using -g3

piotr.zierhoffer at gmail dot com gcc-bugzilla@gcc.gnu.org
Fri Mar 18 14:57:00 GMT 2016


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70297

            Bug ID: 70297
           Summary: GCC Segfaults when using -g3
           Product: gcc
           Version: 5.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: debug
          Assignee: unassigned at gcc dot gnu.org
          Reporter: piotr.zierhoffer at gmail dot com
  Target Milestone: ---

Created attachment 38022
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38022&action=edit
Failing example.

gcc 5.3.0, on Ubuntu 14.04 (tested also on Debian), 64bit, gcc -v output in the
attached file.

The problem did not occur when I included -save-temps switch.

When compiling the attached source with

gcc -g3 test.c

I get the following:

test.c:611:1: internal compiler error: Segmentation fault
 } tcg_context_t;
 ^
0x9a106f crash_signal
        ../../src/gcc/toplev.c:383
0x709f9d add_name_attribute
        ../../src/gcc/dwarf2out.c:16505
0x709f9d modified_type_die
        ../../src/gcc/dwarf2out.c:10853
0x709d9f modified_type_die
        ../../src/gcc/dwarf2out.c:10866
0x70b64b add_type_attribute
        ../../src/gcc/dwarf2out.c:17380
0x70b7ab gen_field_die
        ../../src/gcc/dwarf2out.c:19542
0x7070f0 gen_decl_die
        ../../src/gcc/dwarf2out.c:21058
0x708662 gen_member_die
        ../../src/gcc/dwarf2out.c:19951
0x708662 gen_struct_or_union_type_die
        ../../src/gcc/dwarf2out.c:20037
0x708cfc gen_tagged_type_die
        ../../src/gcc/dwarf2out.c:20226
0x709061 gen_type_die_with_usage
        ../../src/gcc/dwarf2out.c:20375
0x70724b gen_decl_die
        ../../src/gcc/dwarf2out.c:21003
0x707ba4 dwarf2out_decl
        ../../src/gcc/dwarf2out.c:21413
0x8f9815 rest_of_type_compilation(tree_node*, int)
        ../../src/gcc/passes.c:309
0x5c709b finish_struct(unsigned int, tree_node*, tree_node*, tree_node*,
c_struct_parse_info*)
        ../../src/gcc/c/c-decl.c:7855
0x5f41ad c_parser_struct_or_union_specifier
        ../../src/gcc/c/c-parser.c:2817
0x5f41ad c_parser_declspecs
        ../../src/gcc/c/c-parser.c:2403
0x5e8af0 c_parser_declaration_or_fndef
        ../../src/gcc/c/c-parser.c:1571
0x5fe2a7 c_parser_external_declaration
        ../../src/gcc/c/c-parser.c:1452
0x5feb69 c_parser_translation_unit
        ../../src/gcc/c/c-parser.c:1339

I did not manage to reduce the test case any further, removing anything makes
the compilation pass.


More information about the Gcc-bugs mailing list