Remove def chain import assert from GORI.

When the IL has changed, any new ssa-names import calculations may not jive
with existing ssa-names, so just remove the assert.

	gcc/
	PR tree-optimization/103093
	* gimple-range-gori.cc (range_def_chain::get_imports): Remove assert.

	gcc/testsuite/
	* gcc.dg/pr103093.c: New.
This commit is contained in:
Andrew MacLeod 2021-11-05 11:25:09 -04:00
parent 98244c68e7
commit 1f6dd5de33
2 changed files with 20 additions and 3 deletions

View File

@ -226,9 +226,6 @@ range_def_chain::get_imports (tree name)
if (!has_def_chain (name))
get_def_chain (name);
bitmap i = m_def_chain[SSA_NAME_VERSION (name)].m_import;
// Either this is a default def, OR imports must be a subset of exports.
gcc_checking_assert (!get_def_chain (name) || !i
|| !bitmap_intersect_compl_p (i, get_def_chain (name)));
return i;
}

View File

@ -0,0 +1,20 @@
/* { dg-do compile } */
/* { dg-options "-O2" } */
int i_0, c_4, uc_7, func_2_c_11;
short *func_2_ptr_10;
void func_2() {
uc_7 = 7;
for (; uc_7 <= 60; uc_7 += 1) {
c_4 = 5;
for (; c_4 <= 76; c_4 += 1) {
func_2_ptr_10 = &i_0; /* { dg-warning "assignment to .*" } */
if ((i_0 |= 5) > 0 ?: (60 && uc_7) | *func_2_ptr_10)
if (func_2_c_11)
for (;;)
;
}
}
}