URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gfortran.dg/] [dummy_procedure_1.f90] - Rev 816
Compare with Previous | Blame | View Log
! { dg-do compile }! Test the patch for PR25098, where passing a variable as an! actual argument to a formal argument that is a procedure! went undiagnosed.!! Based on contribution by Joost VandeVondele <jv244@cam.ac.uk>!integer function y()y = 1endinteger function z()z = 1endmodule m1containssubroutine s1(f)interfacefunction f()integer fend function fend interfaceend subroutine s1end module m1use m1external yinterfacefunction x()integer xend function xend interfaceinteger :: i, y, zi=1call s1(i) ! { dg-error "Expected a procedure for argument" }call s1(w) ! { dg-error "not allowed as an actual argument" }call s1(x) ! explicit interfacecall s1(y) ! declared externalcall s1(z) ! { dg-error "Expected a procedure for argument" }containsinteger function w()w = 1end function wend! { dg-final { cleanup-modules "m1" } }
