https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109724
--- Comment #9 from Richard Biener <rguenth at gcc dot gnu.org> ---
Reduced testcase. I've reduced with
diff --git a/gcc/tree-ssa-sccvn.c b/gcc/tree-ssa-sccvn.c
index 666d7061aa8..31879fb761b 100644
--- a/gcc/tree-ssa-sccvn.c
+++ b/gcc/tree-ssa-sccvn.c
@@ -1558,6 +1558,7 @@ valueize_refs_1 (vec<vn_reference_op_s> *orig, bool
*value
ized_anything,
{
vn_reference_op_t vro;
unsigned int i;
+ auto_bitmap visited;
*valueized_anything = false;
@@ -1609,8 +1610,12 @@ valueize_refs_1 (vec<vn_reference_op_s> *orig, bool
*valueized_anything,
&& vro->opcode == SSA_NAME
&& (*orig)[i - 1].opcode == MEM_REF)
{
+ tree name = vro->op0;
if (vn_reference_maybe_forwprop_address (orig, &i))
- *valueized_anything = true;
+ {
+ *valueized_anything = true;
+ gcc_assert (bitmap_set_bit (visited, SSA_NAME_VERSION (name)));
+ }
}
/* If it transforms a non-constant ARRAY_REF into a constant
one, adjust the constant offset. */
--
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);
}
}
}