aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada
diff options
context:
space:
mode:
authorMikael Morin <mikael@gcc.gnu.org>2022-09-01 12:35:07 +0200
committerMikael Morin <mikael@gcc.gnu.org>2022-09-25 14:44:54 +0200
commit77bbf69d2981dafc2ef3e59bfbefb645d88bab9d (patch)
tree96df5717abb95282a0c9738559ff0ec04b929d6f /gcc/ada
parent95375ffb3dd59f51e79408dd3b2b620dc1af71b1 (diff)
downloadgcc-77bbf69d2981dafc2ef3e59bfbefb645d88bab9d.zip
gcc-77bbf69d2981dafc2ef3e59bfbefb645d88bab9d.tar.gz
gcc-77bbf69d2981dafc2ef3e59bfbefb645d88bab9d.tar.bz2
fortran: Support clobbering of derived types [PR41453]
This adds support for clobbering of non-polymorphic derived type variables, when they are passed as actual argument whose associated dummy has the INTENT(OUT) attribute. We avoid to play with non-constant type sizes or class descriptors by requiring that the types are derived (not class) and strictly matching, and by excluding parameterized derived types. Types that are used in the callee are also excluded: they are types with allocatable components (the components will be deallocated), and finalizable types or types with finalizable components (they will be passed to finalization routines). PR fortran/41453 gcc/fortran/ChangeLog: * trans-expr.cc (gfc_conv_procedure_call): Allow strictly matching derived types. gcc/testsuite/ChangeLog: * gfortran.dg/intent_optimize_10.f90: New test.
Diffstat (limited to 'gcc/ada')
0 files changed, 0 insertions, 0 deletions