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

--- Comment #1 from Georg-Johann Lay <gjl at gcc dot gnu.org> 2012-06-08 
16:48:22 UTC ---
Created attachment 27588
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27588
wek.c

And here is the source file wek.c

Compiled with the above options yields:

$ avr-gcc -c wek.c -mmcu=atmega2561 -O3 -mstrict-X
wek.c: In function 'foo':
wek.c:86:20: error: can't find a register in class 'BASE_POINTER_REGS' while
reloading 'asm'
wek.c:86:20: error: 'asm' operand has impossible constraints

At the beginning of the source you see a macro called CODE32 that is defined to
a string literal which is used as inline assembler code template.

If CODE32 is defined to a shorter string like

#define CODE32 \
  ";%2, %C1%1%A0, Z+\n\telpm %B0, Z\n\t"

the compiler passes.

By all of by understanding such an error should not depend on the length of the
inline assembler template. Thus, does this indicates a buffer overflow or
missing GTY or similar?

Notice that the %-operands / %-operand sequence is unchanged in the shorter
version of CODE32.

Reply via email to