[Patch, fortran] PR31211 - wrong code generated for pointer returning function as actual argument
Paul Richard Thomas
paul.richard.thomas@gmail.com
Fri Jul 27 10:54:00 GMT 2007
:ADDPATCH fortran:
This one is easy. Scalar pointer functions were de-referenced in
gfc_conv_expr_reference and then an address expression built. This
did not help the cause when the result was null()! The fix adds an
extra block to this function, such that the pointer result is
returned. Note that arrays are handled, correctly elsewhere.
Bootstrapped and regtested on x86_ia64 - OK for trunk?
Paul
2007-07-27 Paul Thomas <pault@gcc.gnu.org>
PR fortran/31211
* trans-expr.c (gfc_conv_expr_reference): Add block for case of
scalar pointer functions so that NULL result is correctly
handled.
2007-07-27 Paul Thomas <pault@gcc.gnu.org>
PR fortran/31211
* gfortran.dg/actual_pointer_function_1.f90: New test.
--
I love deadlines. I love the whooshing sound they make as they go by.
--Douglas Adams
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr31211.diff
Type: text/x-patch
Size: 2082 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20070727/8e6c472b/attachment.bin>
More information about the Fortran
mailing list