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

            Bug ID: 109139
           Summary: ice in make_decl_rtl, at varasm.cc:1442
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dcb314 at hotmail dot com
  Target Milestone: ---

This C code:

const int COMPARE_CANDIDATE;
char ipmi_ek_compare_link_record1_0, ipmi_ek_compare_link_record2_0;
void ipmi_ek_compare_link() {
  for (; ipmi_ek_compare_link_record1_0;)
    for (; ipmi_ek_compare_link_record2_0;) {
      int link[COMPARE_CANDIDATE];
    }
}

when compiled by today's gcc trunk, does this:

$ ~/gcc/results.20230315/bin/gcc -c -w -O1 -ftrivial-auto-var-init=zero
bug896.c 
during RTL pass: expand
bug896.c: In function ‘ipmi_ek_compare_link’:
bug896.c:6:11: internal compiler error: in make_decl_rtl, at varasm.cc:1442
    6 |       int link[COMPARE_CANDIDATE];
      |           ^~~~
0x7c9502 make_decl_rtl(tree_node*)
        ../../trunk.year/gcc/varasm.cc:1442

It worked yesterday:

$ ~/gcc/results.20230314/bin/gcc -c -w -O1 -ftrivial-auto-var-init=zero
bug896.c 
$ 

The git range seems to be g:e17936f842d28854 .. g:a9ae16db8cbb2c0e.

Reply via email to