From 1f6dd5de33912c261a5003150212c290165ac1b6 Mon Sep 17 00:00:00 2001
From: Andrew MacLeod <amacleod@redhat.com>
Date: Fri, 5 Nov 2021 11:25:09 -0400
Subject: [PATCH 2/2] 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.
---
gcc/gimple-range-gori.cc | 3 ---
gcc/testsuite/gcc.dg/pr103093.c | 20 ++++++++++++++++++++
2 files changed, 20 insertions(+), 3 deletions(-)
create mode 100644 gcc/testsuite/gcc.dg/pr103093.c
@@ -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;
}
new file mode 100644
@@ -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 (;;)
+ ;
+ }
+ }
+}
--
2.17.2