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

--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Jakub Jelinek
<ja...@gcc.gnu.org>:

https://gcc.gnu.org/g:a964f494cd5a90f631b8c0c01777a9899e0351ce

commit r10-9467-ga964f494cd5a90f631b8c0c01777a9899e0351ce
Author: Jakub Jelinek <ja...@redhat.com>
Date:   Wed Feb 10 19:52:37 2021 +0100

    varasm: Fix ICE with -fsyntax-only [PR99035]

    My FE change from 2 years ago uses TREE_ASM_WRITTEN in -fsyntax-only
    mode more aggressively to avoid "expanding" functions multiple times.
    With -fsyntax-only nothing is really expanded, so I think it is acceptable
    to adjust the assert and allow declare_weak at any time, with -fsyntax-only
    we know it is during parsing only anyway.

    2021-02-10  Jakub Jelinek  <ja...@redhat.com>

            PR c++/99035
            * varasm.c (declare_weak): For -fsyntax-only, allow even
            TREE_ASM_WRITTEN function decls.

            * g++.dg/ext/weak6.C: New test.

    (cherry picked from commit 0f39fb7b001df7cdba56cd5c572d0737667acd2c)

Reply via email to