The "rotl<mode>3" expanders (mode \in {HI,SI,DI}) violates synopsis by using 4 operands instead of 3. This runs in ICE in top of optabs.c:maybe_gen_insn.
The right way to do this is to use match_dup, not match_operand. So the fix is obvious. Regenerated avr-gcc and run against avr testsuite: gcc.target/avr/torture/pr41885.c generates these patterns Johann 2011-04-14 Georg-Johann Lay <a...@gjlay.de> * config/avr/avr.md ("rotlhi3", "rotlsi3", "rotldi3"): Fix expanders operand 3 from match_operand to match_dup.
Index: config/avr/avr.md =================================================================== --- config/avr/avr.md (Revision 172416) +++ config/avr/avr.md (Arbeitskopie) @@ -1521,7 +1521,7 @@ (define_expand "rotl<mode>3" [(parallel [(set (match_operand:HIDI 0 "register_operand" "") (rotate:HIDI (match_operand:HIDI 1 "register_operand" "") (match_operand:VOID 2 "const_int_operand" ""))) - (clobber (match_operand 3 ""))])] + (clobber (match_dup 3))])] "" " {