http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54983
Bug #: 54983 Summary: ARM gcc creates invalid assembly: bad immediate value for 8-bit offset (1024) Classification: Unclassified Product: gcc Version: 4.6.3 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassig...@gcc.gnu.org ReportedBy: hec...@gmail.com Created attachment 28488 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28488 Includes a .config to build the v3.7-rc1 kernel and the --save-temps file The bug appeared on new linux ARM kernel versions and I cite here a kernel maintainer responding to my patch submission: "Hi, I used to be able to compile MTD stuff for mackerel board with the defconfig attached, but now it fails with 3.7-rc1 with as error: /tmp/cc2Nr7AN.s: Error: bad immediate value for 8-bit offset (1024) It fails for dogc4.c, but if I disable DOCG4, it fails for other drivers with a similar error. I've tried (arm) gcc 4.6.3 and the latest Linaro 4.7 build." In order to reproduce the bug, please get a repository of the kernel and checkout "v3.7-rc1" and use the attached .config. The bug happens when building the modules. I'm sorry but I see no way figuring out all the dependencies of a kernel build to supply a more compact way to test this. I used make -j16 ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- modules and get the error: /tmp/ccwLMdCy.s: Assembler messages: /tmp/ccwLMdCy.s: Error: bad immediate value for 8-bit offset (2048) make[3]: *** [drivers/mtd/nand/docg4.o] Error 1 # arm-linux-gnueabi-gcc -v Using built-in specs. COLLECT_GCC=arm-linux-gnueabi-gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabi/4.6/lto-wrapper Target: arm-linux-gnueabi Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.6.3-1ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/arm-linux-gnueabi/include/c++/4.6.3 --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --enable-multilib --disable-sjlj-exceptions --with-arch=armv7-a --with-float=softfp --with-fpu=vfpv3-d16 --with-mode=thumb --disable-werror --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=arm-linux-gnueabi --program-prefix=arm-linux-gnueabi- --includedir=/usr/arm-linux-gnueabi/include --with-headers=/usr/arm-linux-gnueabi/include --with-libs=/usr/arm-linux-gnueabi/lib Thread model: posix gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) Best, Bastian Hecht