]> git.ipfire.org Git - thirdparty/gcc.git/commit
PR fortran/95980 - ICE on using sync images with -fcheck=bounds
authorHarald Anlauf <anlauf@gmx.de>
Mon, 6 Jul 2020 16:58:23 +0000 (18:58 +0200)
committerHarald Anlauf <anlauf@gmx.de>
Thu, 23 Jul 2020 20:07:42 +0000 (22:07 +0200)
commita3980ada1bd99cf8df22284862693088e5d1ca7c
tree3f696ce978f4c145bb11bd831285b938762a0701
parent6dd74062d215682e1f9b3ca618a9d38585dd4831
PR fortran/95980 - ICE on using sync images with -fcheck=bounds

In SELECT TYPE, the argument may be an incorrectly specified unlimited
polymorphic variable.  Avoid a NULL pointer dereference for clean error
recovery.

gcc/fortran/
PR fortran/95980
* match.c (copy_ts_from_selector_to_associate, build_class_sym):
Distinguish between unlimited polymorphic and ordinary variables
to avoid NULL pointer dereference.
* resolve.c (resolve_select_type):
Distinguish between unlimited polymorphic and ordinary variables
to avoid NULL pointer dereference.

(cherry picked from commit f2151227dfe90a5fe73297c370786be98b0b090f)
gcc/fortran/match.c
gcc/fortran/resolve.c
gcc/testsuite/gfortran.dg/pr95980.f90 [new file with mode: 0644]