https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98322
Bug ID: 98322 Summary: optimizes to false instead true Product: gcc Version: 10.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: sucicf1 at outlook dot com Target Milestone: --- bool always_true (bool a, bool b) { return (a == b) == (~a ^ b); } is optimized to xorl %eax, %eax ret instead return 1.