https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115897
--- Comment #9 from Patrick Palka <ppalka at gcc dot gnu.org> --- Looks like we also need to consider dependent attributes when stripping non-template aliases. Patch posted at https://gcc.gnu.org/pipermail/gcc-patches/2024-July/657706.html, I wonder if it fully handles your use case?