#include "tree-iterator.h"
#include "tree-pass.h"
#include "tree-ssa-propagate.h"
+#include "diagnostic.h"
/* For each complex ssa name, a lattice value. We're interested in finding
;
/* If we've nothing assigned, and the value we're given is already stable,
- then install that as the value for this SSA_NAME. This pre-emptively
+ then install that as the value for this SSA_NAME. This preemptively
copy-propagates the value, which avoids unnecessary memory allocation. */
else if (is_gimple_min_invariant (value))
{
case PAIR (VARYING, ONLY_IMAG):
rr = ar;
- ri = gimplify_build2 (bsi, MINUS_EXPR, inner_type, ai, bi);
+ ri = gimplify_build2 (bsi, code, inner_type, ai, bi);
break;
case PAIR (ONLY_REAL, VARYING):
if (code == MINUS_EXPR)
goto general;
rr = br;
- ri = gimplify_build2 (bsi, MINUS_EXPR, inner_type, ai, bi);
+ ri = gimplify_build2 (bsi, code, inner_type, ai, bi);
break;
case PAIR (VARYING, VARYING):
static bool
gate_no_optimization (void)
{
- return optimize == 0;
+ /* With errors, normal optimization passes are not run. If we don't
+ lower complex operations at all, rtl expansion will abort. */
+ return optimize == 0 || sorrycount || errorcount;
}
struct tree_opt_pass pass_lower_complex_O0 =