PR middle-end/67512
* tree-ssa-uninit.c (pred_equal_p): Only call invert_tree_comparison
for comparisons.
* gcc.dg/pr67512.c: New test.
From-SVN: r227594
+2015-09-09 Marek Polacek <polacek@redhat.com>
+
+ PR middle-end/67512
+ * tree-ssa-uninit.c (pred_equal_p): Only call invert_tree_comparison
+ for comparisons.
+
2015-09-09 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/53184
+2015-09-09 Marek Polacek <polacek@redhat.com>
+
+ PR middle-end/67512
+ * gcc.dg/pr67512.c: New test.
+
2015-09-09 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/53184
--- /dev/null
+/* PR middle-end/67512 */
+/* { dg-do compile } */
+/* { dg-options "-O -Wuninitialized" } */
+
+extern int fn2 (void);
+extern int fn3 (int);
+void
+fn1 (void)
+{
+ int z, m;
+ if (1 & m) /* { dg-warning "is used uninitialized" } */
+ z = fn2 ();
+ z = 1 == m ? z : 2 == m;
+ fn3 (z);
+}
return false;
c1 = x1.cond_code;
- if (x1.invert != x2.invert)
+ if (x1.invert != x2.invert
+ && TREE_CODE_CLASS (x2.cond_code) == tcc_comparison)
c2 = invert_tree_comparison (x2.cond_code, false);
else
c2 = x2.cond_code;