https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66244
--- Comment #1 from Gerhard Steinmetz <gerhard.steinmetz.fort...@t-online.de> --- Perhaps it's better to make the target array a bit larger. And to provide a not so minimalistic version : program p integer, target :: a(4) integer, pointer :: z => a(3) call s contains subroutine s a = 123 z = 0 print *, a print *, z end end yields : f951: internal compiler error: in lhd_set_decl_assembler_name, at langhooks.c:179 --- Whereas this modification compiles and works as expected : $ cat z92.f90 program p integer, target :: a(4) integer, pointer :: z z => a(3) call s contains subroutine s a = 123 z = 0 print *, a print *, z end end $ gfortran -g -O0 -Wall -fcheck=all -fno-frontend-optimize z92.f90 $ a.out 123 123 0 123 0