https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104538
Bug ID: 104538 Summary: gdc/d21: segfault on mips64 Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: d Assignee: ibuclaw at gdcproject dot org Reporter: syq at debian dot org Target Milestone: --- https://buildd.debian.org/status/fetch.php?pkg=gcc-12&arch=mips64el&ver=12-20220214-1&stamp=1644848228&raw=0 The segment is from: gcc/d/dmd/ctfeexpr.d: UnionExp changeArrayLiteralLength(const ref Loc loc, TypeArray arrayType, Expression oldval, size_t oldlen, size_t newlen) if (oldlen != 0) { assert(oldval.op == EXP.arrayLiteral); ArrayLiteralExp ae = cast(ArrayLiteralExp)oldval; foreach (size_t i; 0 .. copylen) (*elements)[i] = (*ae.elements)[indxlo + i]; } if (elemType.ty == Tstruct || elemType.ty == Tsarray) { /* If it is an aggregate literal representing a value type, * we need to create a unique copy for each element */ foreach (size_t i; copylen .. newlen) (*elements)[i] = copyLiteral(defaultElem).copy(); } else { foreach (size_t i; copylen .. newlen) (*elements)[i] = defaultElem; } >>>> emplaceExp!(ArrayLiteralExp)(&ue, loc, arrayType, elements); ArrayLiteralExp aae = cast(ArrayLiteralExp)ue.exp(); aae.ownedByCtfe = OwnedBy.ctfe;