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

            Bug ID: 69824
           Summary: [4.9/5/6 Regression] internal compiler error in
                    unshare_body
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: mpolacek at gcc dot gnu.org
  Target Milestone: ---

int bar() { return foo(); }
void baz(int c[foo()]) { return; }

$ ./cc1 -quiet x.c
x.c: In function ‘bar’:
x.c:1:23: warning: implicit declaration of function ‘foo’
[-Wimplicit-function-declaration]
    int bar() { return foo(); }
                       ^~~
x.c: In function ‘baz’:
x.c:2:9: internal compiler error: Segmentation fault
    void baz(int c[foo()]) { return; }
         ^~~
0xb1cd1f crash_signal
        /home/marek/src/gcc/gcc/toplev.c:335
0x8bb931 contains_struct_check(tree_node*, tree_node_structure_enum, char
const*, int, char const*)
        /home/marek/src/gcc/gcc/tree.h:3119
0x8bb931 unshare_body
        /home/marek/src/gcc/gcc/gimplify.c:876
0x8bb9c8 unshare_body
        /home/marek/src/gcc/gcc/gimplify.c:883
0x8c8e67 gimplify_body(tree_node*, bool)
        /home/marek/src/gcc/gcc/gimplify.c:11278
0x8c9516 gimplify_function_tree(tree_node*)
        /home/marek/src/gcc/gcc/gimplify.c:11450
0x74cd77 cgraph_node::analyze()
        /home/marek/src/gcc/gcc/cgraphunit.c:625
0x74ffa5 analyze_functions
        /home/marek/src/gcc/gcc/cgraphunit.c:1080
0x750d1c symbol_table::finalize_compilation_unit()
        /home/marek/src/gcc/gcc/cgraphunit.c:2534
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.

Reply via email to