https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55004 Bug 55004 depends on bug 89757, which changed state.
Bug 89757 Summary: accepts returning with reference to temporary in constant expression https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89757 What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED