This testcase has been fixed by the PR113921 fix, but unlike testcase
in there this one is not target specific.
2024-02-15 Jakub Jelinek <jakub@redhat.com>
PR middle-end/107385
* gcc.dg/pr107385.c: New test.
(cherry picked from commit
5459a9074afabf700f055fc8164f88dadb1c39b0)
--- /dev/null
+/* 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 ();
+}