This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch, fortran] PR36528 - Cray pointer to function mishandled
- From: Paul Richard Thomas <paul dot richard dot thomas at gmail dot com>
- To: Tobias Burnus <burnus at net-b dot de>
- Cc: "fortran at gcc dot gnu dot org" <fortran at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 13 Feb 2009 11:04:01 +0100
- Subject: Re: [Patch, fortran] PR36528 - Cray pointer to function mishandled
- References: <339c37f20902111320m5834b2eer7bd8d0cf5f26eb9f@mail.gmail.com> <4993EB5D.1050004@net-b.de>
Hi Tobias,
> Note: This "only" fixes problem (b) but not (a) ["<<<< Unknown tree:"];
This looks very fixable but not until Monday. The reason for it can
be seen in treepretty-print.c(print_call_name):2628. 'NIY' is
responsible for the offending message. It comes about because
TREE_CODE (op0) == CONVERT_EXPR for this case. This, in its turn, is
due to trans-expr.c(gfc_conv_function_val):1509, where, guess what:-)
, the cray pointer is converted to a pointer of type cray-pointee.
This needs to be done in the same way as procedure pointers; for this
case of a cray pointer to a procedure, the pointer can remain as it
is, whilst the pointee should be declared as a procedure pointer. The
pointer should then be **assigned** to the pointee and the latter used
for the call.
Cheers
Paul