public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-9510] tree-optimization/109724 - new testcase
@ 2023-05-04 7:46 Richard Biener
0 siblings, 0 replies; only message in thread
From: Richard Biener @ 2023-05-04 7:46 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:9945e5f0e705588eada3ae26bb2168124c88461a
commit r12-9510-g9945e5f0e705588eada3ae26bb2168124c88461a
Author: Richard Biener <rguenther@suse.de>
Date: Thu May 4 09:41:33 2023 +0200
tree-optimization/109724 - new testcase
The following adds a testcase for PR109724 which was caused by
backporting r13-2375-gbe1b42de9c151d and fixed by r11-199-g2b42509f8b7bdf.
PR tree-optimization/109724
* g++.dg/torture/pr109724.C: New testcase.
(cherry picked from commit ee99aaae4aeecd55f1d945a959652cf07e3b2e9e)
Diff:
---
gcc/testsuite/g++.dg/torture/pr109724.C | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
diff --git a/gcc/testsuite/g++.dg/torture/pr109724.C b/gcc/testsuite/g++.dg/torture/pr109724.C
new file mode 100644
index 00000000000..4a88e1519d0
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr109724.C
@@ -0,0 +1,32 @@
+// { dg-do compile }
+
+double &SkTMax(double &a, double &b) { return a ?: b; }
+struct SkDPoint {
+ double fX;
+};
+struct SkDCubic {
+ SkDPoint &operator[](int n) { return fPts[n]; }
+ SkDPoint fPts[4];
+};
+struct SkDCurve {
+ SkDCubic fCubic;
+ SkDPoint &operator[](int n) { return fCubic[n]; }
+};
+struct SkDCurveSweep {
+ SkDCurve fCurve;
+};
+int endsIntersect_rPts;
+double endsIntersect_maxX;
+struct SkOpAngle {
+ void endsIntersect();
+ SkDCurveSweep fPart;
+} endsIntersect_rh;
+void SkOpAngle::endsIntersect() {
+ for (int index = 0;; ++index) {
+ SkDCurve &curve = index ? endsIntersect_rh.fPart.fCurve : fPart.fCurve;
+ for (int idx2 = 0; endsIntersect_rPts; ++idx2) {
+ SkDPoint &__trans_tmp_1 = curve[idx2];
+ endsIntersect_maxX = SkTMax(endsIntersect_maxX, __trans_tmp_1.fX);
+ }
+ }
+}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-05-04 7:46 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-04 7:46 [gcc r12-9510] tree-optimization/109724 - new testcase Richard Biener
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).