aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimple-builder.h
diff options
context:
space:
mode:
authorPaul Thomas <pault@gcc.gnu.org>2021-04-15 07:34:26 +0100
committerPaul Thomas <pault@gcc.gnu.org>2021-04-15 07:34:26 +0100
commit9a0e09f3dd5339bb18cc47317f2298d9157ced29 (patch)
treef658aeb53db0845fa4210a728a1e2e3e2136464f /gcc/gimple-builder.h
parent417c36cfd620bf2b047852c2aa9ac49004aed2bc (diff)
downloadgcc-9a0e09f3dd5339bb18cc47317f2298d9157ced29.zip
gcc-9a0e09f3dd5339bb18cc47317f2298d9157ced29.tar.gz
gcc-9a0e09f3dd5339bb18cc47317f2298d9157ced29.tar.bz2
Fortran: Fix class reallocate on assignment [PR99307].
2021-04-15 Paul Thomas <pault@gcc.gnu.org> gcc/fortran PR fortran/99307 * symbol.c: Remove trailing white space. * trans-array.c (gfc_trans_create_temp_array): Create a class temporary for class expressions and assign the new descriptor to the data field. (build_class_array_ref): If the class expr can be extracted, then use that for 'decl'. Class function results are reliably handled this way. Call gfc_find_and_cut_at_last_class_ref to eliminate largely redundant code. Remove dead code and recast the rest of the code to extract 'decl' for remaining cases. Call gfc_build_spanned_array_ref. (gfc_alloc_allocatable_for_assignment): Use class descriptor element length for 'elemsize1'. Eliminate repeat set of dtype for class expressions. * trans-expr.c (gfc_find_and_cut_at_last_class_ref): Include additional code from build_class_array_ref, and use optional gfc_typespec pointer argument. (gfc_trans_scalar_assign): Make use of pre and post blocks for all class expressions. * trans.c (get_array_span): For unlimited polymorphic exprs multiply the span by the value of the _len field. (gfc_build_spanned_array_ref): New function. (gfc_build_array_ref): Call gfc_build_spanned_array_ref and eliminate repeated code. * trans.h: Add arg to gfc_find_and_cut_at_last_class_ref and add prototype for gfc_build_spanned_array_ref.
Diffstat (limited to 'gcc/gimple-builder.h')
0 files changed, 0 insertions, 0 deletions