]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
PR target/35318
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 3 Feb 2009 17:27:45 +0000 (17:27 +0000)
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 3 Feb 2009 17:27:45 +0000 (17:27 +0000)
* function.c (match_asm_constraints_1): Skip over
initial optional % in the constraint.

* gcc.c-torture/compile/pr35318.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@143901 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/function.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/compile/pr35318.c [new file with mode: 0644]

index a92228c9b113135f21d6e210f1d0690753c079a2..d9eb79f1a62aab2724ab32e9b334aaf5561411ff 100644 (file)
@@ -1,5 +1,9 @@
 2009-02-03  Jakub Jelinek  <jakub@redhat.com>
 
+       PR target/35318
+       * function.c (match_asm_constraints_1): Skip over
+       initial optional % in the constraint.
+
        PR inline-asm/39059
        * c-parser.c (c_parser_postfix_expression): If fixed point is not
        supported, don't accept FIXED_CSTs.
index 0cf4d5d000021632b6bf519b2a51e953e766bb14..7489dc915dd8c72cd5406cffedfe64ea10a458a9 100644 (file)
@@ -5477,6 +5477,9 @@ match_asm_constraints_1 (rtx insn, rtx *p_sets, int noutputs)
       char *end;
       int match, j;
 
+      if (*constraint == '%')
+       constraint++;
+
       match = strtoul (constraint, &end, 10);
       if (end == constraint)
        continue;
index 4062c8688a50712d438610681b3be518f7677c80..1df4e70f70330e57b0431164468365e0e416ef1e 100644 (file)
@@ -1,5 +1,8 @@
 2009-02-03  Jakub Jelinek  <jakub@redhat.com>
 
+       PR target/35318
+       * gcc.c-torture/compile/pr35318.c: New test.
+
        PR inline-asm/39059
        * gcc.dg/nofixed-point-2.c: New test.
        * g++.dg/ext/fixed1.C: Adjust expected diagnostics.
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr35318.c b/gcc/testsuite/gcc.c-torture/compile/pr35318.c
new file mode 100644 (file)
index 0000000..85bb362
--- /dev/null
@@ -0,0 +1,8 @@
+/* PR target/35318 */
+
+void
+foo ()
+{
+  double x = 4, y;
+  __asm__ volatile ("" : "=r,r" (x), "=r,r" (y) : "%0,0" (x), "m,r" (8));
+}