summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/pr92993.f90
blob: b73355357b5f0ce7dd0306de633ac9ecd9fe1042 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
! { dg-do compile }
!
! Original by G. Steinmetz

function f(x)
  integer, intent(in) :: x
  integer :: f
  f = x
end

program p
  interface
    function f(x) ! { dg-error "POINTER attribute mismatch in function result" }
      integer, intent(in) :: x
      integer, pointer :: f
    end
  end interface
  integer :: a(2) = [1, 2]
  if ( a(2) .ne. f(a(2)) ) stop 1
end