Fortran: error handling of global entity appearing in COMMON block [PR103259]
commit7e9f20f5517429cfaadec14d6b04705e59078565
authorSteve Kargl <kargl@gcc.gnu.org>
Tue, 7 Feb 2023 19:18:42 +0000 (7 20:18 +0100)
committerHarald Anlauf <anlauf@gmx.de>
Wed, 8 Feb 2023 18:02:21 +0000 (8 19:02 +0100)
tree1cfd49bec6d5cb5459b9e027b305f1bc9f27931a
parent6ad1c1027628f094260037536f6b6fcdb63b5add
Fortran: error handling of global entity appearing in COMMON block [PR103259]

gcc/fortran/ChangeLog:

PR fortran/103259
* resolve.cc (resolve_common_vars): Avoid NULL pointer dereference
when a symbol's location is not set.

gcc/testsuite/ChangeLog:

PR fortran/103259
* gfortran.dg/pr103259.f90: New test.
gcc/fortran/resolve.cc
gcc/testsuite/gfortran.dg/pr103259.f90 [new file with mode: 0644]