public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-7446] testsuite: Add testcases for already fixed PR [PR100541]
@ 2022-03-02 9:41 Jakub Jelinek
0 siblings, 0 replies; only message in thread
From: Jakub Jelinek @ 2022-03-02 9:41 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:5f2e72db8c03c960d8330305c1e92986373198ca
commit r12-7446-g5f2e72db8c03c960d8330305c1e92986373198ca
Author: Jakub Jelinek <jakub@redhat.com>
Date: Wed Mar 2 10:38:39 2022 +0100
testsuite: Add testcases for already fixed PR [PR100541]
These testcases started failing with r12-630 and one of them
got fixed with r12-4531 (aka PR102764 fix and r12-4616 further
improved the fix) and the other went latent in r12-2591 (i.e. threader
changes) and I believe was fixed for real by the PR102764 fix too.
2022-03-02 Jakub Jelinek <jakub@redhat.com>
PR debug/100541
* g++.dg/opt/pr100541-1.C: New test.
* g++.dg/opt/pr100541-2.C: New test.
Diff:
---
gcc/testsuite/g++.dg/opt/pr100541-1.C | 24 ++++++++++++++++++++++++
gcc/testsuite/g++.dg/opt/pr100541-2.C | 25 +++++++++++++++++++++++++
2 files changed, 49 insertions(+)
diff --git a/gcc/testsuite/g++.dg/opt/pr100541-1.C b/gcc/testsuite/g++.dg/opt/pr100541-1.C
new file mode 100644
index 00000000000..9a73e15f98b
--- /dev/null
+++ b/gcc/testsuite/g++.dg/opt/pr100541-1.C
@@ -0,0 +1,24 @@
+// PR debug/100541
+// { dg-do compile }
+// { dg-options "-O3 -fno-expensive-optimizations -fno-tree-dce -fno-tree-dominator-opts -fcompare-debug" }
+
+int a, b, i, x, y;
+
+int
+foo ()
+{
+ int rcmd = 0;
+ switch (x) {
+ case 0:
+ if (i)
+ rcmd = 6;
+ if (y % 3)
+ int &m1 = rcmd = rcmd | 5;
+ break;
+ case 1:
+ rcmd = b;
+ }
+ if (rcmd != 7)
+ return rcmd;
+ return a;
+}
diff --git a/gcc/testsuite/g++.dg/opt/pr100541-2.C b/gcc/testsuite/g++.dg/opt/pr100541-2.C
new file mode 100644
index 00000000000..35624814ed4
--- /dev/null
+++ b/gcc/testsuite/g++.dg/opt/pr100541-2.C
@@ -0,0 +1,25 @@
+// PR debug/100541
+// { dg-do compile { target c++11 } }
+// { dg-options "-O2 -fno-tree-dce -fno-tree-dominator-opts -fcompare-debug" }
+
+int INVALID_TILE;
+void GetSlopePixelZ();
+long RUNWAY_IN_block;
+struct Airport {
+ long flags;
+};
+struct Station {
+ Airport airport;
+} * HandleCrashedAircraft_st;
+short HandleCrashedAircraft_v_0;
+void HandleCrashedAircraft() {
+ Station *__trans_tmp_1 = INVALID_TILE ? nullptr : HandleCrashedAircraft_st,
+ *st;
+ if (HandleCrashedAircraft_v_0 && __trans_tmp_1 == nullptr &&
+ HandleCrashedAircraft_v_0 % 3)
+ GetSlopePixelZ();
+ if (HandleCrashedAircraft_v_0)
+ GetSlopePixelZ();
+ if (__trans_tmp_1)
+ st->airport.flags &= RUNWAY_IN_block;
+}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-03-02 9:41 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-02 9:41 [gcc r12-7446] testsuite: Add testcases for already fixed PR [PR100541] 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).