new file mode 100644
@@ -0,0 +1,21 @@
+/* { dg-do compile } */
+/* { dg-options "-O3" } */
+
+int rl2_decode_png_bit_depth;
+int *rl2_decode_png_p_data;
+void png_destroy_read_struct ();
+int __attribute__((returns_twice)) _setjmp ();
+void rl2_decode_png_row_pointers()
+{
+ unsigned sample_type = 0;
+ _setjmp();
+ switch (rl2_decode_png_bit_depth)
+ case 6:
+ sample_type = 7;
+ png_destroy_read_struct();
+ for (;;)
+ switch (sample_type)
+ case 3:
+ case 5:
+ *rl2_decode_png_p_data;
+}
@@ -494,8 +494,7 @@ find_unswitching_predicates_for_bb (basic_block bb, class loop *loop,
{
unsigned nlabels = gimple_switch_num_labels (stmt);
tree idx = gimple_switch_index (stmt);
- if (TREE_CODE (idx) != SSA_NAME
- || nlabels < 1)
+ if (!gimple_range_ssa_p (idx) || nlabels < 1)
return;
/* Index must be invariant. */
def = SSA_NAME_DEF_STMT (idx);