diff options
author | Tobias Burnus <tobias@codesourcery.com> | 2019-12-10 10:32:12 +0000 |
---|---|---|
committer | Tobias Burnus <burnus@gcc.gnu.org> | 2019-12-10 11:32:12 +0100 |
commit | 9995ce07f190d963ec52f52697ccc155dd079568 (patch) | |
tree | 7e8ad8c2c68ee9350a70f95aa17733dbc3fd61cc /gcc/fortran/trans-array.c | |
parent | c175aa77aa8a4ba1d950f2db8c66cee004888212 (diff) | |
download | gcc-9995ce07f190d963ec52f52697ccc155dd079568.zip gcc-9995ce07f190d963ec52f52697ccc155dd079568.tar.gz gcc-9995ce07f190d963ec52f52697ccc155dd079568.tar.bz2 |
Fortran] PR 92872 – Fix get_CFI_desc
PR fortran/92872
* trans-array.c (get_CFI_desc): Fix cond whether saved desc exists.
PR fortran/92872
* gfortran.dg/bind_c_optional-1.f90: New.
From-SVN: r279160
Diffstat (limited to 'gcc/fortran/trans-array.c')
-rw-r--r-- | gcc/fortran/trans-array.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/fortran/trans-array.c b/gcc/fortran/trans-array.c index 5c27c06..1b77998 100644 --- a/gcc/fortran/trans-array.c +++ b/gcc/fortran/trans-array.c @@ -882,7 +882,7 @@ get_CFI_desc (gfc_symbol *sym, gfc_expr *expr, else tmp = sym->backend_decl; - if (tmp && DECL_LANG_SPECIFIC (tmp)) + if (tmp && DECL_LANG_SPECIFIC (tmp) && GFC_DECL_SAVED_DESCRIPTOR (tmp)) tmp = GFC_DECL_SAVED_DESCRIPTOR (tmp); *desc = tmp; |