[Patch, Fortran] PR 35831: checking for dummy procedures
Janus Weil
janus@gcc.gnu.org
Sun Aug 5 21:12:00 GMT 2012
Hi all,
here is a patch for a rather old PR, which deals with correctness
checking for several cases, such as:
1) dummy procedures
2) proc-ptr assignments
3) type-bound procedure overloading
The patch adds a new function 'check_result_characteristics' to do
various checks on function results. This is largely analogous to
'check_dummy_characteristics'. In both of them, there are still a few
attributes left to check, which I may add in a follow-up patch. Also I
had to disable the warning for cases where we can not finally
determine whether the string length or shape expressions are equal.
The treatment for those cases should be improved at some point, or one
should think about re-enabling the warnings.
Regtested on x86_64-unknown-linux-gnu. Ok for trunk?
Cheers,
Janus
2012-08-05 Janus Weil <janus@gcc.gnu.org>
PR fortran/35831
* interface.c (check_result_characteristics): New function, which checks
the characteristics of function results.
(gfc_compare_interfaces,gfc_check_typebound_override): Call it.
2012-08-05 Janus Weil <janus@gcc.gnu.org>
PR fortran/35831
* gfortran.dg/dummy_procedure_5.f90: Modified.
* gfortran.dg/dummy_procedure_8.f90: New.
* gfortran.dg/interface_26.f90: Modified.
* gfortran.dg/proc_ptr_11.f90: Modified.
* gfortran.dg/proc_ptr_15.f90: Modified.
* gfortran.dg/proc_ptr_result_5.f90: Modified.
* gfortran.dg/typebound_override_1.f90: Modified.
* gfortran.dg/typebound_proc_6.f03: Modified.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr35831.diff
Type: application/octet-stream
Size: 12067 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20120805/550c0a92/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dummy_procedure_8.f90
Type: application/octet-stream
Size: 1004 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20120805/550c0a92/attachment-0001.obj>
More information about the Fortran
mailing list