https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71103
Georg-Johann Lay <gjl at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target| |avr Status|UNCONFIRMED |NEW Known to work| |4.6.2 Keywords| |ice-on-valid-code Last reconfirmed| |2016-05-21 CC| |gjl at gcc dot gnu.org Ever confirmed|0 |1 Known to fail| |4.7.2, 4.8.0, 4.9.2, 5.2.1 Severity|major |normal --- Comment #1 from Georg-Johann Lay <gjl at gcc dot gnu.org> --- Confirmed for 5.2.1. At .expand we have ;; MEM[(struct ResponseStruct *)&D.1574 + 1B] = &response; (insn 6 5 7 (set (subreg:QI (reg:PSI 42 [ D.1574 ]) 1) (subreg:QI (symbol_ref:HI ("response") [flags 0x2] <var_decl 0x228a000 response>) 0)) foo.c:11 -1 (nil)) (insn 7 6 0 (set (subreg:QI (reg:PSI 42 [ D.1574 ]) 2) (subreg:QI (symbol_ref:HI ("response") [flags 0x2] <var_decl 0x228a000 response>) 1)) foo.c:11 -1 (nil)) hence the load of HImode &response is broken into 2 QImode leaving us with subregs of the symbol_ref. 4.6.2 does work (presumably because there was no PSImode in <= 4.6)