https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88112
--- Comment #8 from rguenther at suse dot de <rguenther at suse dot de> --- On Wed, 21 Nov 2018, ebotcazou at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88112 > > --- Comment #7 from Eric Botcazou <ebotcazou at gcc dot gnu.org> --- > > It's a type that only lives in the abstract origin which is never output, > > so the FE somewhat has a point in not needing to gimplify it (similar > > to the Ada case with gloBal types that cannot be gimplified). > > So why not set a flag and clear the sizepos only in this case. Or else reset > the sizepos to PLACEHOLDER_EXPR in the C++ front-end. I will need to dig down what happens there in detail. > > Can Ada global types ever have CALL_EXPRs in their size expressions? > > CALL_EXPRs can only occur in CONTAINS_PLACEHOLDER_P expressions. OK. Note that we shouldn't need any of the global types sizes in late compilation. Anyhow, if we do not want to clear those sizepos we could do a walk_tree () looking for non-streamable parts and if found reset it to plain PLACEHOLDER_EXPR. Note that I am also looking for a fix suitable for GCC 8 (for the original referenced bug motivating the change).