summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/elemental_pointer_1.f90
blob: bce34527a86ded2e4998bad612b4282e5b2343d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
! { dg-do compile }
! Tests the fix for pr20875.
! Note 12.7.1 "For a function, the result shall be scalar and shall not have the POINTER attribute."
MODULE Test
CONTAINS
  ELEMENTAL FUNCTION LL(I)
    INTEGER, INTENT(IN) :: I
    INTEGER :: LL
    POINTER  :: LL ! { dg-error " POINTER attribute conflicts with ELEMENTAL attribute" }
  END FUNCTION LL
END MODULE Test

! { dg-final { cleanup-modules "test" } }