https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92030
Alexander Monakov <amonakov at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |amonakov at gcc dot gnu.org --- Comment #3 from Alexander Monakov <amonakov at gcc dot gnu.org> --- The alias attribute usually works fine with declarations of static variables. So, have you tried static struct memtype MTYPE_##name[1] __attribute__((alias("_mt_" #name))); (i.e. with 'static' rather that 'extern')?