armel: incorrect immediate for movt
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Linaro GCC |
Fix Released
|
Medium
|
Ramana Radhakrishnan | ||
Linaro GCC Tracking |
Fix Released
|
Undecided
|
Ramana Radhakrishnan | ||
gcc |
Fix Released
|
Medium
|
|||
gcc-4.5 (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: gcc-4.5
firebird2.1 FTBFS with gcc 4.5
http://
g++ -g -O2 -DTERMINATE_
In file included from ../src/
../src/
{standard input}: Assembler messages:
{standard input}:1964: Error: immediate value out of range -- `movt r1,-1'
It only occurs at -O3 and gcc 4.5
The same command line works with either gcc 4.4 or -O2
Related branches
- Andrew Stubbs (community): Approve
Changed in gcc-4.5 (Ubuntu): | |
status: | New → Incomplete |
Changed in gcc-4.5 (Ubuntu): | |
status: | Incomplete → New |
Changed in gcc: | |
importance: | Unknown → Medium |
status: | Unknown → In Progress |
Changed in gcc-linaro: | |
status: | Triaged → In Progress |
Changed in gcc-linaro: | |
status: | Fix Committed → Fix Released |
Changed in gcc-linaro-tracking: | |
milestone: | 4.7.0 → 4.6.0 |
status: | New → Fix Released |
tags: | added: 46merge |
Changed in gcc: | |
status: | In Progress → Fix Released |
Created attachment 22618
a module
When compiling the attached file the compiler does not warn, but the assambler gives the following error: 1\tkr\LOKALE~ 1\Temp\ ccqr1SmQ. s: Assembler messages: 1\tkr\LOKALE~ 1\Temp\ ccqr1SmQ. s:522: Error: immediate value out of range -- `movt r3,-32768' u_16_values. u_16_value_ 1=0x8000u; " causes the error.
C:\DOKUME~
C:\DOKUME~
The line "dwCalcVal.
It looks to me like a singned-unsigned fault and in fact it is so. reducing the constant to a value 0x0000 till 0x7FFF will compile without error.
The problem appears also only when:
- the value is at the stack (local)
- the second value in struct is used (u_16_value_0 works fine).
GCC v 4.3.3 also works fine on the same code.
Configuarion: eabi-gcc. exe -v GCC=arm- none-eabi- gcc.exe LTO_WRAPPER= c:/temp/ codesourcery/ bin/../ libexec/ gcc/arm- none-eabi/ 4.5.1/lto- wrapper. exe julian/ 2010q3- release- eabi-lite/ src/gcc- 4.5-2010. 09/configure --build= i686-pc- linux-gnu --host=i686-mingw32 --target= arm-none- eabi --enable-threads --disable- libmudflap --disable-libssp --disable- libstdcxx- pch --enable- extra-sgxxlite- multilibs --with-gnu-as --with-gnu-ld --with- specs=' %{save- temps: -fverbose-asm} -D__CS_ SOURCERYGXX_ MAJ__=2010 -D__CS_ SOURCERYGXX_ MIN__=9 -D__CS_ SOURCERYGXX_ REV__=51 %{O2:%{ !fno-remove- local-statics: -fremove- local-statics} } %{O*:%{ O|O0|O1| O2|Os:; :%{!fno- remove- local-statics: -fremove- local-statics} }}' --enable- languages= c,c++ --disable-s pkgversion= 'Sourcery G++ Lite 2010.09-51' --with-bugurl=https:/ /support. codesourcery. com/GNUToolchai n/ --disable-nls --prefix= /opt/codesource ry --with-headers=yes --with- sysroot= /opt/codesource ry/arm- none-eabi --with- build-sysroot= /scratch/ julian/ 2010q3- release- eabi-lite/ install/ host-i686- mingw32/ arm-none- eabi --with- libiconv- prefix= /scratch/ julian/ 2010q3- release- eabi-lite/ obj/host- libs-2010. 09-51-arm- none-eabi- i686-mingw32/ usr --with- gmp=/scratch/ julian/ 2010q3- release- eabi-lite/ obj/host- libs-2010. 09-51-arm- none-eabi- i686-mingw32/ usr --with- mpfr=/scratch/ julian/ 2010q3- release- eabi-lite/ obj/host- libs-2010. 09-51-arm- none-eabi- i686-mingw32/ usr --with- mpc=/scratch/ julian/ 2010q3- release- eabi-lite/ obj/host- libs-2010. 09-51-arm- none-eabi- i686-mingw32/ usr --with- ppl=/scratch/ julian/ 2010q3- release- eabi-lite/ obj/host- libs-2010. 09-51-arm- none-eabi- i686-mingw32/ usr --with- host-libstdcxx= '-static- libgcc -Wl,-Bstatic,-lst dc++,-Bdynamic -lm' --with- cloog=/ scratch/ julian/ 2010q3- release- eabi-lite/ obj/host- libs-2010. 09-51-arm- none-eabi- i686-mingw32/ usr --with- libelf= /scratch/ julian/ 2010q3- release- eabi-lite/ obj/host- libs-2010. 09-51-arm- none-eabi- i686-mingw32/ usr --disable-libgomp --enable- poison- system- directories --with- build-time- tools=/ scratch/ julian/ 2010q3- release- eabi-lite/ obj/tools- i686-pc- linux-gnu- 2010.09- 51-arm- none-eabi- i686-mingw32/ arm-none- eabi/bin --with- build-time- tools=/ scratch/ julian/ 2010q3- release- eabi-lite/ obj/tools- i686-pc- linux-gnu- 2010.09- 51-arm- none-eabi- i686-mingw32/ arm-none- eabi/bin
-------------
PC Windows XP with Codesourcery, Target STM32F103 ARM-Controller
>arm-none-
Using built-in specs.
COLLECT_
COLLECT_
Target: arm-none-eabi
Configured with: /scratch/
hared --enable-lto --with-newlib --with-
Thread model: single
gcc version 4.5.1 (Sourc...