diff options
author | Sandra Loosemore <sandra@codesourcery.com> | 2021-09-19 17:23:58 -0700 |
---|---|---|
committer | Sandra Loosemore <sandra@codesourcery.com> | 2021-09-22 17:09:29 -0700 |
commit | 8fa9e73e6db0ff05447f5547df925fdcb4733d05 (patch) | |
tree | b1d036675945e2d88c1498ea51db041f2d847f66 /gcc/fortran/check.c | |
parent | 83aac698835edcdb3e6d96b856bef1c5f92e5e24 (diff) | |
download | gcc-8fa9e73e6db0ff05447f5547df925fdcb4733d05.zip gcc-8fa9e73e6db0ff05447f5547df925fdcb4733d05.tar.gz gcc-8fa9e73e6db0ff05447f5547df925fdcb4733d05.tar.bz2 |
Fortran: Fix testcases that violate C838, + revealed ICE
The three test cases fixed in this patch violated F2018 C838, which
only allows passing an assumed-rank argument to an assumed-rank dummy.
Wrapping the call in "select rank" revealed a null pointer dereference
which is fixed by guarding the use of the result of
GFC_DECL_SAVED_DESCRIPTOR similar to what is already done elsewhere.
2021-09-19 Sandra Loosemore <sandra@codesourcery.com>
gcc/fortran/
* trans-stmt.c (trans_associate_var): Check that result of
GFC_DECL_SAVED_DESCRIPTOR is not null before using it.
gcc/testsuite/
* gfortran.dg/assumed_rank_18.f90 (g): Wrap call to h in
select rank.
* gfortran.dg/assumed_type_10.f90 (test_array): Likewise for
call to test_lib.
* gfortran.dg/assumed_type_11.f90 (test_array): Likewise.
Diffstat (limited to 'gcc/fortran/check.c')
0 files changed, 0 insertions, 0 deletions