]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR inline-asm/33600 (Breakage caused by the fix to PR33552)
authorMichael Matz <matz@suse.de>
Fri, 5 Oct 2007 15:36:16 +0000 (15:36 +0000)
committerMichael Matz <matz@gcc.gnu.org>
Fri, 5 Oct 2007 15:36:16 +0000 (15:36 +0000)
gcc/
 PR inline-asm/33600
 * function.c (match_asm_constraints_1): Check for input
 being used in the outputs.

testsuite/
 * gcc.target/i386/pr33600.c: New testcase.

From-SVN: r129035

gcc/ChangeLog
gcc/function.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/pr33600.c [new file with mode: 0644]

index 70c369a0c4b39bfeb94117916aa7c233527a9b51..8c6c7737c52aed4bfce3b08f963ea484b1a55c01 100644 (file)
@@ -1,3 +1,9 @@
+2007-10-05  Michael Matz  <matz@suse.de>
+
+       PR inline-asm/33600
+       * function.c (match_asm_constraints_1): Check for input
+       being used in the outputs.
+
 2007-10-05  Richard Guenther  <rguenther@suse.de>
 
        * tree-cfg.c (verify_gimple_expr): Accept OBJ_TYPE_REF.
index c37368415ea513dc1e44047f29ca397ea6e0e35e..d05d1b23bf44bf83d931f5861019090d2f2b9b77 100644 (file)
@@ -5716,7 +5716,7 @@ match_asm_constraints_1 (rtx insn, rtx *p_sets, int noutputs)
         which wouldn't have happen without this pass.  So, iterate over
         all operands and replace all occurences of the register used.  */
       for (j = 0; j < noutputs; j++)
-       if (!rtx_equal_p (SET_DEST (p_sets[j]), output)
+       if (!rtx_equal_p (SET_DEST (p_sets[j]), input)
            && reg_overlap_mentioned_p (input, SET_DEST (p_sets[j])))
          SET_DEST (p_sets[j]) = replace_rtx (SET_DEST (p_sets[j]),
                                              input, output);
index ca33da8fa45902aa4d8881f55471890ff08be4dd..6b06d140c319b07e2a2f317d98d8fbab8cd9358e 100644 (file)
@@ -1,3 +1,8 @@
+2007-10-05  Michael Matz  <matz@suse.de>
+
+       PR inline-asm/33600
+       * gcc.target/i386/pr33600.c: New testcase.
+
 2007-10-05  Richard Guenther  <rguenther@suse.de>
 
        * g++.dg/tree-ssa/obj-type-ref.C: New testcase.
diff --git a/gcc/testsuite/gcc.target/i386/pr33600.c b/gcc/testsuite/gcc.target/i386/pr33600.c
new file mode 100644 (file)
index 0000000..a2ab91e
--- /dev/null
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+int f(int n)
+{
+        int x;
+
+        asm("" : "=&c"(n), "=r"(x) : "1"(n), "0"(n));
+
+        return n;
+}