public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Richard Biener <rguenth@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r13-6878] tree-optimization/108357 - add testcase
Date: Mon, 27 Mar 2023 12:24:14 +0000 (GMT)	[thread overview]
Message-ID: <20230327122414.0801E385841E@sourceware.org> (raw)

https://gcc.gnu.org/g:ce4a00e29c71f2f51d52f407ecd265fa40688586

commit r13-6878-gce4a00e29c71f2f51d52f407ecd265fa40688586
Author: Richard Biener <rguenther@suse.de>
Date:   Mon Mar 27 14:22:56 2023 +0200

    tree-optimization/108357 - add testcase
    
    The following adds the testcase for the bug which was recently
    fixed.
    
            PR tree-optimization/108357
            * gcc.dg/tree-ssa/pr108357.c: New testcase.

Diff:
---
 gcc/testsuite/gcc.dg/tree-ssa/pr108357.c | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr108357.c b/gcc/testsuite/gcc.dg/tree-ssa/pr108357.c
new file mode 100644
index 00000000000..44c457b7a97
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr108357.c
@@ -0,0 +1,22 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-threadfull1" } */
+
+static char b;
+static unsigned c;
+void foo();
+short(a)(short d, short e) { return d * e; }
+static short f(short d) {
+  b = 0;
+  if ((d && 0 >= c < d) ^ d)
+    ;
+  else
+    foo();
+  return d;
+}
+int main()
+{
+  short g = a(5, b ^ 9854);
+  f(g);
+}
+
+/* { dg-final { scan-tree-dump-not "foo" "threadfull1" } } */

                 reply	other threads:[~2023-03-27 12:24 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=20230327122414.0801E385841E@sourceware.org \
    --to=rguenth@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: 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).