https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66178

--- Comment #8 from Bernd Schmidt <bernds at gcc dot gnu.org> ---
Author: bernds
Date: Thu Jan 21 18:10:03 2016
New Revision: 232689

URL: https://gcc.gnu.org/viewcvs?rev=232689&root=gcc&view=rev
Log:
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.


Added:
    trunk/gcc/testsuite/gcc.dg/torture/pr66178.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/expr.c
    trunk/gcc/rtl.h
    trunk/gcc/rtlanal.c
    trunk/gcc/simplify-rtx.c
    trunk/gcc/testsuite/ChangeLog

Reply via email to