[Patch, Fortran] Implement basic ABSTRACT types
Daniel Kraft
d@domob.eu
Mon Sep 1 21:19:00 GMT 2008
Hi,
this patch is a basic implementation of ABSTRACT types (but no DEFERRED
procedure bindings). It parses and remembers the ABSTRACT attribute for
derived-type symbols and checks that no symbol/component is of TYPE(t)
with t being ABSTRACT, no structure constructor for an ABSTRACT type is
invoked and no IMPLICIT statement uses an ABSTRACT type.
For the IMPLICIT check, I added logic to remember the loci of all
IMPLICIT statements to allow a nice diagnostic message to be printed.
In gfc_match_structure_constructor, the tail->val = NULL initialization
fixes a double-free problem I stumbled across, if anyone wonders :)
I thought about using gfc_use_derived for the ABSTRACT check, but this
seemed not to work in all cases as I would have liked it to and
additionally I like the check during resolution much better; and it
gives IMHO better diagostics for ABSTRACT types in IMPLICIT statements.
I hope this is ok so.
What do you think about this patch? I'm at the moment regression
testing on GNU/Linux-x86-32 and hopefully no regressions have crept in...
Thanks,
Daniel
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch.changelog
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20080901/07a4a615/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch.diff
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20080901/07a4a615/attachment-0001.ksh>
More information about the Fortran
mailing list