blob: 77111f1c519775f47ede3f5b98e70c29cb4a3a4c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
! { dg-do compile }
! Check for constraints restricting arguments of ELEMENTAL procedures.
! Contributed by Daniel Kraft, d@domob.eu.
PROGRAM main
IMPLICIT NONE
CONTAINS
IMPURE ELEMENTAL SUBROUTINE foobar &
(a, & ! { dg-error "must be scalar" }
b, & ! { dg-error "POINTER attribute" }
c, & ! { dg-error "ALLOCATABLE attribute" }
d) ! { dg-error "INTENT specified" }
INTEGER, INTENT(IN) :: a(:)
INTEGER, POINTER, INTENT(IN) :: b
INTEGER, ALLOCATABLE, INTENT(IN) :: c
INTEGER :: d
END SUBROUTINE foobar
END PROGRAM main
|