aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gfortran.dg/elemental_result_1.f90
blob: 566303953ca008d6b9c9979d946f3d79a74c4c2e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
! { dg-do compile }
! Tests the fix for PR20874 in which array valued elemental
! functions were permitted.
!
! Contributed by Joost VandeVondele  <jv244@cam.ac.uk>
!
MODULE Test
CONTAINS
  ELEMENTAL FUNCTION LL(I) ! { dg-error "must have a scalar result" }
    INTEGER, INTENT(IN) :: I
    INTEGER  :: LL(2)
  END FUNCTION LL
!
! This was already OK.
!
  ELEMENTAL FUNCTION MM(I)
    INTEGER, INTENT(IN) :: I
    INTEGER, pointer  :: MM ! { dg-error "conflicts with ELEMENTAL" }
  END FUNCTION MM
END MODULE Test