------- Comment #18 from someone42 at gmail dot com 2008-12-31 16:05 ------- I was going to submit a new bug report but this bug sounds very similar. Here is my test case:
Code (actual assembly code removed for brevity): int thing(unsigned int a,unsigned int b) { asm("":"=mr,r"(b):"%0,0"(a / 3),"ri,g"(b)); return b; } Result: $ gcc aorir.c -S -O1 aorir.c: In function 'thing': aorir.c:3: error: 'asm' operand requires impossible reload This was tested with GCC 4.3.2 and only occurs if -O, -O1, -O2, -O3 or -Os is used. Like the opening poster, this only occurs if multiple alternatives are specified. Removing one of the alternatives makes the issue disappear (it does not matter which one is removed). Replacing "a / 3" with "a + 3" also makes the issue disappear, regardless of the number of alternatives specified. Removing "%" from the first input constraint results in: $ gcc aorir.c -S -O1 aorir.c: In function 'thing': aorir.c:5: internal compiler error: in reg_overlap_mentioned_p, at rtlanal.c:1398 Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. Changing "%0,0" to "%r,r" also makes the issue go away, however that is not an option for the assembly code I'm using. -- someone42 at gmail dot com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |someone42 at gmail dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10396