[Bug inline-asm/48458] New: avr: inline assembly is broken

avr at gjlay dot de gcc-bugzilla@gcc.gnu.org
Tue Apr 5 11:31:00 GMT 2011


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

           Summary: avr: inline assembly is broken
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: inline-asm
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: avr@gjlay.de


Inline assembly that used to work fine now breaks:

long val (unsigned int addr)
{
    long val;
    asm volatile ("; " : "+z" (addr), "=r" (val));
    return val;
}

compile with -S -Os

Command line avr-gcc iasm.c -S -Os -v
Using built-in specs.
COLLECT_GCC=/mnt/nfs/home/georg/gnu/install/gcc-4.6/bin/avr-gcc
COLLECT_LTO_WRAPPER=/local/gnu/install/gcc-4.6/libexec/gcc/avr/4.7.0/lto-wrapper
Target: avr
Configured with: ../../gcc.gnu.org/trunk/configure --target=avr
--prefix=/local/gnu/install/gcc-4.6 --enable-languages=c,c++ --disable-libssp
--disable-libada --disable-nls --disable-shared
Thread model: single
gcc version 4.7.0 20110404 (experimental) (GCC)
COLLECT_GCC_OPTIONS='-S' '-Os' '-v'
 /local/gnu/install/gcc-4.6/libexec/gcc/avr/4.7.0/cc1 -quiet -v iasm.c -quiet
-dumpbase iasm.c -auxbase iasm -Os -version -o iasm.s
GNU C (GCC) version 4.7.0 20110404 (experimental) (avr)
        compiled by GNU C version 4.3.2 [gcc-4_3-branch revision 141291], GMP
version 5.0.1, MPFR version 3.0.0-p8, MPC version 0.8.2
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
ignoring nonexistent directory
"/local/gnu/install/gcc-4.6/lib/gcc/avr/4.7.0/../../../../avr/sys-include"
#include "..." search starts here:
#include <...> search starts here:
 /local/gnu/install/gcc-4.6/lib/gcc/avr/4.7.0/include
 /local/gnu/install/gcc-4.6/lib/gcc/avr/4.7.0/include-fixed
 /local/gnu/install/gcc-4.6/lib/gcc/avr/4.7.0/../../../../avr/include
End of search list.
GNU C (GCC) version 4.7.0 20110404 (experimental) (avr)
        compiled by GNU C version 4.3.2 [gcc-4_3-branch revision 141291], GMP
version 5.0.1, MPFR version 3.0.0-p8, MPC version 0.8.2
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: 184db0370fcb053833cf7d160d5a7a38
iasm.c: In function 'val':
iasm.c:5:5: error: can't find a register in class 'POINTER_REGS' while
reloading 'asm'
iasm.c:5:5: error: 'asm' operand has impossible constraints

Presumably, it's because of the changes in
http://gcc.gnu.org/viewcvs?view=revision&revision=171731



More information about the Gcc-bugs mailing list