This is the mail archive of the
mailing list for the GCC project.
Re: [Patch, Fortran] PRs 61881/61888 - Fix issues with SIZEOF, CLASS(*) and assumed-rank
- From: Tobias Burnus <burnus at net-b dot de>
- To: Paul Richard Thomas <paul dot richard dot thomas at gmail dot com>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>, gfortran <fortran at gcc dot gnu dot org>
- Date: Sat, 26 Jul 2014 11:52:51 +0200
- Subject: Re: [Patch, Fortran] PRs 61881/61888 - Fix issues with SIZEOF, CLASS(*) and assumed-rank
- Authentication-results: sourceware.org; auth=none
- References: <53D2EC76 dot 3000907 at net-b dot de> <CAGkQGiJEUXMT-Dxrt3mbrmu5PCcUViYGM=adGn_wf7+s0z07oQ at mail dot gmail dot com>
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?
+ 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!
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.