1! { dg-do compile } 2 3program test 4 implicit none 5 6 logical :: x 7 integer :: i 8 9 !$acc parallel if ! { dg-error "Failed to match clause" } 10 !$acc parallel if () ! { dg-error "Invalid character" } 11 !$acc parallel if (i) ! { dg-error "scalar LOGICAL expression" } 12 !$acc end parallel 13 !$acc parallel if (1) ! { dg-error "scalar LOGICAL expression" } 14 !$acc end parallel 15 !$acc kernels if (i) ! { dg-error "scalar LOGICAL expression" } 16 !$acc end kernels 17 !$acc kernels if ! { dg-error "Failed to match clause" } 18 !$acc kernels if () ! { dg-error "Invalid character" } 19 !$acc kernels if (1) ! { dg-error "scalar LOGICAL expression" } 20 !$acc end kernels 21 !$acc data if ! { dg-error "Failed to match clause" } 22 !$acc data if () ! { dg-error "Invalid character" } 23 !$acc data if (i) ! { dg-error "scalar LOGICAL expression" } 24 !$acc end data 25 !$acc data if (1) ! { dg-error "scalar LOGICAL expression" } 26 !$acc end data 27 28 ! at most one if clause may appear 29 !$acc parallel if (.false.) if (.false.) { dg-error "Failed to match clause" } 30 !$acc kernels if (.false.) if (.false.) { dg-error "Failed to match clause" } 31 !$acc data if (.false.) if (.false.) { dg-error "Failed to match clause" } 32 33 !$acc parallel if (x) 34 !$acc end parallel 35 !$acc parallel if (.true.) 36 !$acc end parallel 37 !$acc parallel if (i.gt.1) 38 !$acc end parallel 39 !$acc kernels if (x) 40 !$acc end kernels 41 !$acc kernels if (.true.) 42 !$acc end kernels 43 !$acc kernels if (i.gt.1) 44 !$acc end kernels 45 !$acc data if (x) 46 !$acc end data 47 !$acc data if (.true.) 48 !$acc end data 49 !$acc data if (i.gt.1) 50 !$acc end data 51 52end program test 53