integer :: a(n), i
integer, external :: fact
i = 1
- !$acc routine (fact) ! { dg-error "\\!\\$ACC ROUTINE statement at \\(1\\) cannot appear after executable statements" }
+ !$acc routine (fact) ! { dg-error "\\!\\\$ACC ROUTINE statement at \\(1\\) cannot appear after executable statements" }
!$acc routine () ! { dg-error "Syntax error in \\\!\\\$ACC ROUTINE \\\( NAME \\\)" }
!$acc parallel
!$acc loop
integer, intent(in) :: x
integer :: res
res = 1
- !$acc routine ! { dg-error "\\!\\$ACC ROUTINE statement at \\(1\\) cannot appear after executable statements" }
+ !$acc routine ! { dg-error "\\!\\\$ACC ROUTINE statement at \\(1\\) cannot appear after executable statements" }
if (x < 1) then
res = 1
else
integer, intent(inout) :: x
integer i
i = 0
- !$acc routine ! { dg-error "\\!\\$ACC ROUTINE statement at \\(1\\) cannot appear after executable statements" }
+ !$acc routine ! { dg-error "\\!\\\$ACC ROUTINE statement at \\(1\\) cannot appear after executable statements" }
x = x + 1
end subroutine incr
integer :: res
integer i
i = 0
- !$acc routine ! { dg-error "\\!\\$ACC ROUTINE statement at \\(1\\) cannot appear after executable statements" }
+ !$acc routine ! { dg-error "\\!\\\$ACC ROUTINE statement at \\(1\\) cannot appear after executable statements" }
if (x < 1) then
res = 1
else
continue
- !$omp declare variant (base: variant) match (construct={parallel}) ! { dg-error "\\!\\$OMP DECLARE VARIANT statement at \\(1\\) cannot appear after executable statements" }
+ !$omp declare variant (base: variant) match (construct={parallel}) ! { dg-error "\\!\\\$OMP DECLARE VARIANT statement at \\(1\\) cannot appear after executable statements" }
contains
subroutine base ()
continue
- !$omp declare variant (variant) match (construct={parallel}) ! { dg-error "\\!\\$OMP DECLARE VARIANT statement at \\(1\\) cannot appear after executable statements" }
+ !$omp declare variant (variant) match (construct={parallel}) ! { dg-error "\\!\\\$OMP DECLARE VARIANT statement at \\(1\\) cannot appear after executable statements" }
end subroutine
end program
implicit none
integer, save :: t
t = 1
- !$omp threadprivate (t1) ! { dg-error "\\!\\$OMP THREADPRIVATE statement at \\(1\\) cannot appear after executable statements" }
+ !$omp threadprivate (t1) ! { dg-error "\\!\\\$OMP THREADPRIVATE statement at \\(1\\) cannot appear after executable statements" }
end subroutine f2
subroutine f3
use m
implicit none
integer :: j
j = 1
- !$omp declare reduction (foo:real:omp_out = omp_out + omp_in) ! { dg-error "\\!\\$OMP DECLARE REDUCTION statement at \\(1\\) cannot appear after executable statements" }
+ !$omp declare reduction (foo:real:omp_out = omp_out + omp_in) ! { dg-error "\\!\\\$OMP DECLARE REDUCTION statement at \\(1\\) cannot appear after executable statements" }
end subroutine f3
subroutine f4
use m
!$omp declare target
integer, save :: f4_1
f4_1 = 1
- !$omp declare target (f4_1) ! { dg-error "\\!\\$OMP DECLARE TARGET statement at \\(1\\) cannot appear after executable statements" }
- !$omp declare target ! { dg-error "\\!\\$OMP DECLARE TARGET statement at \\(1\\) cannot appear after executable statements" }
+ !$omp declare target (f4_1) ! { dg-error "\\!\\\$OMP DECLARE TARGET statement at \\(1\\) cannot appear after executable statements" }
+ !$omp declare target ! { dg-error "\\!\\\$OMP DECLARE TARGET statement at \\(1\\) cannot appear after executable statements" }
end subroutine f4
integer function f5 (a, b)
integer :: a, b
a = 1; b = 2
- !$omp declare simd (f5) notinbranch ! { dg-error "\\!\\$OMP DECLARE SIMD statement at \\(1\\) cannot appear after executable statements" }
+ !$omp declare simd (f5) notinbranch ! { dg-error "\\!\\\$OMP DECLARE SIMD statement at \\(1\\) cannot appear after executable statements" }
end function f5
end subroutine f1
! PR fortran/78026
select type (a) ! { dg-error "Selector shall be polymorphic in SELECT TYPE statement" }
end select
-!$omp declare simd(b) ! { dg-error "\\!\\$OMP DECLARE SIMD statement at \\(1\\) cannot appear after executable statements" }
+!$omp declare simd(b) ! { dg-error "\\!\\\$OMP DECLARE SIMD statement at \\(1\\) cannot appear after executable statements" }
end ! { dg-error "should refer to containing procedure" "" { target *-*-* } .-1 }
subroutine foobar
i = 5 ! < execution statement
-!$omp requires atomic_default_mem_order(seq_cst) ! { dg-error "\\!\\$OMP REQUIRES statement at \\(1\\) cannot appear after executable statements" }
+!$omp requires atomic_default_mem_order(seq_cst) ! { dg-error "\\!\\\$OMP REQUIRES statement at \\(1\\) cannot appear after executable statements" }
end
program main
subroutine foobar
!$omp atomic
i = i + 5
-!$omp requires atomic_default_mem_order(acq_rel) ! { dg-error "\\!\\$OMP REQUIRES statement at \\(1\\) cannot appear after executable statements" }
+!$omp requires atomic_default_mem_order(acq_rel) ! { dg-error "\\!\\\$OMP REQUIRES statement at \\(1\\) cannot appear after executable statements" }
end