mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-02-22 08:59:10 +08:00
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:
parent
2d9bbb6b6d
commit
c1db9545dd
@ -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
|
||||
|
@ -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))
|
||||
|
@ -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
|
||||
|
21
gcc/testsuite/gfortran.dg/proc_decl_16.f90
Normal file
21
gcc/testsuite/gfortran.dg/proc_decl_16.f90
Normal 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
|
Loading…
Reference in New Issue
Block a user