https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112738
Bug ID: 112738 Summary: forwprop4 introduces invalid wide signed Boolean values Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: kristerw at gcc dot gnu.org Target Milestone: --- The forwprop4 pass introduces an invalid wide Boolean when compiling the following function with -O3 for X86_64: int *a, b, c, d; void foo (void) { for (; d <= 0; d++) b &= ((a || d) ^ c) == 1; } What is happening is that forwprop4 changes the IR _38 = (signed int) _16; _59 = -_38; _65 = (<signed-boolean:32>) _59; to the incorrect _55 = (<signed-boolean:32>) _16; _65 = -_55;