tree-cfg.c (verify_gimple_assign_ternary): Properly verify the [VEC_]COND_EXPR embedd...
authorRichard Biener <rguenther@suse.de>
Wed, 16 May 2018 10:22:52 +0000 (10:22 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Wed, 16 May 2018 10:22:52 +0000 (10:22 +0000)
2018-05-16  Richard Biener  <rguenther@suse.de>

* tree-cfg.c (verify_gimple_assign_ternary): Properly
verify the [VEC_]COND_EXPR embedded comparison.

From-SVN: r260283

gcc/ChangeLog
gcc/tree-cfg.c

index 80097cbd96f5bbeca1d7cd6a4b730bb255896a25..1f67c9b651f6857a9f4cad6cc6e3e907fd54b919 100644 (file)
@@ -1,3 +1,8 @@
+2018-05-16  Richard Biener  <rguenther@suse.de>
+
+       * tree-cfg.c (verify_gimple_assign_ternary): Properly
+       verify the [VEC_]COND_EXPR embedded comparison.
+
 2018-05-15  Martin Sebor  <msebor@redhat.com>
 
        PR tree-optimization/85753
index 2ada965edd61689af35896ccc7c1536d98a6dc62..7f48d2dbe6587048fc31efaf0f1a446999c68a76 100644 (file)
@@ -4137,6 +4137,12 @@ verify_gimple_assign_ternary (gassign *stmt)
        }
       /* Fallthrough.  */
     case COND_EXPR:
+      if (!is_gimple_val (rhs1)
+         && verify_gimple_comparison (TREE_TYPE (rhs1),
+                                      TREE_OPERAND (rhs1, 0),
+                                      TREE_OPERAND (rhs1, 1),
+                                      TREE_CODE (rhs1)))
+       return true;
       if (!useless_type_conversion_p (lhs_type, rhs2_type)
          || !useless_type_conversion_p (lhs_type, rhs3_type))
        {