Skip to content

Commit 32e4311

Browse files
authored
[SYCL] Test for PR #7918 - invalid value in named_sub_group_size (#7932)
When PR #7918 was submitted, a test wasn't added along with it.
1 parent e98d732 commit 32e4311

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 attribute value is not
5+
// added to the 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)