OSDN Git Service

Add 2 testcases for PR rtl-optimization/47502.
authorhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 21 Mar 2011 03:28:40 +0000 (03:28 +0000)
committerhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 21 Mar 2011 03:28:40 +0000 (03:28 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@171205 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/pr47502-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/pr47502-2.c [new file with mode: 0644]

index cf81f1a..251ffe7 100644 (file)
@@ -1,3 +1,9 @@
+2011-03-20  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR rtl-optimization/47502
+       * gcc.target/i386/pr47502-1.c: New.
+       * gcc.target/i386/pr47502-2.c: Likewise.
+
 2011-03-20  Jakub Jelinek  <jakub@redhat.com>
 
        PR rtl-optimization/48156
diff --git a/gcc/testsuite/gcc.target/i386/pr47502-1.c b/gcc/testsuite/gcc.target/i386/pr47502-1.c
new file mode 100644 (file)
index 0000000..727afe9
--- /dev/null
@@ -0,0 +1,8 @@
+/* { dg-do compile } */
+/* { dg-options "-O" } */
+
+void
+foo (const void *xxxxx, void *yyyyy, long y)
+{
+  asm volatile ("" :: "c" ((xxxxx)), "d" ((yyyyy)), "S" (y));
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr47502-2.c b/gcc/testsuite/gcc.target/i386/pr47502-2.c
new file mode 100644 (file)
index 0000000..1f57ea0
--- /dev/null
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+int
+foo (int how, const void *set, void *oset)
+{
+  int resultvar;
+  asm volatile (""
+                : "=a" (resultvar)
+                : "0" (14) , "b" (how), "c" ((set)), "d" ((oset)), "S" (65 / 8) : "memory", "cc");
+  return resultvar;
+}