https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87511
--- Comment #4 from Wilco <wilco at gcc dot gnu.org> --- Author: wilco Date: Tue Oct 16 13:40:57 2018 New Revision: 265195 URL: https://gcc.gnu.org/viewcvs?rev=265195&root=gcc&view=rev Log: [AArch64] Fix PR87511 As mentioned in PR87511, the shift used in aarch64_mask_and_shift_for_ubfiz_p should be evaluated as a HOST_WIDE_INT rather than int. Backported from mainline gcc/ PR target/87511 * config/aarch64/aarch64.c (aarch64_mask_and_shift_for_ubfiz_p): Use HOST_WIDE_INT_1U for shift. testsuite/ PR target/87511 * gcc.target/aarch64/pr87511.c: Add new test. Added: branches/gcc-7-branch/gcc/testsuite/gcc.target/aarch64/pr87511.c Modified: branches/gcc-7-branch/gcc/ChangeLog branches/gcc-7-branch/gcc/config/aarch64/aarch64.c branches/gcc-7-branch/gcc/testsuite/ChangeLog