* gcc-interface/trans.c (emit_check): Put back a final save_expr
to prevent exponential expansion during gimplification.
From-SVN: r141885
+2008-11-15 Geert Bosch <bosch@adacore.com>
+
+ * gcc-interface/trans.c (emit_check): Put back a final save_expr
+ to prevent exponential expansion during gimplification.
+
2008-11-15 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/lang-specs.h: Expand -coverage and reorder switches.
we don't need to evaluate it just for the check. */
TREE_SIDE_EFFECTS (gnu_result) = TREE_SIDE_EFFECTS (gnu_expr);
- return gnu_result;
+ /* ??? Unfortunately, if we don't put a SAVE_EXPR around this whole thing,
+ we will repeatedly do the test and, at compile time, we will repeatedly
+ visit it during unsharing, which leads to an exponential explosion. */
+ return save_expr (gnu_result);
}
\f
/* Return an expression that converts GNU_EXPR to GNAT_TYPE, doing