blob: ee12ddfdacec68644e98fbeef11e572d105cf672 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
! { dg-do compile }
! Tests the fix for PR25056 in which a non-PURE procedure could be
! passed as the actual argument to a PURE procedure.
!
! Contributed by Joost VandeVondele <jv244@cam.ac.uk>
!
MODULE M1
CONTAINS
FUNCTION L()
L=1
END FUNCTION L
PURE FUNCTION J(K)
INTERFACE
PURE FUNCTION K()
END FUNCTION K
END INTERFACE
J=K()
END FUNCTION J
END MODULE M1
USE M1
write(6,*) J(L) ! { dg-error "Mismatch in PURE attribute" }
END
|