From: Jakub Jelinek <jakub@redhat.com>
To: gcc-patches@gcc.gnu.org
Subject: [committed] testsuite: Add testcase for already fixed PR [PR112924]
Date: Sat, 9 Dec 2023 15:32:14 +0100 [thread overview]
Message-ID: <ZXR6bqrAb2qXdjuU@tucnak> (raw)
Hi!
This testcase got fixed with
r14-6132-g50f2a3370d177f8fe9bea0461feb710523e048a2 .
I'm just adding a testcase so that it doesn't reappear.
Tested on x86_64-linux, with -m32/-m64, current trunk as well as r14-6131
where it ICEd with -m32, committed to trunk as obvious.
2023-12-09 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/112924
* gcc.dg/pr112924.c: New test.
--- gcc/testsuite/gcc.dg/pr112924.c.jj 2023-12-09 15:28:00.848388123 +0100
+++ gcc/testsuite/gcc.dg/pr112924.c 2023-12-09 15:27:34.401752018 +0100
@@ -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);
+}
Jakub
reply other threads:[~2023-12-09 14:32 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZXR6bqrAb2qXdjuU@tucnak \
--to=jakub@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).