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

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

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

commit r11-7473-gba09d11a9d0ae2382bab715b102a7746d20dea6d
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.

Reply via email to