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

--- Comment #3 from Peter Bergner <bergner at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #1)
> The types are OPAQUE_TYPE.
[snip]
> So if I understand this correctly and PR 98872 correctly. We should not
> expand a DEFERRED_INIT for this type.

So something like this?  Ie, it's ok to just skip this altogether?  It does fix
this particular ICE.


diff --git a/gcc/internal-fn.c b/gcc/internal-fn.c
index 9e10da0ad5c..200d14337d7 100644
--- a/gcc/internal-fn.c
+++ b/gcc/internal-fn.c
@@ -3041,6 +3041,9 @@ expand_DEFERRED_INIT (internal_fn, gcall *stmt)
   tree var_type = TREE_TYPE (lhs);
   gcc_assert (init_type > AUTO_INIT_UNINITIALIZED);

+  if (OPAQUE_TYPE_P (var_type))
+    return;
+
   if (TREE_CODE (lhs) == SSA_NAME)
     reg_lhs = true;
   else

Reply via email to