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>
Mon, 6 Jul 2020 17:00:10 +0000 (19:00 +0200)
commitf2151227dfe90a5fe73297c370786be98b0b090f
tree78c1d2ae22e21a6a15cd25c0cda8e1a865230a46
parent824084e72e388f81015e7f67922c75f50741355a
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.
gcc/fortran/match.c
gcc/fortran/resolve.c
gcc/testsuite/gfortran.dg/pr95980.f90 [new file with mode: 0644]