]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
memcpy-4.c: New test.
authorTom de Vries <tom@codesourcery.com>
Thu, 13 Oct 2011 09:54:58 +0000 (09:54 +0000)
committerTom de Vries <vries@gcc.gnu.org>
Thu, 13 Oct 2011 09:54:58 +0000 (09:54 +0000)
2011-10-13  Tom de Vries  <tom@codesourcery.com>

* gcc.dg/memcpy-4.c: New test.

From-SVN: r179897

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/memcpy-4.c [new file with mode: 0644]

index ea7d8d8580a3511f3851cc000c958d57523c9c76..94faa4724b54639f8f466767c1833590f6f2f697 100644 (file)
@@ -1,3 +1,7 @@
+2011-10-13  Tom de Vries  <tom@codesourcery.com>
+
+       * gcc.dg/memcpy-4.c: New test.
+
 2011-10-13  Richard Guenther  <rguenther@suse.de>
 
        PR tree-optimization/50698
diff --git a/gcc/testsuite/gcc.dg/memcpy-4.c b/gcc/testsuite/gcc.dg/memcpy-4.c
new file mode 100644 (file)
index 0000000..4fe72ec
--- /dev/null
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-rtl-expand" } */
+
+void
+f1 (char *p)
+{
+  __builtin_memcpy (p, "123", 3);
+}
+
+/* { dg-final { scan-rtl-dump-times "mem/s/u" 3 "expand" { target mips*-*-* } } } */
+/* { dg-final { cleanup-rtl-dump "expand" } } */