[PATCH fortran/95342] - [9/10/11 Regression] ICE in gfc_match_subroutine, at fortran/decl.c:7913
Harald Anlauf
anlauf@gmx.de
Thu Nov 26 21:25:53 GMT 2020
Dear all,
two almost obvious, trivial issues issues with NULL pointer dereferences.
Steve found the locations, but his solution changes the error messages
as compared to 7/8. I've chosen the conservative way which keeps the
documented intent of the source code.
Regtested on x86_64-pc-linux-gnu.
OK for master? Backport to affected 10- and 9-branches?
(8.4.1 was/is fine).
Thanks,
Harald
PR fortran/95342 - ICE in gfc_match_subroutine, at fortran/decl.c:7913
Add checks for NULL pointers before dereferencing them.
gcc/fortran/ChangeLog:
PR fortran/95342
* decl.c (gfc_match_function_decl): Avoid NULL pointer dereference.
(gfc_match_subroutine): Likewise.
gcc/testsuite/ChangeLog:
PR fortran/95342
* gfortran.dg/pr95342.f90: New test.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr95342.patch
Type: text/x-patch
Size: 1635 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20201126/947f67ed/attachment.bin>
More information about the Gcc-patches
mailing list