diff options
author | Paul Thomas <pault@gcc.gnu.org> | 2019-05-19 12:32:55 +0000 |
---|---|---|
committer | Paul Thomas <pault@gcc.gnu.org> | 2019-05-19 12:32:55 +0000 |
commit | d05ccada1798ac57d8d46abbca18ba122d8b85f3 (patch) | |
tree | 41db59a00a654e2f7ceec3eb942d0ed4fd6def26 /gcc/fortran/trans-stmt.c | |
parent | 20733f1b0db2770532afaff274e9231de37e50fc (diff) | |
download | gcc-d05ccada1798ac57d8d46abbca18ba122d8b85f3.zip gcc-d05ccada1798ac57d8d46abbca18ba122d8b85f3.tar.gz gcc-d05ccada1798ac57d8d46abbca18ba122d8b85f3.tar.bz2 |
re PR fortran/90498 (ICE with select type/associate and derived type argument containing class(*))
2019-05-19 Paul Thomas <pault@gcc.gnu.org>
PR fortran/90498
* trans-stmt.c (trans_associate_var) Do not use the saved
descriptor if the expression is a COMPONENT_REF.
2019-05-19 Paul Thomas <pault@gcc.gnu.org>
PR fortran/90498
* gfortran.dg/associate_48.f90 : New test.
From-SVN: r271380
Diffstat (limited to 'gcc/fortran/trans-stmt.c')
-rw-r--r-- | gcc/fortran/trans-stmt.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/fortran/trans-stmt.c b/gcc/fortran/trans-stmt.c index b9966ed..5fa182b 100644 --- a/gcc/fortran/trans-stmt.c +++ b/gcc/fortran/trans-stmt.c @@ -1858,7 +1858,8 @@ trans_associate_var (gfc_symbol *sym, gfc_wrapped_block *block) { if (e->symtree && DECL_LANG_SPECIFIC (e->symtree->n.sym->backend_decl) - && GFC_DECL_SAVED_DESCRIPTOR (e->symtree->n.sym->backend_decl)) + && GFC_DECL_SAVED_DESCRIPTOR (e->symtree->n.sym->backend_decl) + && TREE_CODE (target_expr) != COMPONENT_REF) /* Use the original class descriptor stored in the saved descriptor to get the target_expr. */ target_expr = |