https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121279
Bug ID: 121279 Summary: [14/15/16 Regression] wrong code due to load of a bool from an union being pulled out of loop Product: gcc Version: 14.2.0 Status: UNCONFIRMED Keywords: wrong-code Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: pinskia at gcc dot gnu.org Target Milestone: --- Created attachment 61985 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=61985&action=edit testcase /* truthy was being miscompiled for the value.type==2 case, because the bool load from the union is pulled out of the loop but that was conditional before and now it is not, so turns it into `s_item_mem.type == 1 | bool` which is not valid if `s_item_mem.type == 2` . */ Similar to PR 120122 but there is no VCE here but rather a bool load from an union.