]> git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/fortran/intrinsic.c
re PR fortran/36947 (Attributes not fully checked comparing actual vs dummy procedure)
authorJanus Weil <janus@gcc.gnu.org>
Mon, 18 May 2009 09:19:20 +0000 (11:19 +0200)
committerJanus Weil <janus@gcc.gnu.org>
Mon, 18 May 2009 09:19:20 +0000 (11:19 +0200)
commit23e38561c5027f1c94174df94996837a11cb7c51
treed8f5a5199d69060ee64ad6792b13388fc7249fdf
parent75df395f15f2641bfcae7f1179d3ef963771379c
re PR fortran/36947 (Attributes not fully checked comparing actual vs dummy procedure)

2009-05-18  Janus Weil  <janus@gcc.gnu.org>

PR fortran/36947
PR fortran/40039
* expr.c (gfc_check_pointer_assign): Check intents when comparing
interfaces.
* gfortran.h (typedef struct gfc_intrinsic_arg): Add 'intent' member.
(gfc_compare_interfaces): Additional argument.
* interface.c (operator_correspondence): Add check for equality of
intents, and new argument 'intent_check'.
(gfc_compare_interfaces): New argument 'intent_check', which is passed
on to operator_correspondence.
(check_interface1): Don't check intents when comparing interfaces.
(compare_parameter): Do check intents when comparing interfaces.
* intrinsic.c (add_sym): Add intents for arguments of intrinsic
procedures.
(add_sym_1,add_sym_1s,add_sym_1m,add_sym_2,add_sym_2s,add_sym_3,
add_sym_3ml,add_sym_3red,add_sym_3s,add_sym_4): Use INTENT_IN by
default.
(add_sym_1_intent,add_sym_1s_intent,add_sym_2s_intent,add_sym_3s_intent)
: New functions to add intrinsic symbols, specifying custom intents.
(add_sym_4s,add_sym_5s): Add new arguments to specify intents.
(add_functions,add_subroutines): Add intents for various intrinsics.
* resolve.c (check_generic_tbp_ambiguity): Don't check intents when
comparing interfaces.
* symbol.c (gfc_copy_formal_args_intr): Copy intent.

2009-05-18  Janus Weil  <janus@gcc.gnu.org>

PR fortran/36947
PR fortran/40039
* gfortran.dg/interface_27.f90: New.
* gfortran.dg/interface_28.f90: New.
* gfortran.dg/proc_ptr_11.f90: Fixing invalid test case.
* gfortran.dg/proc_ptr_result_1.f90: Ditto.

From-SVN: r147655
12 files changed:
gcc/fortran/ChangeLog
gcc/fortran/expr.c
gcc/fortran/gfortran.h
gcc/fortran/interface.c
gcc/fortran/intrinsic.c
gcc/fortran/resolve.c
gcc/fortran/symbol.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/interface_27.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/interface_28.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/proc_ptr_11.f90
gcc/testsuite/gfortran.dg/proc_ptr_result_1.f90