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

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

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

commit r8-10893-gcd7c8ae0178c5dad7e8cec6c001e9e334d8c31bc
Author: Jakub Jelinek <ja...@redhat.com>
Date:   Wed Mar 3 09:55:19 2021 +0100

    c-family: Avoid ICE on va_arg [PR99324]

    build_va_arg calls the middle-end mark_addressable, which e.g. requires
that
    cfun is non-NULL.  The following patch calls instead
c_common_mark_addressable_vec
    which is the c-family variant similarly to the FE c_mark_addressable and
    cxx_mark_addressable, except that it doesn't error on addresses of register
    variables.  As the taking of the address is artificial for the .VA_ARG
    ifn and when that is lowered goes away, it is similar case to the vector
    subscripting for which c_common_mark_addressable_vec has been added.

    2021-03-03  Jakub Jelinek  <ja...@redhat.com>

            PR c/99324
            * c-common.c (build_va_arg): Call c_common_mark_addressable_vec
            instead of mark_addressable.  Fix a comment typo -
            neutrallly -> neutrally.

            * gcc.c-torture/compile/pr99324.c: New test.

    (cherry picked from commit 0e87dc86eb56f732a41af2590f0b807031003fbe)

Reply via email to