https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101028
Bug ID: 101028 Summary: [12 Regression] SLP compile-time hog since r12-1329-gce670e4faafb296d Product: gcc Version: 12.0 Status: UNCONFIRMED Keywords: compile-time-hog Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: marxin at gcc dot gnu.org CC: rguenth at gcc dot gnu.org Target Milestone: --- The following is causing hog (reduced from imagick SPEC benchmark): $ cat 1.i void ConvertImageCommand(); void MagickCommandGenesis(); void MogrifyImages(); void TracePath(); typedef struct { double x, y; } PointInfo; typedef struct { PointInfo point; } PrimitiveInfo; int TraceBezier_alpha, TraceBezier_i; double TraceBezier_weight; PointInfo *TraceBezier_points; PrimitiveInfo *TraceBezier_primitive_info; void DrawImage() { TracePath(); } void TracePath() { double *coefficients; PointInfo point; long j; for (; TraceBezier_i; TraceBezier_i++) { point.x = point.y = TraceBezier_alpha = 1.0; j = 0; for (; j < 4; j++) { point.x += TraceBezier_alpha * coefficients[j] * TraceBezier_primitive_info->point.x; point.y += TraceBezier_alpha * TraceBezier_primitive_info->point.y; TraceBezier_alpha *= TraceBezier_weight; TraceBezier_primitive_info++; } TraceBezier_points[TraceBezier_i] = point; TraceBezier_weight += 1.0; } } void ConvertMain() { MagickCommandGenesis(ConvertImageCommand); } void ConvertImageCommand() { MogrifyImages(); } void MogrifyImages() { DrawImage(); } int main() { return ConvertMain; } $ gcc 1.i -flto=auto -Ofast -shared -fPIC ... likely never finishes :)