[gcc r14-470] tree-optimization/109724 - new testcase

Richard Biener rguenth@gcc.gnu.org
Thu May 4 07:45:13 GMT 2023


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

commit r14-470-gee99aaae4aeecd55f1d945a959652cf07e3b2e9e
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.

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);
+    }
+  }
+}


More information about the Gcc-cvs mailing list