This comment isn't quite accurate:
+ /* PR 31743: Make sure the array type has a known size. */
+ if (!complete_type_or_else (type, NULL_TREE))
+ return error_mark_node;
because this check isn't just about array types. Better would be:
/* The type allocated must be complete. If the new-type-id was "T[N]"
then we are just checking that "T" is complete here, but that is
equivalent, since the value of "N" doesn't matter. */
(I'm not a fan of putting PR numbers in comments; the comment ought to
stand on itself.)
OK with that change; no need to retest.