Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check forbidden kernel constructs in constant evaluated context #976

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

keryell
Copy link
Member

@keryell keryell commented Oct 30, 2024

There are a lot of restrictions for kernel code, except when present in a constant evaluated context.

This is a test corresponding to the specification clarification introduced by PR KhronosGroup/SYCL-Docs#388

@keryell keryell added the enhancement New feature or request label Oct 30, 2024
@keryell keryell requested a review from a team as a code owner October 30, 2024 21:52
There are a lot of restrictions for kernel code, except when present in a
constant evaluated context.

This is a test corresponding to the specification clarification introduced by PR
KhronosGroup/SYCL-Docs#388
// through forbidden function pointer which is skipped by the if
// constexpr.
auto* p = f;
auto other = p(5) + f(6);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that this part does not test a feature used in a manifestly constant evaluated expression.

Rather, I think this is testing that you can use forbidden C++ features in a discarded statement. We did not make this legal in KhronosGroup/SYCL-Docs#388. Potentially, we could consider making this legal, but that would require a separate change to the spec.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have allowed "discarded statements" in KhronosGroup/SYCL-Docs@966a051 (#388)

@tomdeakin
Copy link
Contributor

KhronosGroup/SYCL-Docs#388 was approved to merge.
This is just waiting the temporary disable.

@steffenlarsen
Copy link
Contributor

With #987 merged, the DPC++ CI should be passing. @keryell - I took the liberty of updating the branch. Be aware of the need for a local pull. 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants