[PATCH 0/2] fortran: Ignore attributes of class containers' _data component [PR127637]

Jerry D jvdelisle2@gmail.com
Thu Oct 1 20:09:45 GMT 2026


On 9/29/26 8:30 AM, Mikael Morin wrote:
> From: Mikael Morin <mikael@gcc.gnu.org>
> 
> Hello,
> 
> here is a two-patches series touching how gfc_variable_attr retrieves the
> attribute set of a data reference.
> 
> The first patch is a preliminary refactoring, separating the function
> between type retrieval and attributes retrieval.
> 
> The second patch is the fix for PR127637, ignoring the _data component of
> class containers in the data reference walk to get the attribute set.
> 
> Fortran-tested on aarch64-unknown-linux-gnu.
> OK for mainline?

Both 1 and 2 look OK to me.

Thanks for the effort,

Jerry>
> Mikael Morin (2):
>    fortran: Retrieve separately attributes and type of data references
>    fortran: Ignore attributes of class containers's _data component
>      [PR127637]
> 
>   gcc/fortran/check.cc                          |  6 +-
>   gcc/fortran/expr.cc                           | 26 ++++---
>   gcc/fortran/gfortran.h                        |  2 +-
>   gcc/fortran/primary.cc                        | 63 +++++++---------
>   gcc/fortran/resolve.cc                        | 74 ++++++++++++++++++-
>   gcc/fortran/trans-expr.cc                     |  2 +-
>   .../gfortran.dg/optional_class_2.f90          | 32 ++++++++
>   7 files changed, 152 insertions(+), 53 deletions(-)
>   create mode 100644 gcc/testsuite/gfortran.dg/optional_class_2.f90
> 



More information about the Gcc-patches mailing list