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 [PR100469]
Date: Mon, 15 Nov 2021 14:51:03 +0100	[thread overview]
Message-ID: <20211115135103.GX2710@tucnak> (raw)

Hi!

This bug introduced in r11-7448-gff92ede8d269375f800e1b347a48f4698874b4a3
has been fixed already by r12-1354-g2d2ed777b23ab6503027039e0adbfe1162f52b2f
aka PR100852 fix.

Regtested on x86_64-linux -m32/-m64, committed to trunk (so far) as obvious.

2021-11-15  Jakub Jelinek  <jakub@redhat.com>

	PR debug/100469
	* g++.dg/opt/pr100469.C: New test.

--- gcc/testsuite/g++.dg/opt/pr100469.C.jj	2021-11-15 14:44:46.796604198 +0100
+++ gcc/testsuite/g++.dg/opt/pr100469.C	2021-11-15 14:44:38.662715051 +0100
@@ -0,0 +1,32 @@
+// PR debug/100469
+// { dg-do compile }
+// { dg-options "-O2 -fcompare-debug -fno-tree-dse -fno-tree-forwprop -fno-tree-tail-merge --param=sccvn-max-alias-queries-per-access=0" }
+
+struct S
+{
+  long m;
+  S (const S &s)
+  {
+    m = s.m;
+  }
+  S (long l)
+  {
+    m = l;
+  }
+  bool operatorX (const S &s)
+  {
+    return m >= s.m;
+  }
+};
+
+static inline S
+bar (S a, S b)
+{
+  return a.operatorX (b) ? a : b;
+}
+
+S
+foo (S s)
+{
+  return bar (s, (S) 0);
+}

	Jakub


                 reply	other threads:[~2021-11-15 13:51 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=20211115135103.GX2710@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).