[Patch, Fortran] PRs 61881/61888 - Fix issues with SIZEOF, CLASS(*) and assumed-rank

Tobias Burnus burnus@net-b.de
Sat Jul 26 09:53:00 GMT 2014


Dear Paul,

Paul Richard Thomas wrote:
> Whilst I am aware that we can now use the single line C++ comment,
> would it perhaps be a better idea to stick with the C style comments
> just for uniformity?

Okay.

> +      if (arg->ts.type == BT_CLASS)
> +    {
> +      tmp = gfc_vtable_size_get (TREE_OPERAND (argse.expr, 0));
> +      tmp = fold_convert (result_type, tmp);
> +      goto done;
> +    }
>
> Is there any possibility that the class object will be adorned by any
> kind of reference here?  In which case, you should drill down through
> the TREE_OPERANDS to find it.

I think it should be fine - it just removes the outermost component 
reference, which should give the class struct, independently whether it 
is class_var or dt(5)%comp(7)%class_comp.

> Otherwise, this is OK for trunk.
> Thanks for the patch

Assuming that the second part is okay, I have now committed it with the 
comment-style change as Rev. 213079.

Thanks for the patch review!

Tobias

PS: Next on my to-do list is to post a RFC version of openacc_lib.h / 
module openacc, using the patch, for the gomp-4_0-branch. And then I 
want to continue on the locking/critical section support for coarrays.

PPS: I realized that the sub-pointer issues, where the actual stride is 
not a multiple of the element length, very quickly and badly hits me 
with scalar derived-type coarrays with array components. Thus, to 
support those, I am also very interested in getting the new array 
descriptor up and running and onto the trunk… I do not really like the 
idea of coding around that issue.



More information about the Fortran mailing list