https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107385
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> --- So 2024-02-15 Jakub Jelinek <ja...@redhat.com> PR middle-end/107385 * gcc.dg/pr107385.c: New test. --- gcc/testsuite/gcc.dg/pr107385.c.jj 2024-01-13 00:05:00.077372302 +0100 +++ gcc/testsuite/gcc.dg/pr107385.c 2024-02-15 09:18:47.711260427 +0100 @@ -0,0 +1,20 @@ +/* PR middle-end/107385 */ +/* { dg-do run } */ +/* { dg-options "-O2" } */ + +__attribute__((noipa)) int +foo (void) +{ + int x; + asm goto ("": "=r" (x) : "0" (15) :: lab); + x = 6; +lab: + return x; +} + +int +main () +{ + if (foo () != 6) + __builtin_abort (); +}