https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93668
--- Comment #7 from fdlbxtqi <euloanty at live dot com> --- I mean it is a bug. constexpr int f() { auto p(new int[10000]); delete p; return 4; } int main() { constexpr auto w(f()); } I mean this is UB so it should not compile. However, it compiles on the latest GCC. Not detecting this is a series of security vulnerabilities if people using it at runtime.