Skip to content

Commit 9efc407

Browse files
committed
[SYCL] Test for PR #7918 - invalid value in named_sub_group_size
When PR #7918 was submitted, a test wasn't added along with it.
1 parent 81ca1dc commit 9efc407

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
+// RUN: %clang_cc1 -fsycl-is-device -sycl-std=2020 -fsyntax-only %s -ast-dump -Wno-ignored-attributes | FileCheck %s
2+
+
3+
+// Check that when an invalid value is specified for the attribute
4+
+// intel::named_sub_group_size, an invalid value is not added to the
5+
+// function declaration.
6+
+
7+
+// CHECK: FunctionDecl {{.*}} f1 'void ()'
8+
+// CHECK-NOT: IntelNamedSubGroupSizeAttr
9+
+[[intel::named_sub_group_size(invalid)]] void f1();
10+
+// CHECK: FunctionDecl {{.*}} f2 'void ()'
11+
+// CHECK-NOT: IntelNamedSubGroupSizeAttr
12+
+[[intel::named_sub_group_size("invalid string")]] void f2();

0 commit comments

Comments
 (0)