PR85794 shows we do not verify those.

Bootstrapped and tested on x86_64-unknown-linux-gnu, applied to trunk.

Richard.

2018-05-16  Richard Biener  <rguent...@suse.de>

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

Index: gcc/tree-cfg.c
===================================================================
--- gcc/tree-cfg.c      (revision 260280)
+++ gcc/tree-cfg.c      (working copy)
@@ -4137,6 +4137,12 @@ verify_gimple_assign_ternary (gassign *s
        }
       /* 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))
        {

Reply via email to