Skip to content

Commit cd13fc4

Browse files
committed
Added two test cases
1 parent fd2cd3d commit cd13fc4

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

clang/test/OpenMP/unroll_messages.cpp

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,17 @@ void func(int n) {
5858
// expected-error@+1 {{argument to 'partial' clause must be a strictly positive integer value}}
5959
#pragma omp unroll partial(0)
6060
for (int i = 0; i < n; ++i) {}
61-
62-
// expected-error@+1 {{directive '#pragma omp unroll' cannot contain more than one 'partial' clause}}
61+
62+
// expected-error@+1 {{unroll factor has width 64 but the iteration variable 'int' is only 32 bits wide}}
63+
#pragma omp unroll partial(0xFFFFFFFFF)
64+
for (int i = 0; i < 10; i++)
65+
66+
// expected-error@+2 {{integer literal is too large to be represented in any integer type}}
67+
// expected-error@+1 {{argument to 'partial' clause must be a strictly positive integer value}}
68+
#pragma omp unroll partial(0x10000000000000000)
69+
for (int i = 0; i < 10; i++)
70+
71+
// expected-error@+1 {{directive '#pragma omp unroll' cannot contain more than one 'partial' clause}}
6372
#pragma omp unroll partial partial
6473
for (int i = 0; i < n; ++i) {}
6574

0 commit comments

Comments
 (0)