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

Incorrect builtins are exposed for offload targets #64436

Open
AaronBallman opened this issue Aug 4, 2023 · 2 comments
Open

Incorrect builtins are exposed for offload targets #64436

AaronBallman opened this issue Aug 4, 2023 · 2 comments
Labels
bug Indicates an unexpected problem or unintended behavior clang:frontend Language frontend issues, e.g. anything involving "Sema"

Comments

@AaronBallman
Copy link
Collaborator

When using -aux-triple for an offload target, the incorrect builtins are being exposed. The builtins exposed are not based on the target specified. e.g,

static_assert(__has_builtin(__cpuidex), "uh oh");

will not fail when given: -c -fopenmp -Xclang -fopenmp-is-target-device -Xclang -aux-triple -Xclang x86_64-unknown-linux-gnu, but it should fail because that's a Windows-specific builtin. Removing the -aux-triple will cause the assertion to trigger as expected.

https://godbolt.org/z/sbMjjer16

@AaronBallman AaronBallman added bug Indicates an unexpected problem or unintended behavior clang:frontend Language frontend issues, e.g. anything involving "Sema" labels Aug 4, 2023
@llvmbot
Copy link
Collaborator

llvmbot commented Aug 4, 2023

@llvm/issue-subscribers-bug

@llvmbot
Copy link
Collaborator

llvmbot commented Aug 4, 2023

@llvm/issue-subscribers-clang-frontend

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behavior clang:frontend Language frontend issues, e.g. anything involving "Sema"
Projects
None yet
Development

No branches or pull requests

2 participants