aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/value_8.f90
blob: 8273fe88b60e375de901f9d3a0d29f7f32f11cef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
! { dg-do compile }
! PR97491 - Wrong restriction for VALUE arguments of pure procedures

pure function foo (x) result (ret)
  integer        :: ret
  integer, value :: x
  x = x / 2
  ret = x
end function foo

elemental function foo1 (x)
  integer        :: foo1
  integer, value :: x
  x = x / 2
  foo1 = x
end function foo1