| 1 |
! { dg-do compile } |
| 2 |
! { dg-options "-fopenmp" } |
| 3 |
|
| 4 |
module m |
| 5 |
implicit none (type, external) |
| 6 |
|
| 7 |
interface |
| 8 |
integer function step (x, y, z) |
| 9 |
integer :: x, y, z |
| 10 |
end function step |
| 11 |
end interface |
| 12 |
|
| 13 |
contains |
| 14 |
|
| 15 |
integer function foo (x) |
| 16 |
integer, value :: x |
| 17 |
integer :: i |
| 18 |
!$omp parallel do linear (x : step (step (1, 2, 3))) |
| 19 |
do i = 0, 63 |
| 20 |
x = x + 6 |
| 21 |
end do |
| 22 |
foo = x |
| 23 |
end |
| 24 |
|
| 25 |
integer function bar (x) |
| 26 |
integer, value :: x |
| 27 |
integer :: i |
| 28 |
!$omp parallel do linear (x : step (1, 2, 3)) ! { dg-error "40: Invalid character in name" } |
| 29 |
do i = 0, 63 |
| 30 |
x = x + 6 |
| 31 |
end do |
| 32 |
bar = x |
| 33 |
end |
| 34 |
|
| 35 |
integer function bar2 (x) |
| 36 |
integer, value :: x |
| 37 |
integer :: i |
| 38 |
!$omp parallel do linear (x : step (1, 2, 3) * 1) |
| 39 |
do i = 0, 63 |
| 40 |
x = x + 6 |
| 41 |
end do |
| 42 |
bar2 = x |
| 43 |
end |
| 44 |
end module |