re PR fortran/40451 ([F03] procedure pointer assignment rejected)
2009-06-18 Janus Weil <janus@gcc.gnu.org> PR fortran/40451 * resolve.c (resolve_contained_fntype): Prevent implicit typing for procedures with explicit interface. * symbol.c (gfc_check_function_type): Ditto. 2009-06-18 Janus Weil <janus@gcc.gnu.org> PR fortran/40451 * gfortran.dg/proc_ptr_result_4.f90: New. From-SVN: r148652
This commit is contained in:
parent
c637b0fa0d
commit
f99098233b
@ -1,3 +1,10 @@
|
||||
2009-06-18 Janus Weil <janus@gcc.gnu.org>
|
||||
|
||||
PR fortran/40451
|
||||
* resolve.c (resolve_contained_fntype): Prevent implicit typing for
|
||||
procedures with explicit interface.
|
||||
* symbol.c (gfc_check_function_type): Ditto.
|
||||
|
||||
2009-06-16 Ian Lance Taylor <iant@google.com>
|
||||
|
||||
* decl.c (build_struct): Rewrite loop over constructor elements.
|
||||
|
@ -347,7 +347,7 @@ resolve_contained_fntype (gfc_symbol *sym, gfc_namespace *ns)
|
||||
return;
|
||||
|
||||
/* Try to find out of what the return type is. */
|
||||
if (sym->result->ts.type == BT_UNKNOWN)
|
||||
if (sym->result->ts.type == BT_UNKNOWN && sym->result->ts.interface == NULL)
|
||||
{
|
||||
t = gfc_set_default_type (sym->result, 0, ns);
|
||||
|
||||
|
@ -317,7 +317,7 @@ gfc_check_function_type (gfc_namespace *ns)
|
||||
if (!proc->attr.contained || proc->result->attr.implicit_type)
|
||||
return;
|
||||
|
||||
if (proc->result->ts.type == BT_UNKNOWN)
|
||||
if (proc->result->ts.type == BT_UNKNOWN && proc->result->ts.interface == NULL)
|
||||
{
|
||||
if (gfc_set_default_type (proc->result, 0, gfc_current_ns)
|
||||
== SUCCESS)
|
||||
|
@ -1,3 +1,8 @@
|
||||
2009-06-18 Janus Weil <janus@gcc.gnu.org>
|
||||
|
||||
PR fortran/40451
|
||||
* gfortran.dg/proc_ptr_result_4.f90: New.
|
||||
|
||||
2009-06-17 Adam Nemet <anemet@caviumnetworks.com>
|
||||
|
||||
* gcc.c-torture/execute/bitfld-5.c: New test.
|
||||
|
16
gcc/testsuite/gfortran.dg/proc_ptr_result_4.f90
Normal file
16
gcc/testsuite/gfortran.dg/proc_ptr_result_4.f90
Normal file
@ -0,0 +1,16 @@
|
||||
! { dg-do compile }
|
||||
!
|
||||
! PR 40451: [F03] procedure pointer assignment rejected
|
||||
!
|
||||
! Contributed by Tobias Burnus <burnus@gcc.gnu.org>
|
||||
|
||||
contains
|
||||
|
||||
function f()
|
||||
intrinsic :: sin
|
||||
procedure(sin), pointer :: f
|
||||
f => sin
|
||||
end function f
|
||||
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user