gcc/testsuite/gfortran.dg/gomp/pr77374.f08
raw| 1 | ! PR fortran/77374 |
| 2 | ! { dg-do compile } |
| 3 | |
| 4 | subroutine foo (a, b) |
| 5 | integer :: a, b |
| 6 | !$omp atomic |
| 7 | b = b + a |
| 8 | !$omp atomic |
| 9 | z(1) = z(1) + 1 ! { dg-error "must have the pointer attribute" } |
| 10 | end subroutine |
| 11 | subroutine bar (a, b) |
| 12 | integer :: a, b |
| 13 | interface |
| 14 | function baz (i) result (res) |
| 15 | integer, pointer :: res |
| 16 | integer :: i |
| 17 | end function |
| 18 | end interface |
| 19 | !$omp atomic |
| 20 | baz (i) = 1 ! { dg-error "unexpected" } |
| 21 | end subroutine |