]> gcc.gnu.org Git - gcc.git/commit
Fortran: Fix for class defined operators [PR99124].
authorPaul Thomas <pault@gcc.gnu.org>
Tue, 23 Feb 2021 19:29:04 +0000 (19:29 +0000)
committerPaul Thomas <pault@gcc.gnu.org>
Wed, 24 Feb 2021 11:10:55 +0000 (11:10 +0000)
commit01af81169f0b92ee2823e86c37066f8f002c21c0
tree966f890f02e4469f987a4b9dc90898b72722bb56
parent626f4f5c659923b08a967b79bb0dc9a3457ec9ff
Fortran: Fix for class defined operators [PR99124].

2021-02-23  Paul Thomas  <pault@gcc.gnu.org>

gcc/fortran
PR fortran/99124
* resolve.c (resolve_fl_procedure): Include class results in
the test for F2018, C15100.
* trans-array.c (get_class_info_from_ss): Do not use the saved
descriptor to obtain the class expression for variables. Use
gfc_get_class_from_expr instead.

gcc/testsuite/
PR fortran/99124
* gfortran.dg/class_defined_operator_2.f03 : New test.
* gfortran.dg/elemental_result_2.f90 : New test.
* gfortran.dg/class_assign_4.f90: Correct the non-conforming
elemental function with an allocatable result with an operator
interface with array dummies and result.

(cherry picked from commit 29a5298955f777c539c628f51e78b75d8e586c44)
gcc/fortran/resolve.c
gcc/fortran/trans-array.c
gcc/testsuite/gfortran.dg/class_assign_4.f90
gcc/testsuite/gfortran.dg/class_defined_operator_2.f03 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/elemental_result_2.f90 [new file with mode: 0644]
This page took 0.065624 seconds and 5 git commands to generate.