The following fixes an oversight in the last change to
compute_control_dep_chain where we have to return whether we found
a chain.
PR tree-optimization/106844
* gimple-predicate-analysis.cc (compute_control_dep_chain):
Return whether we found a chain.
* gcc.dg/pr106844.c: New testcase.
if (dump_file)
fprintf (dump_file, "param_uninit_control_dep_attempts "
"exceeded: %u\n", *num_calls);
- return false;
+ break;
}
++*num_calls;
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-O -Wuninitialized --param uninit-control-dep-attempts=1" } */
+
+struct {
+ int count;
+ int array[8];
+} fde_merge_v1;
+
+void
+fde_merge_i2() {
+ unsigned i1;
+ do
+ while (i1 && fde_merge_v1.array[i1 - 1]) /* { dg-warning "uninitialized" } */
+ i1--;
+ while (fde_merge_i2);
+}