https://gcc.gnu.org/bugzilla/show_bug.cgi?id=24639 Bug 24639 depends on bug 109434, which changed state.
Bug 109434 Summary: [12 Regression] std::optional weird -Wmaybe-uninitialized and behaviour with -O2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109434 What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution|--- |FIXED