[Patch, Fortran] PR 41177: Some corrections on base-object checks with type-bound procedures.

Steven Bosscher steven.bosscher@gmail.com
Sat Dec 5 00:57:00 GMT 2009


Daniel Kraft wrote:
> Unfortunatly, the POINTER attribute on CLASS dummies gets always set
> in decl.c:encapsulate_class_symbol; I thus had to introduce a new flag
> storing the original value in this case for my check -- this is what
> Janus also suggested. But if someone else can come up with a nicer
> solution, I'd be happy to implement it.

Saving the original POINTER attribute is going to confuse things.
Already after your patch the dumped parse tree doesn't match anymore
with what was read in. If attr.pointer is set, then the, well, thing
declared should have attribute POINTER, otherwise you're basically
overloading the meaning of this bit.

Can you not somehow re-engineer things to set your new flag
attr.class_pointer instead of attr.pointer?

Or actually, is this still an issue at all? Setting the POINTER
attribute is not done in encapsulate_class_symbol -- this function
doesn't even exist anymore. According to the ChangeLog:

2009-11-30  Paul Thomas  <pault@xxxxxx>
            Janus Weil  <janus@xxxxxx>

        * decl.c (encapsulate_class_symbol): Replaced by
        'gfc_build_class_symbol'.

and in symbol.c:gfc_build_class_symbol:

  attr->allocatable = attr->pointer = attr->dimension = 0;

Did you mean "clearing the POINTER attribute"?

Ciao!
Steven



More information about the Fortran mailing list