aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Matz <matz@suse.de>2007-10-05 15:36:16 +0000
committerMichael Matz <matz@gcc.gnu.org>2007-10-05 15:36:16 +0000
commit1596d61e6efe75dd6fdf2b23d6028f1431143ccb (patch)
tree4d399a9e5d91e9feddce47292268b08a2c55eaea
parentca39e6f200109cd52ad6102a6b272cc95f6f9aea (diff)
downloadgcc-1596d61e6efe75dd6fdf2b23d6028f1431143ccb.zip
gcc-1596d61e6efe75dd6fdf2b23d6028f1431143ccb.tar.gz
gcc-1596d61e6efe75dd6fdf2b23d6028f1431143ccb.tar.bz2
re PR inline-asm/33600 (Breakage caused by the fix to PR33552)
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
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/function.c2
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.target/i386/pr33600.c10
4 files changed, 22 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 70c369a..8c6c773 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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.
diff --git a/gcc/function.c b/gcc/function.c
index c373684..d05d1b2 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -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);
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index ca33da8..6b06d14 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -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
index 0000000..a2ab91e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr33600.c
@@ -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;
+}