File tree Expand file tree Collapse file tree 1 file changed +38
-0
lines changed
flang/test/Semantics/OpenMP Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change
1
+ ! REQUIRES: openmp_runtime
2
+
3
+ ! RUN: %python %S/../test_errors.py %s %flang_fc1 -fopenmp
4
+ !
5
+
6
+ module new_operator
7
+ implicit none
8
+ private
9
+ public operator (.MYOPERATOR.)
10
+
11
+ interface operator (.MYOPERATOR. )
12
+ module procedure myprocedure
13
+ end interface
14
+ contains
15
+ pure integer function myprocedure(param1, param2)
16
+ integer , intent (in ) :: param1, param2
17
+ myprocedure = param1 + param2
18
+ end function
19
+ end module
20
+
21
+ program sample
22
+ use omp_lib
23
+ use new_operator
24
+ implicit none
25
+ integer :: x, y
26
+
27
+
28
+ ! $omp atomic update
29
+ x = x / y
30
+
31
+ ! $omp atomic update
32
+ ! ERROR: Invalid or missing operator in atomic update statement
33
+ x = x .MYOPERATOR. y
34
+
35
+ ! $omp atomic
36
+ ! ERROR: Invalid or missing operator in atomic update statement
37
+ x = x .MYOPERATOR. y
38
+ end program
You can’t perform that action at this time.
0 commit comments