]> git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/fortran/primary.cc
Fortran: allow NULL() for POINTER, OPTIONAL, CONTIGUOUS dummy [PR111503]
authorHarald Anlauf <anlauf@gmx.de>
Fri, 8 Dec 2023 12:57:31 +0000 (13:57 +0100)
committerHarald Anlauf <anlauf@gmx.de>
Sun, 10 Dec 2023 19:24:53 +0000 (20:24 +0100)
commit99c5fa3ba6b5f54a7d632bd9da0e07dd85a4b669
treec1e56fd918f0610aba2411db0a61909740195068
parent1e462fb480d38de5f9a4578bbe5c5bc66a01a9ed
Fortran: allow NULL() for POINTER, OPTIONAL, CONTIGUOUS dummy [PR111503]

gcc/fortran/ChangeLog:

PR fortran/111503
* expr.cc (gfc_is_simply_contiguous): Determine characteristics of
NULL() from optional MOLD argument, otherwise treat as contiguous.
* primary.cc (gfc_variable_attr): Derive attributes of NULL(MOLD)
from MOLD.

gcc/testsuite/ChangeLog:

PR fortran/111503
* gfortran.dg/contiguous_14.f90: New test.
gcc/fortran/expr.cc
gcc/fortran/primary.cc
gcc/testsuite/gfortran.dg/contiguous_14.f90 [new file with mode: 0644]