2014-07-12 Paul Thomas <pault@gcc.gnu.org>
[official-gcc.git] / gcc / testsuite / gfortran.dg / elemental_non_intrinsic_dummy_1.f90
blobc14a5d87fa5e9190ef5f4c6785eb519443b28393
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