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

--- Comment #5 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:cc31d36025358599eb1c899b5c3b902920785f8f

commit r16-8173-gcc31d36025358599eb1c899b5c3b902920785f8f
Author: Jakub Jelinek <[email protected]>
Date:   Thu Mar 19 15:49:51 2026 +0100

    alpha: 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.

    As I have no way to test this on alpha, I've just bootstrapped/regtested
    similar change (just posted) on x86_64-linux and verified on the above
    testcase that it fixes the problem in a cross to alpha-linux.

    Not adding a testcase as any test which tries to compile bits/std.cc should
    already catch it.

    2026-03-19  Jakub Jelinek  <[email protected]>

            PR target/124565
            * config/alpha/alpha.cc (alpha_build_builtin_va_list): Set
TREE_PUBLIC
            on type_decl.

Reply via email to