[Bug fortran/107576] [10/11/12/13 Regression] ICE in gfc_conv_procedure_call, at fortran/trans-expr.cc:6193
gscfq@t-online.de
gcc-bugzilla@gcc.gnu.org
Tue Nov 8 17:28:34 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107576
G. Steinmetz <gscfq@t-online.de> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |accepts-invalid,
| |ice-on-invalid-code
--- Comment #1 from G. Steinmetz <gscfq@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
More information about the Gcc-bugs
mailing list