[Bug target/57586] New: ICE when expanding volatile asm using unaligned pointer

jgreenhalgh at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Jun 11 14:24:00 GMT 2013


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57586

            Bug ID: 57586
           Summary: ICE when expanding volatile asm using unaligned
                    pointer
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jgreenhalgh at gcc dot gnu.org

Created attachment 30290
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30290&action=edit
Reduced testcase

Using built-in specs.
COLLECT_GCC=../build-arm-none-eabi/install/bin/arm-none-eabi-gcc
COLLECT_LTO_WRAPPER=/work/build-arm-none-eabi/install/libexec/gcc/arm-none-eabi/4.9.0/lto-wrapper
Target: arm-none-eabi
Configured with: /work/src/gcc/configure --target=arm-none-eabi
--prefix=/work/build-arm-none-eabi/install
--with-gmp=/work/build-arm-none-eabi/host-tools
--with-mpfr=/work/build-arm-none-eabi/host-tools
--with-mpc=/work/build-arm-none-eabi/host-tools --with-pkgversion=unknown
--disable-shared --disable-nls --disable-threads --disable-tls
--enable-checking=yes --enable-languages=c,c++ --with-newlib
Thread model: single
gcc version 4.9.0 20130326 (experimental) (unknown)

../build-arm-none-eabi/install/bin/arm-none-eabi-gcc ../testcases/pr-reduced.c
-O1
../testcases/pr-reduced.c: In function 'foo':
../testcases/pr-reduced.c:12:3: error: output number 0 not directly addressable
   __asm__ __volatile__("": "+m" (c->x) : "r" (&c->x) : );
   ^
../testcases/pr-reduced.c:12:3: internal compiler error: in
expand_asm_operands, at stmt.c:910
0x8c1be8 expand_asm_operands
    /work/oban-dev/src/gcc/gcc/stmt.c:910
0x8c28a7 expand_asm_stmt(gimple_statement_d*)
    /work/oban-dev/src/gcc/gcc/stmt.c:1151
0x5dfe5f expand_gimple_stmt_1
    /work/oban-dev/src/gcc/gcc/cfgexpand.c:2154
0x5dfe5f expand_gimple_stmt
    /work/oban-dev/src/gcc/gcc/cfgexpand.c:2309
0x5e1b69 expand_gimple_basic_block
    /work/oban-dev/src/gcc/gcc/cfgexpand.c:4143
0x5e4a33 gimple_expand_cfg
    /work/oban-dev/src/gcc/gcc/cfgexpand.c:4662
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.

No difference with -mno-unaligned-access or -maligned-access.

A manifestation of this bug prevents a Linux Kernel build.



More information about the Gcc-bugs mailing list