https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107075
anlauf at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed| |2022-09-28 Ever confirmed|0 |1 Status|UNCONFIRMED |NEW --- Comment #1 from anlauf at gcc dot gnu.org --- Confirmed. Small variation: program p implicit none integer, target :: a(3) ! save :: a a = [1, 2, 3] block integer, pointer :: z => a(2) z = 7 end block end Uncommenting the 'save' also avoids the ICE, as does adding -fno-automatic .