public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-5272] testsuite: Add testcase for already fixed PR [PR100469]
@ 2021-11-15 13:49 Jakub Jelinek
0 siblings, 0 replies; only message in thread
From: Jakub Jelinek @ 2021-11-15 13:49 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:b2e1ac548594c5f482b6e9e9cfa25f9cc090bf84
commit r12-5272-gb2e1ac548594c5f482b6e9e9cfa25f9cc090bf84
Author: Jakub Jelinek <jakub@redhat.com>
Date: Mon Nov 15 14:47:44 2021 +0100
testsuite: Add testcase for already fixed PR [PR100469]
This bug introduced in r11-7448-gff92ede8d269375f800e1b347a48f4698874b4a3
has been fixed already by r12-1354-g2d2ed777b23ab6503027039e0adbfe1162f52b2f
aka PR100852 fix.
2021-11-15 Jakub Jelinek <jakub@redhat.com>
PR debug/100469
* g++.dg/opt/pr100469.C: New test.
Diff:
---
gcc/testsuite/g++.dg/opt/pr100469.C | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
diff --git a/gcc/testsuite/g++.dg/opt/pr100469.C b/gcc/testsuite/g++.dg/opt/pr100469.C
new file mode 100644
index 00000000000..9eb37e7fe8d
--- /dev/null
+++ b/gcc/testsuite/g++.dg/opt/pr100469.C
@@ -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);
+}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-11-15 13:49 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-15 13:49 [gcc r12-5272] testsuite: Add testcase for already fixed PR [PR100469] Jakub Jelinek
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).