ICE on a | (b << negative-constant)
Bug #836401 reported by
Michael Hope
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Linaro GCC |
Fix Released
|
High
|
Andrew Stubbs | ||
4.6 |
Fix Released
|
High
|
Andrew Stubbs | ||
4.6-2011.07-stable |
Won't Fix
|
High
|
Michael Hope | ||
Linaro GCC Tracking |
Fix Committed
|
Undecided
|
Unassigned | ||
gcc |
Fix Released
|
Medium
|
|||
gcc-4.6 (Debian) |
Fix Released
|
Unknown
|
Bug Description
See the upstream bug for more. Appears when building libvorbis and llvm.
Related branches
lp://staging/~ams-codesourcery/gcc-linaro/lp836401-4.6
- Ulrich Weigand (community): Approve
-
Diff: 108 lines (+74/-3)2 files modifiedgcc/config/arm/predicates.md (+11/-3)
gcc/testsuite/gcc.target/arm/shiftable.c (+63/-0)
Changed in gcc: | |
importance: | Unknown → Medium |
status: | Unknown → New |
Changed in gcc-linaro: | |
assignee: | nobody → Andrew Stubbs (ams-codesourcery) |
Changed in gcc: | |
status: | New → In Progress |
Changed in gcc-linaro: | |
status: | Triaged → In Progress |
milestone: | none → 4.6-2011.09 |
Changed in gcc-linaro: | |
status: | Fix Committed → Fix Released |
Changed in gcc: | |
status: | In Progress → Fix Released |
Changed in gcc-4.6 (Debian): | |
status: | Unknown → Confirmed |
Changed in gcc-4.6 (Debian): | |
status: | Confirmed → Fix Released |
To post a comment you must log in.
trunk r178025, 4.6.1, and 4.5.3 all ICE with unsatisfied constraints on the following code:
int foo(int a, int b)
{
return a | (b << -3);
}
shift.c: In function 'foo':
(const_ int -3 [0xffffffffffff fffd])) list:REG_ DEAD (reg:SI 1 r1 [ b ]) constrain_ insn_cached, at recog.c:2030
shift.c:3:5: warning: left shift count is negative [enabled by default]
shift.c:4:1: error: insn does not satisfy its constraints:
(insn 14 9 17 2 (set (reg/i:SI 0 r0)
(ior:SI (ashift:SI (reg:SI 1 r1 [ b ])
(reg:SI 0 r0 [ a ]))) shift.c:4 259 {*arith_shiftsi}
(expr_
(nil)))
shift.c:4:1: internal compiler error: in extract_
This happens with -mcpu=cortex-a9 -mthumb. With -marm, GCC recognises that the shift is unusual, loads it into a register, then uses this in the register- shifted- register form of ORR. This form isn't available in Thumb-2.
The problem was originally seen in libtheora: lib/mathops. c when built with -O3 -funroll-loops when a shift by negative 8 is generated.