https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121601
Bug ID: 121601
Summary: ICE when exception is thrown from static_assert
message expression
Product: gcc
Version: 16.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: hanicka at hanicka dot net
Target Milestone: ---
Link to CE: https://godbolt.org/z/EK6GTs36h
git revision: 3b58b78f1a1fed8b273ee88f42bf5b5bc189d511
Following code crashes latest GCC at CE:
```c++
struct hana_string {
constexpr const char * data() const noexcept;
constexpr unsigned size() const noexcept;
};
consteval hana_string get_message() {
throw 42;
}
static_assert(false, get_message());
```
Expected behaviour: an error message something like "get_message()" call is not
constant evaluatable due uncaught exception thrown out of it.