Hi!

This testcase has been fixed by the PR113921 fix, but unlike testcase
in there this one is not target specific.

Tested on x86_64-linux -m32/-m64, committed to trunk as obvious.

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 ();
+}

        Jakub

Reply via email to