https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104825
Bug ID: 104825
Summary: [12 Regression] ICE in ao_ref_init_from_ptr_and_range,
at tree-ssa-alias.cc:840
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: [email protected]
Target Milestone: ---
Started between 20211121 and 20211128, at -O1+ :
$ cat z1.c
#include <string.h>
int foo (fmt)
char* fmt;
{
return (strchr (fmt, '*') != 0
|| strchr (fmt, 'n') != 0);
}
void bar ()
{
if ( foo (1) )
__builtin_abort ();
}
$ gcc-12-20220306 -c z1.c
$
$ gcc-12-20220306 -c z1.c -O2
during GIMPLE pass: fre
z1.c: In function 'bar':
z1.c:12:1: internal compiler error: in ao_ref_init_from_ptr_and_range, at
tree-ssa-alias.cc:840
12 | }
| ^
0xcfa3f7 ao_ref_init_from_ptr_and_range(ao_ref*, tree_node*, bool, poly_int<1u,
long>, poly_int<1u, long>, poly_int<1u, long>)
../../gcc/tree-ssa-alias.cc:840
0xa0de1b modref_access_node::get_ao_ref(gcall const*, ao_ref*) const
../../gcc/ipa-modref-tree.cc:688
0xdc6283 visit_reference_op_call
../../gcc/tree-ssa-sccvn.cc:5143
0xdcfd58 visit_stmt
../../gcc/tree-ssa-sccvn.cc:5846
0xdd0aeb process_bb
../../gcc/tree-ssa-sccvn.cc:7481
0xdd25dd do_rpo_vn(function*, edge_def*, bitmap_head*, bool, bool,
vn_lookup_kind)
../../gcc/tree-ssa-sccvn.cc:7966
0xdd2f3b execute
../../gcc/tree-ssa-sccvn.cc:8232