This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
All,
My and Paul T's effort to implement allocatable components of derived
types began with a short period of hard work, followed by a longer
period of inactivity (on my part, at least). Since the work has begun
to move forwards again, I thought would send a status report:
* Explicit allocation and deallocation works.
* Automatic deallocation when a variable goes out of scope works.
* Code to handle automatic deallocation for INTENT(OUT) arguments and
function results is there, but I will not be very suprised if it
doesn't work for all cases. (All parts of the code may have bugs,
but I suspect this part of the code more than others. Also see my note
to Paul T. below).
* Allocatable components will be nullified when created (i.e. they will
start their life with an allocation status defined to "not
allocated").
* The "automatic deallocation&allocation if necessary" on assignments
is the main thing left to be done.
* I have probably forgotten something.
I attach the current (partly a bit ugly) version of the patch (someday,
I will clean things up and write some kind of explanation for it), and a
testcase.
Paul,
Changes I've made since last time: I've messed (= probably broken
something) a bit with the deallocation of scalar INTENT(OUT) arguments
in trans-expr.c (gfc_conv_function_call), and tried to make sure
function results aren't deallocated until after they have been used.
Erik
PS. Next time I read email will be on sunday evening.
Attachment:
ac_17.diff
Description: Text document
Attachment:
allocatable_components_1.f90
Description: Text document
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |