PR tree-optimization/92115
* tree-ssa-ifcombine.c (ifcombine_ifandif): Force condition into
temporary if it could trap.
* gcc.dg/pr92115.c: New test.
From-SVN: r277092
+2019-10-17 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/92115
+ * tree-ssa-ifcombine.c (ifcombine_ifandif): Force condition into
+ temporary if it could trap.
+
2019-10-17 Richard Biener <rguenther@suse.de>
PR debug/91887
2019-10-17 Jakub Jelinek <jakub@redhat.com>
+ PR tree-optimization/92115
+ * gcc.dg/pr92115.c: New test.
+
PR fortran/87752
* gfortran.dg/gomp/pr87752.f90: New test.
--- /dev/null
+/* PR tree-optimization/92115 */
+/* { dg-do compile } */
+/* { dg-options "-O1 -fexceptions -ffinite-math-only -fnon-call-exceptions -fsignaling-nans -fno-signed-zeros" } */
+
+void
+foo (double x)
+{
+ if (x == 0.0 && !__builtin_signbit (x))
+ __builtin_abort ();
+}
t = canonicalize_cond_expr_cond (t);
if (!t)
return false;
+ if (!is_gimple_condexpr_for_cond (t))
+ {
+ gsi = gsi_for_stmt (inner_cond);
+ t = force_gimple_operand_gsi_1 (&gsi, t, is_gimple_condexpr_for_cond,
+ NULL, true, GSI_SAME_STMT);
+ }
gimple_cond_set_condition_from_tree (inner_cond, t);
update_stmt (inner_cond);