I can reliably produce an ICE with a source file with gcc 3.4.4 on m68k-elf. I have stripped down the preprocessed source file considerably from the original, and pretty much as far as I can go. My investigation appears to show it is dependent on -funit-at-a-time which is why it is not constrained to a single function. It can be reproduced when compiled with: m68k-elf-gcc -c -m5200 -O1 -funit-at-a-time parse.c which outputs: parse.c: In function `read_module': parse.c:149: error: insn does not satisfy its constraints: (insn 361 630 362 36 parse.c:37 (set (mem/s/j:SI (plus:SI (reg:SI 8 %a0) (const_int 8 [0x8])) [0 <variable>.hint+0 S4 A16]) (mem:SI (plus:SI (reg/f:SI 14 %a6) (reg:SI 0 %d0)) [0 hint+0 S4 A16])) 26 {*m68k.md:760} (nil) (nil)) parse.c:149: internal compiler error: in reload_cse_simplify_operands, at postreload.c:391 An earlier version of the sources could reproduce it at -O2, but this stripped one only now does it with -O1 -funit-at-a-time. It is highly dependent on just about every line of the input file. I would not be at all surprised if it was not reproduceable on a heavily modified 3.4.4 or on 4.0.0, which doesn't mean the problem is necessarily fixed. I have tried the patch from bug 18421 without effect.
Created attachment 9080 [details] Stripped down source file to reproduce problem Compile with: m68k-elf-gcc -c -m5200 -O1 -funit-at-a-time parse.c Note that this source no longer makes logical sense in what it does, due to my efforts to reduce the size. But it is still valid code.
Oh, one interesting aspect is that the failure is even dependent on some of the numbers in the switch statement. For example, if the penultimate number is 105 instead of 106 it compiles okay.
Oh, one more thing. The original version of the code, ICE'd on a slightly different constraint: (insn 1533 4485 1534 187 /home/jlarmour/ecos/ecospro-common-040929-branch/packages/net/snmp/lib/current/src/parse.c:3505 (set (mem/s/j:QI (plus:SI (reg/f:SI 8 %a0 [256]) (const_int 8 [0x8])) [0 <variable>.isimplied+0 S1 A32]) (mem:QI (plus:SI (reg/f:SI 14 %a6) (reg:SI 10 %a2)) [0 nextIsImplied+0 S1 A8])) 33 {*m68k.md:826} (insn_list 1532 (nil)) (nil)) /home/jlarmour/ecos/ecospro-common-040929-branch/packages/net/snmp/lib/current/src/parse.c:3081: internal compiler error: in reload_cse_simplify_operands, at postreload.c:391 In the above, it is the insn at m68k.md:826 that appears not to have the right constraints. If it is helpful, I can attach the preprocessed version of parse.c that causes the above ICE, but be warned that it is 9041 lines.
Not reproducible on mainline.