-
- Downloads
Fortran: fix CLASS attribute handling [PR106856]
gcc/fortran/ChangeLog:
PR fortran/106856
* class.cc (gfc_build_class_symbol): Handle update of attributes of
existing class container.
(gfc_find_derived_vtab): Fix several memory leaks.
(find_intrinsic_vtab): Ditto.
* decl.cc (attr_decl1): Manage update of symbol attributes from
CLASS attributes.
* primary.cc (gfc_variable_attr): OPTIONAL shall not be taken or
updated from the class container.
* symbol.cc (free_old_symbol): Adjust management of symbol versions
to not prematurely free array specs while working on the declation
of CLASS variables.
gcc/testsuite/ChangeLog:
PR fortran/106856
* gfortran.dg/interface_41.f90: Remove dg-pattern from valid testcase.
* gfortran.dg/class_74.f90: New test.
* gfortran.dg/class_75.f90: New test.
Co-authored-by:
Tobias Burnus <tobias@codesourcery.com>
Showing
- gcc/fortran/class.cc 22 additions, 3 deletionsgcc/fortran/class.cc
- gcc/fortran/decl.cc 26 additions, 30 deletionsgcc/fortran/decl.cc
- gcc/fortran/primary.cc 0 additions, 1 deletiongcc/fortran/primary.cc
- gcc/fortran/symbol.cc 5 additions, 1 deletiongcc/fortran/symbol.cc
- gcc/testsuite/gfortran.dg/class_74.f90 151 additions, 0 deletionsgcc/testsuite/gfortran.dg/class_74.f90
- gcc/testsuite/gfortran.dg/class_75.f90 24 additions, 0 deletionsgcc/testsuite/gfortran.dg/class_75.f90
- gcc/testsuite/gfortran.dg/interface_41.f90 1 addition, 1 deletiongcc/testsuite/gfortran.dg/interface_41.f90
Loading
Please register or sign in to comment