https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107576
G. Steinmetz <gs...@t-online.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |accepts-invalid, | |ice-on-invalid-code --- Comment #1 from G. Steinmetz <gs...@t-online.de> --- Variant z2.f90 with reversed order always compiles, for every tested release, with and without -std=legacy : (but no explicit interface, so error expected) $ cat z2.f90 program p integer, pointer :: z(:) => null() call s(null(z)) call s(z) end $ gfortran-13-20221106 -c z2.f90 $ gfortran-13-20221106 -c z2.f90 -std=legacy Test cases with an explicit interface and specified pointer dummy (ok) : $ cat z1c.f90 program p integer, pointer :: z(:) => null() call s(z) call s(null(z)) contains subroutine s(x) integer, pointer :: x(:) end end $ cat z2c.f90 program p integer, pointer :: z(:) => null() call s(null(z)) call s(z) contains subroutine s(x) integer, pointer :: x(:) end end