-
Notifications
You must be signed in to change notification settings - Fork 11.3k
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
Clang++ crashes when using fmt on object with consteval constructor #55871
Comments
@llvm/issue-subscribers-clang-codegen |
The crash point seems to be the same. In my case, this happens randomly (> 50% of the time, just compiling again (and again...) can solve the problem and produce apparently valid code). But I can't figure out where exactly in my code. In my case, fmt and consteval are not used.
|
I have managed to reproduce the crash without the dependencies. I would also like to note that using parenthesis for constructor initialisation instead of braces does not result in a crash. Also using a single parameter does not lead to a crash, that is modifying Godbolt: https://godbolt.org/z/bP571b477
The crash seems to be caused from a
This tree is last modified by
Eventually
This is all that I have found for now. From what I can see the fix involves changing |
There are similar crash issues related to the fmt library when the fmt arguments are ill-formed. |
@llvm/issue-subscribers-c-20 |
I can confirm this is an issue, and thank you @Abstract-Everything for the detailed investigative work! I've taken a stab at working around this issue in https://reviews.llvm.org/D131194 -- the changes to the template instantiation code are likely to be far more involved. |
Minimal working example:
https://godbolt.org/z/ErPn95a8T
Note gcc successfully compiles this
The text was updated successfully, but these errors were encountered: