public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Andrew Pinski <pinskia@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r14-8306] ipa: Add testcase for already fixed case [PR110705] Date: Sat, 20 Jan 2024 19:44:35 +0000 (GMT) [thread overview] Message-ID: <20240120194435.7376B3857C6B@sourceware.org> (raw) https://gcc.gnu.org/g:17473a93cff5340acfc293299a2f9a5857a50909 commit r14-8306-g17473a93cff5340acfc293299a2f9a5857a50909 Author: Andrew Pinski <quic_apinski@quicinc.com> Date: Sat Jan 20 11:39:11 2024 -0800 ipa: Add testcase for already fixed case [PR110705] This testcase was fixed with r13-1695-gb0f02eeb906b63 which added an Ada testcase for the issue but adding a C testcase is a good idea and that is what this does. Committed after making sure it passes on x86_64-linux-gnu. PR ipa/110705 gcc/testsuite/ChangeLog: * gcc.c-torture/compile/pr110705-1.c: New test. Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com> Diff: --- gcc/testsuite/gcc.c-torture/compile/pr110705-1.c | 27 ++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/gcc/testsuite/gcc.c-torture/compile/pr110705-1.c b/gcc/testsuite/gcc.c-torture/compile/pr110705-1.c new file mode 100644 index 00000000000..6c0029c99e3 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/pr110705-1.c @@ -0,0 +1,27 @@ +/* PR ipa/110705 */ + +/* We used to ICE in gimplify_modify_expr due to + the gimplifier not handling VCE between an struct + and an integer type. */ + +struct a { + long b; +}; +union d { + struct a b; + int e; +}v; +long c; +int f; +static void g(union d h, long i) { + while (1) + switch (c) + case 4: + if (h.e) + c = 4; +} +void j(union d *h) { + if (f) + g(*h, h->b.b); +} +void k() { union d *h = &v; j(h); }
reply other threads:[~2024-01-20 19:44 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=20240120194435.7376B3857C6B@sourceware.org \ --to=pinskia@gcc.gnu.org \ --cc=gcc-cvs@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: linkBe 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).