File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -59,14 +59,22 @@ void func(int n) {
5959 #pragma omp unroll partial(0)
6060 for (int i = 0 ; i < n; ++i) {}
6161
62- // expected-error@+1 {{unroll factor has width 64 but the iteration variable 'int' is only 32 bits wide}}
62+ // expected-error@+1 {{unroll factor has width 36 but the iteration variable 'int' is only 32 bits wide}}
6363 #pragma omp unroll partial(0xFFFFFFFFF)
64- for (int i = 0 ; i < 10 ; i++)
64+ for (int i = 0 ; i < 10 ; i++) {}
6565
6666 // expected-error@+2 {{integer literal is too large to be represented in any integer type}}
6767 // expected-error@+1 {{argument to 'partial' clause must be a strictly positive integer value}}
6868 #pragma omp unroll partial(0x10000000000000000)
69- for (int i = 0 ; i < 10 ; i++)
69+ for (int i = 0 ; i < 10 ; i++) {}
70+
71+ // expected-error@+1 {{unroll factor has width 12 but the iteration variable 'char' is only 8 bits wide}}
72+ #pragma omp unroll partial(0xFFF)
73+ for (char i = 0 ; i < 10 ; i++) {}
74+
75+ // expected-error@+1 {{unroll factor has width 20 but the iteration variable 'short' is only 16 bits wide}}
76+ #pragma omp unroll partial(0xFFFFF)
77+ for (short i = 0 ; i < 10 ; i++) {}
7078
7179 // expected-error@+1 {{directive '#pragma omp unroll' cannot contain more than one 'partial' clause}}
7280 #pragma omp unroll partial partial
You can’t perform that action at this time.
0 commit comments