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

            Bug ID: 105185
           Summary: [12 Regression] ICE in visit_reference_op_call, at
                    tree-ssa-sccvn.cc:5144
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gs...@t-online.de
  Target Milestone: ---

Changed between 20220306 and 20220327, at -O1+ :
(derived from pr104825.c)


$ cat z1.c
int foo (fmt)
char* fmt;
{
  return (__builtin_strchr (fmt, '*') != 0
          || __builtin_strchr (fmt, 'n') != 0);
}
void bar ()
{
  if (foo ())
    __builtin_abort ();
}


$ gcc-12-20220403 -c z1.c
$
$ gcc-12-20220403 -c z1.c -O2
during GIMPLE pass: fre
z1.c: In function 'bar':
z1.c:11:1: internal compiler error: Segmentation fault
   11 | }
      | ^
0xe0a17f crash_signal
        ../../gcc/toplev.cc:322
0x103c188 contains_struct_check(tree_node*, tree_node_structure_enum, char
const*, int, char const*)
        ../../gcc/tree.h:3570
0x103c188 visit_reference_op_call
        ../../gcc/tree-ssa-sccvn.cc:5144
0x1046b93 visit_stmt
        ../../gcc/tree-ssa-sccvn.cc:5847
0x1047bfb process_bb
        ../../gcc/tree-ssa-sccvn.cc:7482
0x1049c8e do_rpo_vn(function*, edge_def*, bitmap_head*, bool, bool,
vn_lookup_kind)
        ../../gcc/tree-ssa-sccvn.cc:7967
0x104a75b execute
        ../../gcc/tree-ssa-sccvn.cc:8233

Reply via email to