[Bug fortran/95398] ICE on invalid code
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Sep 1 13:58:21 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95398
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Mark Eggleston
<markeggleston@gcc.gnu.org>:
https://gcc.gnu.org/g:84b14e9cd4e05c926a75e8e97ee57dbd3350e752
commit r10-8697-g84b14e9cd4e05c926a75e8e97ee57dbd3350e752
Author: Mark Eggleston <markeggleston@gcc.gnu.org>
Date: Mon Jun 1 08:15:31 2020 +0100
Fortran : ICE on invalid code PR95398
The CLASS_DATA macro is used to shorten the code accessing the derived
components of an expressions type specification. If the type is not
BT_CLASS the derived pointer is NULL resulting in an ICE. To avoid
dereferencing a NULL pointer the type should be BT_CLASS.
2020-09-01 Steven G. Kargl <kargl@gcc.gnu.org>
gcc/fortran
PR fortran/95398
* resolve.c (resolve_select_type): Add check for BT_CLASS
type before using the CLASS_DATA macro which will have a
NULL pointer to derive components if it isn't BT_CLASS.
2020-09-01 Mark Eggleston <markeggleston@gcc.gnu.org>
gcc/testsuite
PR fortran/95398
* gfortran.dg/pr95398.f90: New test.
(cherry picked from commit 3d137b75febd1a4ad70bcc64e0f79198f5571b86)
More information about the Gcc-bugs
mailing list