public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: gcc-patches@gcc.gnu.org
Subject: [committed] testsuite: Add testcase for already fixed PR [PR110251]
Date: Wed, 17 Jan 2024 11:35:31 +0100	[thread overview]
Message-ID: <Zaetc+VxfYjXsb5e@tucnak> (raw)

Hi!

This testcase started to hang at -O3 with r13-4208 and got fixed
with r14-2097.

Regtested on x86_64-linux and i686-linux, committed to trunk as obvious.

2024-01-17  Jakub Jelinek  <jakub@redhat.com>

	PR tree-optimization/110251
	* gcc.c-torture/compile/pr110251.c: New test.

--- gcc/testsuite/gcc.c-torture/compile/pr110251.c.jj	2024-01-16 20:39:50.605210933 +0100
+++ gcc/testsuite/gcc.c-torture/compile/pr110251.c	2024-01-16 20:39:43.568310057 +0100
@@ -0,0 +1,27 @@
+/* PR tree-optimization/110251 */
+
+int a, b;
+signed char c;
+
+int
+foo (int e)
+{
+  if (e >= 'a')
+    return e;
+}
+
+int
+bar (unsigned short e)
+{
+  for (; e; a++)
+    e &= e - 1;
+}
+
+void
+baz (void)
+{
+  while (c < 1)
+    ;
+  for (; bar (c - 1); b = foo (c))
+    ;
+}

	Jakub


                 reply	other threads:[~2024-01-17 10:35 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=Zaetc+VxfYjXsb5e@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).