aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/f2c_3.f90
blob: b7a9785085ef4b6c1e9a1711da05bd54ab65068b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
! { dg-do run }
! { dg-options "-ff2c" }
! Verifies that internal functions are not broken by f2c calling conventions
program test
  real, target :: f
  real, pointer :: q
  real :: g
  f = 1.0
  q=>f
  g = foo(q)
  if (g .ne. 1.0) STOP 1
contains
function foo (p)
  real, pointer :: foo
  real, pointer :: p
  foo => p
end function
end program