This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch, Fortran, OOP] PR 56261: seg fault call procedure pointer on polymorphic array

>> Ok, that's what the patch does now: Always error for wrong result
>> type, then do the full interface check, but only give a warning with
>> -std=gnu and -std=legacy, and an error otherwise.
>> Will do another regtest now. Are you okay with this version?
> Yes, looks good to me. Thanks for the patch!

Thanks. I had to make another minor modification, namely move the
'gfc_explicit_interface_required' check a bit upward, so that it will
always give an error (as before), and not only a warning.

Here is the final patch with full ChangeLog that I will commit later today.


2013-04-12  Janus Weil  <>

    PR fortran/56261
    * gfortran.h (gfc_explicit_interface_required): New prototype.
    * expr.c (gfc_check_pointer_assign): Check if an explicit interface is
    required in a proc-ptr assignment.
    * interface.c (check_result_characteristics): Extra check.
    * resolve.c (gfc_explicit_interface_required): New function.
    (resolve_global_procedure): Use new function
    'gfc_explicit_interface_required'. Do a full interface check.

2013-04-12  Janus Weil  <>

    PR fortran/56261
    * gfortran.dg/auto_char_len_4.f90: Add -pedantic. Changed error.
    * gfortran.dg/assumed_rank_4.f90: Modified error wording.
    * gfortran.dg/block_11.f90: Fix invalid test case.
    * gfortran.dg/function_types_3.f90: Add new error message.
    * gfortran.dg/global_references_1.f90: Ditto.
    * gfortran.dg/import2.f90: Remove unneeded parts.
    * gfortran.dg/import6.f90: Fix invalid test case.
    * gfortran.dg/proc_decl_2.f90: Ditto.
    * gfortran.dg/proc_decl_9.f90: Ditto.
    * gfortran.dg/proc_decl_18.f90: Ditto.
    * gfortran.dg/proc_ptr_40.f90: New.
    * gfortran.dg/whole_file_7.f90: Modified error wording.
    * gfortran.dg/whole_file_16.f90: Ditto.
    * gfortran.dg/whole_file_17.f90: Add -pedantic.
    * gfortran.dg/whole_file_18.f90: Modified error wording.
    * gfortran.dg/whole_file_20.f03: Ditto.
    * gfortran.fortran-torture/execute/intrinsic_associated.f90: Fix
    invalid test case.

Attachment: pr56261_v9.diff
Description: Binary data

Attachment: proc_ptr_40.f90
Description: Binary data

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]