145
|
1 ! { dg-do compile }
|
|
2 ! { dg-options "-std=f95" }
|
|
3 ! PR 20851
|
|
4 ! Dummy arguments are disallowed in initialization expressions in
|
|
5 ! elemental functions except as arguments to the intrinsic functions
|
|
6 ! BIT_SIZE, KIND, LEN, or to the numeric inquiry functions listed
|
|
7 ! in 13.11.8
|
|
8 MODULE TT
|
|
9 INTEGER M
|
|
10 CONTAINS
|
|
11 ELEMENTAL REAL FUNCTION two(N)
|
|
12 INTEGER, INTENT(IN) :: N
|
|
13 INTEGER, DIMENSION(N) :: scr ! { dg-error "Dummy argument 'n' not allowed in expression" }
|
|
14 END FUNCTION
|
|
15
|
|
16 ELEMENTAL REAL FUNCTION twopointfive(N)
|
|
17 INTEGER, INTENT(IN) :: N
|
|
18 INTEGER, DIMENSION(MAX(N,2)) :: scr ! { dg-error "Dummy argument 'n' not allowed in expression" }
|
|
19 end FUNCTION twopointfive
|
|
20 END MODULE
|
|
21 END
|