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

            Bug ID: 113895
           Summary: ice in in copy_reference_ops_from_ref, at
                    tree-ssa-sccvn.cc:1144
           Product: gcc
           Version: 14.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 source code:

int main_i;
void transparent_crc();
#pragma pack(1)
struct {
  signed : 17;
  signed : 6;
  unsigned : 13;
  unsigned f6 : 12
} g_20[];
void main() { transparent_crc(g_20[main_i].f6); }

when compiled by recent gcc, does this:

cvise $ ~/gcc/results/bin/gcc -c -O1 bug1011.c
bug1011.c:9:1: warning: no semicolon at end of struct or union
    9 | } g_20[];
      | ^
bug1011.c:9:3: warning: array ‘g_20’ assumed to have one element
    9 | } g_20[];
      |   ^~~~
during GIMPLE pass: fre
bug1011.c: In function ‘main’:
bug1011.c:10:1: internal compiler error: in copy_reference_ops_from_ref, at
tree-ssa-sccvn.cc:1144
   10 | void main() { transparent_crc(g_20[main_i].f6); }
      | ^~~~
0x10e922a copy_reference_ops_from_ref(tree_node*, vec<vn_reference_op_struct,
va_heap, vl_ptr>*)
       
/home/dcb38/gcc/working/gcc/../../trunk.20210101/gcc/tree-ssa-sccvn.cc:1144

The bug first seems to appear sometime between g:48207a5f00d6ae7c
and g:39d989022dd0eacf.

Reply via email to