public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [COMMITTED] ipa: Add testcase for already fixed case [PR110705]
@ 2024-01-20 19:43 Andrew Pinski
  0 siblings, 0 replies; only message in thread
From: Andrew Pinski @ 2024-01-20 19:43 UTC (permalink / raw)
  To: gcc-patches; +Cc: Andrew Pinski

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>
---
 .../gcc.c-torture/compile/pr110705-1.c        | 27 +++++++++++++++++++
 1 file changed, 27 insertions(+)
 create mode 100644 gcc/testsuite/gcc.c-torture/compile/pr110705-1.c

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); }
-- 
2.39.3


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-01-20 19:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-20 19:43 [COMMITTED] ipa: Add testcase for already fixed case [PR110705] Andrew Pinski

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).