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

--- Comment #4 from Richard Earnshaw <rearnsha at gcc dot gnu.org> ---
Author: rearnsha
Date: Fri Jan 20 11:43:58 2017
New Revision: 244702

URL: https://gcc.gnu.org/viewcvs?rev=244702&root=gcc&view=rev
Log:
    [expand] Fix for PR rtl-optimization/79121 incorrect expansion of extend
plus left shift

    When generating a shift from an extended value moving from one to two
    machine registers, the type of the right shift is for the most
    significant word should be determined by the signedness of the inner
    type, not the signedness of the result type.

    gcc:
        PR rtl-optimization/79121
        * expr.c (expand_expr_real_2, case LSHIFT_EXPR): Look at the signedness
        of the inner type when shifting an extended value.

    gcc/testsuite:
        * gcc.c-torture/execute/pr79121.c: New test.


Added:
    branches/gcc-6-branch/gcc/testsuite/gcc.c-torture/execute/pr79121.c
Modified:
    branches/gcc-6-branch/gcc/ChangeLog
    branches/gcc-6-branch/gcc/expr.c
    branches/gcc-6-branch/gcc/testsuite/ChangeLog

Reply via email to