gcc/testsuite/gfortran.dg/gomp/declare-simd-2.f90
raw| 1 | ! { dg-do compile } |
| 2 | |
| 3 | function f1 (a, b, c, d, e, f) |
| 4 | integer, value :: a, b, c |
| 5 | integer :: d, e, f, f1 |
| 6 | !$omp declare simd (f1) uniform(b) linear(c, d) linear(uval(e)) linear(ref(f)) |
| 7 | a = a + 1 |
| 8 | b = b + 1 |
| 9 | c = c + 1 |
| 10 | d = d + 1 |
| 11 | e = e + 1 |
| 12 | f = f + 1 |
| 13 | f1 = a + b + c + d + e + f |
| 14 | end function f1 |
| 15 | integer function f2 (a, b) |
| 16 | integer :: a, b |
| 17 | !$omp declare simd uniform(b) linear(ref(a):b) |
| 18 | a = a + 1 |
| 19 | f2 = a + b |
| 20 | end function f2 |