Hi! This PR has been fixed by r16-4253 PR121206 fix.
Tested on x86_64-linux, -m32/-m64, committed to trunk as obvious. 2025-11-19 Jakub Jelinek <[email protected]> PR tree-optimization/121519 * gcc.dg/pr121519.c: Add testcase for already fixed PR. --- gcc/testsuite/gcc.dg/pr121519.c.jj 2025-11-19 13:23:45.758287199 +0100 +++ gcc/testsuite/gcc.dg/pr121519.c 2025-11-19 13:23:57.148124511 +0100 @@ -0,0 +1,41 @@ +/* PR tree-optimization/121519 */ +/* { dg-do compile { target int32plus } } */ +/* { dg-options "-O3" } */ + +extern int foo (void); +int a, b, c; + +int +bar (int f) +{ + int d = 0; + for (; d < 6; d++) + { + a = f <<= 1; + if (f & 64) + f ^= 67; + } + return a; +} + +void +baz (void) +{ + int i = 0; + if (c) + goto j; + i = -32644994; +k: + b = 0; +j: + if (foo () - 508050053 + bar (i + 79)) + goto k; +} + +int +main () +{ + while (a) + baz (); + return 0; +} Jakub
