summaryrefslogtreecommitdiff
path: root/gcc/tree-complex.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-complex.c')
-rw-r--r--gcc/tree-complex.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/tree-complex.c b/gcc/tree-complex.c
index a675f0aa136..b72c37e7e78 100644
--- a/gcc/tree-complex.c
+++ b/gcc/tree-complex.c
@@ -31,6 +31,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#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
@@ -1566,7 +1567,9 @@ tree_lower_complex_O0 (void)
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 =