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: Paul Richard Thomas <paul dot richard dot thomas at gmail dot com>
- To: Tobias Burnus <burnus at net-b dot de>
- 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:34:54 +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>
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.
Otherwise, this is OK for trunk.
Thanks for the patch
On 26 July 2014 01:47, Tobias Burnus <firstname.lastname@example.org> wrote:
> The patch has been motivated by the needs for implementing the openacc
> module. In particular, it does:
> - Fix passing intrinsic types to CLASS(*) [F2003]
> - Fix STORAGE_SIZE for polymorphic arrays [F2003]
> - Permit the vendor intrinsic SIZEOF also for TYPE(*) if and only if an
> array descriptor has been used [extend GNU extension]
> - Fix SIZEOF with assumed-rank [fix GNU extension]
> - Document that SIZEOF's result are not well defined for noncontiguous
> arrays. [fix GNU extension]
> Build and regtested on x86-64-gnu-linux.
> OK for the trunk?
The knack of flying is learning how to throw yourself at the ground and miss.
--Hitchhikers Guide to the Galaxy