| ! RUN: %python %S/test_errors.py %s %flang_fc1 -Werror | |
| ! !DIR$ ALIGN is not supported for CUDA Fortran variables yet, ALLOCATABLE | |
| ! ones included: the directive is ignored with a warning. | |
| module m | |
| !WARNING: !DIR$ ALIGN is not yet implemented for CUDA Fortran variable 'dv' and was ignored [-Wignored-directive] | |
| !WARNING: !DIR$ ALIGN is not yet implemented for CUDA Fortran variable 'da' and was ignored [-Wignored-directive] | |
| !dir$ align(64) :: dv, da | |
| real, device :: dv(10) | |
| real, device, allocatable :: da(:) | |
| contains | |
| ! The local variables of a device subprogram get the DEVICE attribute | |
| ! implicitly. | |
| attributes(device) subroutine dev() | |
| !WARNING: !DIR$ ALIGN is not yet implemented for CUDA Fortran variable 'lv' and was ignored [-Wignored-directive] | |
| !WARNING: !DIR$ ALIGN is not yet implemented for CUDA Fortran variable 'la' and was ignored [-Wignored-directive] | |
| !dir$ align(64) :: lv, la | |
| real :: lv(10) | |
| real, allocatable :: la(:) | |
| ! A named constant is ignored as a named constant. | |
| !WARNING: !DIR$ ALIGN is ignored for 'lp' because it is a named constant [-Wignored-directive] | |
| !dir$ align(64) :: lp | |
| real, parameter :: lp = 1.0 | |
| block | |
| !WARNING: !DIR$ ALIGN is not yet implemented for CUDA Fortran variable 'bv' and was ignored [-Wignored-directive] | |
| !dir$ align(64) :: bv | |
| real :: bv(10) | |
| end block | |
| end subroutine | |
| end module |