range_of_stmt (r, SSA_NAME_DEF_STMT (name), name);
// Now see if there is any on_entry value which may refine it.
- if (m_cache.block_range (entry_range, bb, name))
+ if (bb && m_cache.block_range (entry_range, bb, name))
r.intersect (entry_range);
if (idx)
unsigned idx;
gimple *stmt = SSA_NAME_DEF_STMT (ssa);
- gcc_checking_assert (stmt && gimple_bb (stmt));
+ gcc_checking_assert (stmt);
+ if (!gimple_bb (stmt))
+ return;
// Only pre-process range-ops and phis.
if (!gimple_range_op_handler::supported_p (stmt) && !is_a<gphi *> (stmt))
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-O3" } */
+/* { dg-additional-options "-march=armv9-a" { target aarch64*-*-* } } */
+/* { dg-additional-options "-march=skylake-avx512" { target x86_64*-*-* } } */
+
+extern char a[];
+extern short b[], c[];
+extern int h[];
+void i() {
+ for (char d;;)
+ for (int e = 0; e < 9; e++) {
+ for (int f; f < 9; f += 4)
+ c[d] = 0;
+ for (int g = 0; g < 9; g += 3)
+ h[1 + d] = (a[d] ? a[3] : 7 ? b[7] : 0) / 6;
+ }
+}