Debian Codegraph @

gcc/testsuite/gfortran.dg/pr92993.f90

raw
1 ! { dg-do compile }
2 !
3 ! Original by G. Steinmetz
4
5 function f(x)
6 integer, intent(in) :: x
7 integer :: f
8 f = x
9 end
10
11 program p
12 interface
13 function f(x) ! { dg-error "POINTER attribute mismatch in function result" }
14 integer, intent(in) :: x
15 integer, pointer :: f
16 end
17 end interface
18 integer :: a(2) = [1, 2]
19 if ( a(2) .ne. f(a(2)) ) stop 1
20 end
21