Add 2 testcases for PR rtl-optimization/47502.
authorH.J. Lu <hongjiu.lu@intel.com>
Mon, 21 Mar 2011 03:28:40 +0000 (03:28 +0000)
committerH.J. Lu <hjl@gcc.gnu.org>
Mon, 21 Mar 2011 03:28:40 +0000 (20:28 -0700)
From-SVN: r171205

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 cf81f1a7fc34d57096e614df8d8ec29c961d425e..251ffe70864eceeb2affbc1781a8157b94ac1080 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;
+}