aboutsummaryrefslogtreecommitdiff
path: root/offload/test/offloading/fortran/io.f90
blob: 67bf5e915a20a4d8e3ed37068a8711e4ed3d28b4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
! REQUIRES: flang, libc
! RUN: %libomptarget-compile-fortran-run-and-check-generic

program io_test
  implicit none

  integer :: i
  real :: r
  complex :: c
  logical :: l

  i = 42
  r = 3.14
  c = (1.0, -1.0)
  l = .true.

  ! CHECK: Text 42 3.14 (1.,-1.) T
  ! CHECK: Text 42 3.14 (1.,-1.) T
  ! CHECK: Text 42 3.14 (1.,-1.) T
  ! CHECK: Text 42 3.14 (1.,-1.) T
  !$omp target teams num_teams(4)
  !$omp parallel num_threads(1)
    print *, "Text", " ", i, " ", r, " ", c, " ", l
  !$omp end parallel
  !$omp end target teams

end program io_test