From 7f2fe58480cc4e5d430029d8a2bfab4d7309341a Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Mon, 21 Mar 2011 03:28:40 +0000 Subject: [PATCH] Add 2 testcases for PR rtl-optimization/47502. From-SVN: r171205 --- gcc/testsuite/ChangeLog | 6 ++++++ gcc/testsuite/gcc.target/i386/pr47502-1.c | 8 ++++++++ gcc/testsuite/gcc.target/i386/pr47502-2.c | 12 ++++++++++++ 3 files changed, 26 insertions(+) create mode 100644 gcc/testsuite/gcc.target/i386/pr47502-1.c create mode 100644 gcc/testsuite/gcc.target/i386/pr47502-2.c diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index cf81f1a7fc3..251ffe70864 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2011-03-20 H.J. Lu + + PR rtl-optimization/47502 + * gcc.target/i386/pr47502-1.c: New. + * gcc.target/i386/pr47502-2.c: Likewise. + 2011-03-20 Jakub Jelinek 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 index 00000000000..727afe944e5 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr47502-1.c @@ -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 index 00000000000..1f57ea017e1 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr47502-2.c @@ -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; +} -- 2.30.2