Fix NULL pointer dereference in doloop_contained_function_call.
authorThomas Koenig <tkoenig@gcc.gnu.org>
Mon, 10 Aug 2020 17:10:26 +0000 (19:10 +0200)
committerThomas Koenig <tkoenig@gcc.gnu.org>
Mon, 10 Aug 2020 17:10:26 +0000 (19:10 +0200)
commita5da50ed65a835dc1ed6179e3f2b6164fd6e4969
treedc6dc107ea942f216e20d8134f0726e6dd8e14cc
parent5c64df80df274c753bfc8415bd902e1180e76f6a
Fix NULL pointer dereference in doloop_contained_function_call.

gcc/fortran/ChangeLog:

PR fortran/96556
* frontend-passes.c (doloop_contained_function_call):
Do not dereference a NULL pointer for value.function.esym.

gcc/testsuite/ChangeLog:

PR fortran/96556
* gfortran.dg/do_check_15.f90: New test.
gcc/fortran/frontend-passes.c
gcc/testsuite/gfortran.dg/do_check_15.f90 [new file with mode: 0644]