https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95980
--- Comment #18 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-10 branch has been updated by Harald Anlauf <anl...@gcc.gnu.org>: https://gcc.gnu.org/g:a3980ada1bd99cf8df22284862693088e5d1ca7c commit r10-8525-ga3980ada1bd99cf8df22284862693088e5d1ca7c Author: Harald Anlauf <anl...@gmx.de> Date: Mon Jul 6 18:58:23 2020 +0200 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)