Created attachment 24009 [details] minimized test case Compiling the attached file leads to ICE with a GCC 4.6.0 ARM cross-compiler. It uses inline asm with %c and an element of a structure. If the referenced "state" element is made the first element of the structure, the file compiles successfully. ~/tmp$ ~/x-tools/arm-unknown-eabi/bin/arm-unknown-eabi-gcc -c test.c test.c: In function 'test': test.c:25:1: internal compiler error: in arm_print_operand, at config/arm/arm.c:16147 Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. ~/tmp$ ~/x-tools/arm-unknown-eabi/bin/arm-unknown-eabi-gcc -v Using built-in specs. COLLECT_GCC=/home/rabin/x-tools/arm-unknown-eabi/bin/arm-unknown-eabi-gcc COLLECT_LTO_WRAPPER=/home/rabin/x-tools/arm-unknown-eabi/libexec/gcc/arm-unknown-eabi/4.6.0/lto-wrapper Target: arm-unknown-eabi Configured with: /home/rabin/dev/crosstool-ng/.build/src/gcc-4.6.0/configure --build=x86_64-build_unknown-linux-gnu --host=x86_64-build_unknown-linux-gnu --target=arm-unknown-eabi --prefix=/home/rabin/x-tools/arm-unknown-eabi --with-local-prefix=/home/rabin/x-tools/arm-unknown-eabi/arm-unknown-eabi/sysroot --disable-multilib --disable-libmudflap --with-sysroot=/home/rabin/x-tools/arm-unknown-eabi/arm-unknown-eabi/sysroot --with-newlib --enable-threads=no --disable-shared --with-pkgversion=crosstool-NG-hg_default@2404_8988576c491a --with-arch=armv5 --disable-__cxa_atexit --with-gmp=/home/rabin/dev/crosstool-ng/.build/arm-unknown-eabi/build/static --with-mpfr=/home/rabin/dev/crosstool-ng/.build/arm-unknown-eabi/build/static --with-mpc=/home/rabin/dev/crosstool-ng/.build/arm-unknown-eabi/build/static --with-ppl=no --with-cloog=no --with-libelf=no --disable-lto --with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm' --disable-nls --enable-symvers=gnu --enable-languages=c Thread model: single gcc version 4.6.0 (crosstool-NG-hg_default@2404_8988576c491a)
Created attachment 24010 [details] reduced test case Further reduced test case. "asm goto" is not needed, "%c0" suffices. ICEs gcc-4.3.5, 4.4.5, 4.5.2, and 4.7-20110409.
Confirmed. The back-end doesn't currently know how to handle symbol+offset in %c.
Author: rearnsha Date: Mon Jun 27 21:09:25 2011 New Revision: 175565 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=175565 Log: PR target/48637 * arm.c (arm_print_operand): Allow sym+offset. Don't abort on invalid asm operands. Modified: trunk/gcc/ChangeLog trunk/gcc/config/arm/arm.c
Fixed on trunk