On 2/13/25 7:09 PM, Jerry D wrote:
On 2/13/25 1:42 PM, Harald Anlauf wrote:
Am 12.02.25 um 21:49 schrieb Jerry D:
The attached patch is fairly obvious. The use of notify_std is changed
to a gfc_error. Several test cases had to be adjusted.

Regression tested on x86_64.

OK for trunk?

This is not a review, just some random comments on the testsuite changes
by your patch:


I will update and give the i some declarations. I just tried integer and it worked. Of course you are correct to declasre these as type(c_ptr)

Regarding, the use of transfer, I will fix those as well.

The patch itself is trivial so I will wait a day or so for any other comments.

Thanks for feedback.

Jerry


Committed after adjusting the test cases.

commit r15-7569-g12771b
Author: Jerry DeLisle <jvdeli...@gcc.gnu.org>
Date:   Thu Feb 13 20:19:56 2025 -0800

    Fortran: gfortran allows type(C_ptr) in I/O list

    Before this patch, gfortran was accepting invalid use of
    type(c_ptr) in I/O statements. The fix affects several
    existing test cases so no new test case needed.

    Existing tests were modified to pass by either using the
    transfer function to convert to an acceptable value or
    using an assignment to a like type (non-I/O).

            PR fortran/117430

    gcc/fortran/ChangeLog:

            * resolve.cc (resolve_transfer): Change gfc_notify_std to
            gfc_error.

    gcc/testsuite/ChangeLog:

            * gfortran.dg/c_loc_test_17.f90: Use an assignment rather than
            PRINT.
            * gfortran.dg/c_ptr_tests_10.f03: Use a transfer function.
            * gfortran.dg/c_ptr_tests_16.f90: Use an assignment.
            * gfortran.dg/c_ptr_tests_9.f03: Use a transfer function.
            * gfortran.dg/init_flag_17.f90: Likewise.
            * gfortran.dg/pr32601_1.f03: Use an assignment.


Reply via email to