]> git.ipfire.org Git - thirdparty/gcc.git/commit
re PR fortran/78990 (ICE when assigning polymorphic array function result)
authorPaul Thomas <pault@gcc.gnu.org>
Sat, 3 Mar 2018 18:00:39 +0000 (18:00 +0000)
committerPaul Thomas <pault@gcc.gnu.org>
Sat, 3 Mar 2018 18:00:39 +0000 (18:00 +0000)
commit777f3ab8b874add3ba7db62629da396787bbdc53
tree4f4ae15a27dc0b6a9701d13f3eaef3c778ac7acf
parent191fd139ce813674e99d99a4fb86625f506fe4b0
re PR fortran/78990 (ICE when assigning polymorphic array function result)

2018-03-03  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/78990
* expr.c (gfc_is_class_array_function): Renamed from
'gfc_is_alloc_class_array_function' and modified to return true
for pointers as well as allocatable results.
* gfortran.h : Change of name for prototype of above function.
* trans-array.c (gfc_add_loop_ss_code): Force finalization of
class array results.
(build_class_array_ref): Change assertion into a condition.
(build_class_array_ref): Set the se class_vptr for class array
function results.
(gfc_walk_function_expr): Reference gfc_is_class_array_function
as above.
* trans-decl.c (get_proc_result): Move it up before
gfc_trans_deferred_vars.
(gfc_trans_deferred_vars): Nullify explicit return class arrays
on entry.
* trans-expr.c (gfc_conv_class_to_class): Allow conversion of
class array functions that have an se class_vptr and use it
for the result vptr.
(gfc_conv_subref_array_arg): Rename reference to the above
function.
(gfc_conv_procedure_call): Ditto. Add the se pre block to the
loop pre block before the function is evaluated. Do not
finalize class pointer results.
(arrayfunc_assign_needs_temporary, gfc_trans_assignment_1) More
renamed references.
* trans-intrinsic.c (gfc_conv_intrinsic_size): Ditto.

2018-03-03  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/78990
* gfortran.dg/class_67.f90: New test.

From-SVN: r258217
gcc/fortran/ChangeLog
gcc/fortran/expr.c
gcc/fortran/gfortran.h
gcc/fortran/resolve.c
gcc/fortran/trans-array.c
gcc/fortran/trans-decl.c
gcc/fortran/trans-expr.c
gcc/fortran/trans-intrinsic.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/class_67.f90 [new file with mode: 0644]