[gcc r14-6359] testsuite: Add testcase for already fixed PR [PR112924]
Jakub Jelinek
jakub@gcc.gnu.org
Sat Dec 9 14:30:56 GMT 2023
https://gcc.gnu.org/g:af8bbd631f5425e9be084dfd1f2b9487a31a350e
commit r14-6359-gaf8bbd631f5425e9be084dfd1f2b9487a31a350e
Author: Jakub Jelinek <jakub@redhat.com>
Date: Sat Dec 9 15:29:51 2023 +0100
testsuite: Add testcase for already fixed PR [PR112924]
This testcase got fixed with
r14-6132-g50f2a3370d177f8fe9bea0461feb710523e048a2 .
I'm just adding a testcase so that it doesn't reappear.
2023-12-09 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/112924
* gcc.dg/pr112924.c: New test.
Diff:
---
gcc/testsuite/gcc.dg/pr112924.c | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/gcc/testsuite/gcc.dg/pr112924.c b/gcc/testsuite/gcc.dg/pr112924.c
new file mode 100644
index 00000000000..c8a51d40b82
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr112924.c
@@ -0,0 +1,26 @@
+/* PR tree-optimization/112924 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -w" } */
+/* { dg-additional-options "-msse2" { target i?86-*-* x86_64-*-* } } */
+
+struct S { long a; char b[64]; };
+void foo (struct S a);
+char c;
+int d[3541];
+
+static void
+bar (struct S *s, char *p)
+{
+ unsigned int a = sizeof (d) - sizeof (int) - s->a;
+ long c = __builtin_object_size (s, 0);
+ for (; a >= 64; a -= 64, p += 4);
+ __builtin___memcpy_chk (s, p, a, c);
+}
+
+void
+baz (void)
+{
+ struct S s = {};
+ bar (&s, &c);
+ foo (s);
+}
More information about the Gcc-cvs
mailing list