Update concepts branch to revision 131834
[official-gcc.git] / gcc / testsuite / gfortran.dg / elemental_non_intrinsic_dummy_1.f90
blob207d76a4b7b230d562b90e3e6addd6620cd6c28e
1 ! { dg-do compile }
2 ! Tests the fix for 20871, in which elemental non-intrinsic procedures were
3 ! permitted to be dummy arguments.
5 ! Contributed by Joost VandeVondele <jv244@cam.ac.uk>
7 MODULE TT
8 CONTAINS
9 ELEMENTAL INTEGER FUNCTION two(N)
10 INTEGER, INTENT(IN) :: N
11 two=2**N
12 END FUNCTION
13 END MODULE
14 USE TT
15 INTEGER, EXTERNAL :: SUB
16 write(6,*) SUB(two) ! { dg-error "not allowed as an actual argument " }
17 END
18 INTEGER FUNCTION SUB(XX)
19 INTEGER :: XX
20 SUB=XX()
21 END
23 ! { dg-final { cleanup-modules "TT" } }