[Bug c++/123340] ICE with stmt expression inside a template function with a static_assert as the last expression
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Dec 30 17:39:09 GMT 2025
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123340
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Keywords| |ice-on-valid-code
Status|UNCONFIRMED |NEW
Last reconfirmed| |2025-12-30
Known to fail| |10.3.0, 13.1.0
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Slightly different testcase, the other one worked for some versions:
```
template <int a>
void foo() {
({ static_assert(a, ""); });
}
```
Confirmed.
More information about the Gcc-bugs
mailing list