re PR fortran/92781 (ICE in convert_nonlocal_reference_op, at tree-nested.c:1065)
authorJakub Jelinek <jakub@redhat.com>
Thu, 5 Dec 2019 09:03:34 +0000 (10:03 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 5 Dec 2019 09:03:34 +0000 (10:03 +0100)
commitd0c4f314cfd1fcdf85fb8f2661a8a741447772f8
tree9c926dee521afc347ac9aed2262e27ebdae29077
parentad774d0d6351789e9e412291cf280c8e3f72bf81
re PR fortran/92781 (ICE in convert_nonlocal_reference_op, at tree-nested.c:1065)

PR fortran/92781
* trans-decl.c (gfc_get_symbol_decl): If sym->backend_decl is
current_function_decl, add length to current rather than parent
function and expect DECL_CONTEXT (length) to be current_function_decl.

* gfortran.dg/pr92781.f90: New test.

From-SVN: r278988
gcc/fortran/ChangeLog
gcc/fortran/trans-decl.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/pr92781.f90 [new file with mode: 0644]