re PR fortran/36459 (Wrong interface use for PROCEDURE)

2008-06-08  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/36459
	* decl.c (match_procedure_decl): Correctly recognize if the interface
	is an intrinsic procedure.


2008-06-08  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/36459
	* gfortran.dg/proc_decl_16.f90: New.

From-SVN: r136555
This commit is contained in:
Janus Weil 2008-06-08 13:55:41 +02:00
parent 2d9bbb6b6d
commit c1db9545dd
4 changed files with 36 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2008-06-08 Janus Weil <janus@gcc.gnu.org>
PR fortran/36459
* decl.c (match_procedure_decl): Correctly recognize if the interface
is an intrinsic procedure.
2008-06-08 Tobias Burnus <burnus@net-b.de>
PR fortran/35830

View File

@ -4085,8 +4085,10 @@ match_procedure_decl (void)
return MATCH_ERROR;
}
/* Handle intrinsic procedures. */
if (gfc_intrinsic_name (proc_if->name, 0)
|| gfc_intrinsic_name (proc_if->name, 1))
if (!(proc_if->attr.external || proc_if->attr.use_assoc
|| proc_if->attr.if_source == IFSRC_IFBODY)
&& (gfc_intrinsic_name (proc_if->name, 0)
|| gfc_intrinsic_name (proc_if->name, 1)))
proc_if->attr.intrinsic = 1;
if (proc_if->attr.intrinsic
&& !gfc_intrinsic_actual_ok (proc_if->name, 0))

View File

@ -1,3 +1,8 @@
2008-06-08 Janus Weil <janus@gcc.gnu.org>
PR fortran/36459
* gfortran.dg/proc_decl_16.f90: New.
2008-06-08 Tobias Burnus <burnus@net-b.de>
PR fortran/35830

View File

@ -0,0 +1,21 @@
! { dg-do compile }
! PR fortran/36459
!
abstract interface
function dim()
integer :: dim
end function dim
end interface
procedure(dim) :: f
interface
integer function tan()
end function
end interface
procedure(tan) :: g
print *, f()
print *, tan()
end