aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-prof
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2011-01-07 19:39:11 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2011-01-07 19:39:11 +0100
commitc6a8f6de089b86578cd788b6ef168842fc9bd3c8 (patch)
tree98a65d5d31b70305f89310e6bee59826c2bb6216 /gcc/testsuite/gcc.dg/tree-prof
parentfe95fbf90773ebf53740e46a38ea5e923233a25b (diff)
downloadgcc-c6a8f6de089b86578cd788b6ef168842fc9bd3c8.zip
gcc-c6a8f6de089b86578cd788b6ef168842fc9bd3c8.tar.gz
gcc-c6a8f6de089b86578cd788b6ef168842fc9bd3c8.tar.bz2
re PR bootstrap/47187 (profiledbootstrap failure on i386)
PR bootstrap/47187 * value-prof.c (gimple_stringop_fixed_value): Handle lhs of the call properly. * gcc.dg/tree-prof/pr47187.c: New test. From-SVN: r168581
Diffstat (limited to 'gcc/testsuite/gcc.dg/tree-prof')
-rw-r--r--gcc/testsuite/gcc.dg/tree-prof/pr47187.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/tree-prof/pr47187.c b/gcc/testsuite/gcc.dg/tree-prof/pr47187.c
new file mode 100644
index 0000000..467ce25
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-prof/pr47187.c
@@ -0,0 +1,23 @@
+/* PR bootstrap/47187 */
+/* { dg-options "-O2" } */
+
+char buf[64];
+char buf2[64];
+
+void *
+foo (char *p, long size)
+{
+ return __builtin_memcpy (buf, p, size);
+}
+
+int
+main (void)
+{
+ long i;
+ for (i = 0; i < 65536; i++)
+ if (foo ("abcdefghijkl", 12) != buf)
+ __builtin_abort ();
+ if (foo (buf2, 64) != buf)
+ __builtin_abort ();
+ return 0;
+}