| 1 |
! PR fortran/79154 |
| 2 |
! { dg-do compile } |
| 3 |
|
| 4 |
pure real function foo (a, b) |
| 5 |
!$omp declare simd(foo) ! { dg-bogus "may not appear in PURE" } |
| 6 |
real, intent(in) :: a, b |
| 7 |
foo = a + b |
| 8 |
end function foo |
| 9 |
pure function bar (a, b) |
| 10 |
real, intent(in) :: a(8), b(8) |
| 11 |
real :: bar(8) |
| 12 |
integer :: i |
| 13 |
!$omp simd ! { dg-bogus "may not appear in PURE" } |
| 14 |
do i = 1, 8 |
| 15 |
bar(i) = a(i) + b(i) |
| 16 |
end do |
| 17 |
end function bar |
| 18 |
pure real function baz (a, b) |
| 19 |
!$omp declare target ! { dg-bogus "may not appear in PURE" } |
| 20 |
real, intent(in) :: a, b |
| 21 |
baz = a + b |
| 22 |
end function baz |
| 23 |
elemental real function fooe (a, b) |
| 24 |
!$omp declare simd(fooe) ! { dg-bogus "may not appear in PURE" } |
| 25 |
real, intent(in) :: a, b |
| 26 |
fooe = a + b |
| 27 |
end function fooe |
| 28 |
elemental real function baze (a, b) |
| 29 |
!$omp declare target ! { dg-bogus "may not appear in PURE" } |
| 30 |
real, intent(in) :: a, b |
| 31 |
baze = a + b |
| 32 |
end function baze |
| 33 |
elemental impure real function bazei (a, b) |
| 34 |
!$omp declare target ! { dg-bogus "may not appear in PURE" } |
| 35 |
real, intent(in) :: a, b |
| 36 |
baze = a + b |
| 37 |
end function bazei |