https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116185
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Created attachment 58802 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58802&action=edit Reduced testcase `-fcompare-debug -fno-exceptions -fno-rtti -O2 -gno-statement-frontiers` is able to reproduce it with this testcase. Note -gno-statement-frontiers is there just in case as there are some known issues with statement-frontiers causing compare debug failures. Also the reduced testcase I think does not have any undefined behaviors in it as far as I can tell either.