[Patch, Fortran] PR 38536 ICE with C_LOC on consecutive array and substring references.
Mikael Morin
mikael.morin@tele2.fr
Wed Dec 31 07:39:00 GMT 2008
Mikael Morin wrote:
> Hello,
>
> this fixes part of PR 38536, where the following was leading to an ICE:
>
> f_ptr = C_LOC(chrScalar%c(1)(1:1))
>
>
> The code checking for pointerness of the argument (which is where the
> ICE occurs) has been "rewritten" using gfc_is_data_pointer.
>
> One of the testcase is that of the PR.
> The other one is a newly accepted program (and valid I think).
>
> regression-tested on x86-64-unknown-linux-gnu.
>
> OK for trunk (and later 4.3?), or should I wait for 4.5?
>
> Mikael
>
>
Surprise! there was no patch!
2008-12-30 Mikael Morin <mikael.morin@tele2.fr>
PR fortran/38536
* gfortran.dg/c_loc_tests_13.f90: New test.
* gfortran.dg/c_loc_tests_14.f90: New test.
2008-12-30 Mikael Morin <mikael.morin@tele2.fr>
PR fortran/38536
* gfortran.h (gfc_is_data_pointer): Added prototype
* resolve.c (gfc_iso_c_func_interface):
Use gfc_is_data_pointer to test for pointer attribute.
* dependency.c (gfc_is_data_pointer):
Support pointer-returning functions.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: pr38536_08.diff
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20081231/7056c1d1/attachment.ksh>
More information about the Fortran
mailing list