[Bug rtl-optimization/79121] [6/7 Regression] invalid expansion of sign-extend unsigned plus left shift
rearnsha at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Jan 19 10:36:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79121
--- Comment #2 from Richard Earnshaw <rearnsha at gcc dot gnu.org> ---
Author: rearnsha
Date: Thu Jan 19 10:35:38 2017
New Revision: 244613
URL: https://gcc.gnu.org/viewcvs?rev=244613&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:
trunk/gcc/testsuite/gcc.c-torture/execute/pr79121.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/expr.c
trunk/gcc/testsuite/ChangeLog
More information about the Gcc-bugs
mailing list