summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/compile
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2011-11-14 14:34:33 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2011-11-14 14:34:33 +0000
commit1e87b08a4c89ee453308a0b09b5bc40a5e3bec10 (patch)
treeed7af923d74901a7a6ff5d07ef176a640a585ba7 /gcc/testsuite/gcc.c-torture/compile
parentcbacd2740bd9c2dfe6a0a755f74ddb45781a0665 (diff)
downloadgcc-1e87b08a4c89ee453308a0b09b5bc40a5e3bec10.tar.gz
2011-11-14 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 181350 using svnmerge git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@181351 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.c-torture/compile')
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr51077.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr51077.c b/gcc/testsuite/gcc.c-torture/compile/pr51077.c
new file mode 100644
index 00000000000..de2b97e58e9
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr51077.c
@@ -0,0 +1,15 @@
+/* PR middle-end/51077 */
+
+struct S { unsigned char s, t[256]; };
+
+void
+foo (const struct S *x, struct S *y, int z)
+{
+ int i;
+ for (i = 0; i < 8; i++)
+ {
+ const struct S *a = &x[i];
+ __builtin___memcpy_chk (y->t, a->t, z, __builtin_object_size (y->t, 0));
+ y = (struct S *) &y->t[z];
+ }
+}