[Bug tree-optimization/114253] [13/14/15/16 regression] False positive maybe-uninitialized with std::optional and ternary
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Sep 1 05:21:37 GMT 2025
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114253
--- Comment #9 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
This looks fixed in GCC 15+. Most likely by r15-6052-g12de1942a0a673 and
r15-9400-ge7bccec33beece . GCC now zeros out the full std::optional<int> in
this case. The missed optimization is still there. Plus there seems like there
is another missed optimization with execeptions on and SRA off but I am not
100% sure.
More information about the Gcc-bugs
mailing list