From 9776e6920dec9aa23adbdd7f0c264804c7fe6fdf Mon Sep 17 00:00:00 2001 From: Bernd Schmidt Date: Thu, 21 Jan 2016 18:10:03 +0000 Subject: Fix PR66178, ICE due to misexpansion of constant expressions involving labels. PR middle-end/66178 * expr.c (expand_expr_real_2) [PLUS_EXPR, MINUS_EXPR]: Don't drop EXPAND_INITIALIZER. * rtl.h (contains_symbolic_reference_p): Declare. * rtlanal.c (contains_symbolic_reference_p): New function. * simplify-rtx.c (simplify_binary_operation_1): Don't turn a subtraction into a NOT if symbolic constants are involved. testsuite/ PR middle-end/66178 gcc.dg/torture/pr66178.c: New test. From-SVN: r232689 --- gcc/rtl.h | 1 + 1 file changed, 1 insertion(+) (limited to 'gcc/rtl.h') diff --git a/gcc/rtl.h b/gcc/rtl.h index 515fdee..2f5be5f 100644 --- a/gcc/rtl.h +++ b/gcc/rtl.h @@ -2931,6 +2931,7 @@ extern void set_insn_deleted (rtx); extern rtx single_set_2 (const rtx_insn *, const_rtx); extern bool contains_symbol_ref_p (const_rtx); +extern bool contains_symbolic_reference_p (const_rtx); /* Handle the cheap and common cases inline for performance. */ -- cgit v1.1