https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88112

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ebotcazou at gcc dot gnu.org,
                   |                            |hubicka at gcc dot gnu.org

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
OK, so there's a reference argument to lto19_pkg1__rec in the function
lto19_pkg1__proc DECL_ARGUMENTS.  That type isn't gimplified for
some reason, but the function itself is.  It just contains

lto19_pkg1.proc (const struct lto19_pkg1__rec & r)
{
  void <D.4576>;

  goto <D.4576>;
  <D.4576>:
  return;
}

there seem to be outlined size functions in the package but the
DECL_SIZEs do not refer to those via calls at the point of free-lang-data.

Originally I wanted to avoid creating new fake DECLs in
free_lang_data_in_one_sizepos but I suppose I could use a PLACEHOLDER_EXPR
as well.  Not sure if after fld those complex DECL_SIZE have any use?
In this case it is TYPE_SIZE

(bitsizetype) (((sizetype) lto19_pkg1__TarrD1___U + 1) * 4) * 8

but the FIELD_DECLs also have variable DECL_SIZE.

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?

Honza?  Eric?

Reply via email to