[Bug target/108174] ICE: tree check: expected function_type or method_type, have ggc_freed in aarch64_resolve_overloaded_memtag, at config/aarch64/aarch64-builtins.cc:3349
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Feb 29 06:28:35 GMT 2024
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108174
--- Comment #10 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #9)
> (In reply to Andrew Pinski from comment #8)
> > It should also be static too.
>
> Well the struct is anonymous so it will be static linkage by C++ rules.
But that static is needed for GTY marking :).
So the fix is:
```
diff --git a/gcc/config/aarch64/aarch64-builtins.cc
b/gcc/config/aarch64/aarch64-builtins.cc
index 9b23b6b8c33..2bead96cbd6 100644
--- a/gcc/config/aarch64/aarch64-builtins.cc
+++ b/gcc/config/aarch64/aarch64-builtins.cc
@@ -1839,7 +1839,7 @@ aarch64_init_prefetch_builtin (void)
}
/* Initialize the memory tagging extension (MTE) builtins. */
-struct
+static GTY(()) struct GTY(())
{
tree ftype;
enum insn_code icode;
```
Will commit in a few minutes.
More information about the Gcc-bugs
mailing list