tree-optimization/109724 - new testcase
Checks
Commit Message
The following adds a testcase for PR109724 which was caused by
backporting r13-2375-gbe1b42de9c151d and fixed by r11-199-g2b42509f8b7bdf.
Tested on x86_64-unknown-linux-gnu, pushed.
PR tree-optimization/109724
* g++.dg/torture/pr109724.C: New testcase.
---
gcc/testsuite/g++.dg/torture/pr109724.C | 32 +++++++++++++++++++++++++
1 file changed, 32 insertions(+)
create mode 100644 gcc/testsuite/g++.dg/torture/pr109724.C
new file mode 100644
@@ -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);
+ }
+ }
+}