This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug lto/88112] [9 regression] ICE in lto1: TYPE_FIELDS defined in incomplete type
- From: "rguenther at suse dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 21 Nov 2018 08:40:51 +0000
- Subject: [Bug lto/88112] [9 regression] ICE in lto1: TYPE_FIELDS defined in incomplete type
- Auto-submitted: auto-generated
- References: <bug-88112-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88112
--- Comment #6 from rguenther at suse dot de <rguenther at suse dot de> ---
On Tue, 20 Nov 2018, ebotcazou at gcc dot gnu.org wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88112
>
> --- Comment #4 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
> > Index: gcc/tree.c
> > ===================================================================
> > --- gcc/tree.c (revision 266308)
> > +++ gcc/tree.c (working copy)
> > @@ -5260,7 +5260,7 @@ free_lang_data_in_one_sizepos (tree *exp
> > Note this should only happen for abstract copies so setting sizes
> > to NULL is OK (but we cannot easily assert this). */
> > else if (expr && !is_gimple_val (expr))
> > - *expr_p = NULL_TREE;
> > + *expr_p = build0 (PLACEHOLDER_EXPR, TREE_TYPE (expr));
> > }
> >
> >
> > fixes the ICE but not sure if that's good. Setting to size_zero_node
> > also works (so much for "proper" type checking ...). Maybe it's better
> > to adjust the type-checker somehow?
>
> The C++ front-end should be fixed instead, i.e. it should gimplify all the size
> expressions (like the Ada front-end does).
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 gloal types that cannot be gimplified).
Can Ada global types ever have CALL_EXPRs in their size expressions?