https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119194
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Summary|GCC 14.2.0: Incorrect |[14/15 Regression] GCC
|Handling of const |14.2.0: Incorrect Handling
|std::string_view& as a |of reference to a local
|Template Argument |constexpr as a Template
| |Argument
Last reconfirmed| |2025-03-10
Status|UNCONFIRMED |NEW
Target Milestone|--- |14.3
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed.
Reduced testcase:
```
template <const int& Str>
[[gnu::noipa]]
int get_length() {
return Str;
}
static constexpr int sssss{ 3};
int main() {
if (get_length<sssss>() != sssss)
__builtin_abort();
return 0;
}
```
the constexpr here is important.