diff options
author | Thomas Koenig <tkoenig@gcc.gnu.org> | 2019-02-24 22:49:47 +0000 |
---|---|---|
committer | Thomas Koenig <tkoenig@gcc.gnu.org> | 2019-02-24 22:49:47 +0000 |
commit | 4afe82523f19171fb0a67fab5ec80c8f645db517 (patch) | |
tree | 15d890f60a78e20ebf11013e77630181130508cf /gcc/fortran/trans.h | |
parent | 28d08ad204087e2c9e979d8dc94daba7ac4c63a3 (diff) | |
download | gcc-4afe82523f19171fb0a67fab5ec80c8f645db517.zip gcc-4afe82523f19171fb0a67fab5ec80c8f645db517.tar.gz gcc-4afe82523f19171fb0a67fab5ec80c8f645db517.tar.bz2 |
re PR fortran/89174 (Allocation segfault with CLASS(*) MOLD)
2019-02-24 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/89174
* trans-expr.c (gfc_find_and_cut_at_last_class_ref): Add is_mold
to garguments. If we are dealing with a MOLD, call
gfc_expr_to_initialize().
* trans-stmt.c (gfc_trans_allocate): For MOLD, pass is_mold=true
to gfc_find_and_cut_at_last_class_ref.
* trans.h (gfc_find_and_cut_at_last_class_ref): Add optional
argument is_mold with default false.
2019-02-24 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/89174
* gfortran.dg/allocate_with_mold_3.f90: New test.
From-SVN: r269179
Diffstat (limited to 'gcc/fortran/trans.h')
-rw-r--r-- | gcc/fortran/trans.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/fortran/trans.h b/gcc/fortran/trans.h index 7d46684..9d9ac22 100644 --- a/gcc/fortran/trans.h +++ b/gcc/fortran/trans.h @@ -412,7 +412,7 @@ tree gfc_class_data_get (tree); tree gfc_class_vptr_get (tree); tree gfc_class_len_get (tree); tree gfc_class_len_or_zero_get (tree); -gfc_expr * gfc_find_and_cut_at_last_class_ref (gfc_expr *); +gfc_expr * gfc_find_and_cut_at_last_class_ref (gfc_expr *, bool is_mold = false); /* Get an accessor to the class' vtab's * field, when a class handle is available. */ tree gfc_class_vtab_hash_get (tree); |