https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124565
--- Comment #6 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jakub Jelinek <[email protected]>: https://gcc.gnu.org/g:1d18aa923eaa1a7b5810c4a45ae354eebf8f017f commit r16-8185-g1d18aa923eaa1a7b5810c4a45ae354eebf8f017f Author: Jakub Jelinek <[email protected]> Date: Fri Mar 20 09:11:28 2026 +0100 i386: Set TREE_PUBLIC on TYPE_NAME of __va_list_tag [PR124565] module; #include <cstdarg> export module pr124565; export namespace std { using std::va_list; } fails on alpha-linux with -fmodules: pr124565.cc:5:14: error: exporting âtypedef __gnuc_va_list va_listâ that does not have external linkage <built-in>: note: âtypedef struct __va_list_tag __va_list_tagâ declared here with internal linkage It doesn't fail on x86_64-linux because there va_list is __va_list_tag[] (i.e. array type), while on alpha-linux it is __va_list_tag itself; and the module code calls decl_linkage on it and returns lk_internal for C++11 and later. Now, decl_linkage on x86_64-linux on __va_list_tag directly also returns incorrectly lk_internal, and as I have no way to test alpha, I've bootstrapped/regtested on x86_64-linux and i686-linux the following patch. IMHO it is still desirable even there even when it is just a latent issue. 2026-03-20 Jakub Jelinek <[email protected]> PR target/124565 * config/i386/i386.cc (ix86_build_builtin_va_list_64): Set TREE_PUBLIC on type_decl.
