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

Compiler crash when nested template function doesn't use templated argument #2825

Open
aneshlya opened this issue Apr 2, 2024 · 0 comments
Labels
Crash All compiler crashes

Comments

@aneshlya
Copy link
Collaborator

aneshlya commented Apr 2, 2024

This issue was discovered in #2790 (comment).
Nested template (foo2) without templated arguments https://ispc.godbolt.org/z/fe9szMa4v - breaks.
Nested template (foo2) with templated arguments https://ispc.godbolt.org/z/eK8j1bqcq - works.

When function has templated arguments, we check it in ResolveOverloads https://github.com/ispc/ispc/blob/main/src/expr.cpp#L8900 and return earlier before doing AddInstantiation. If not, we continue executing the function and create a new instantiation, but it's too earlier for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Crash All compiler crashes
Projects
Status: No status
Development

No branches or pull requests

2 participants