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

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Mon Mar 27 21:07:21 2017
New Revision: 246512

URL: https://gcc.gnu.org/viewcvs?rev=246512&root=gcc&view=rev
Log:
        PR middle-end/80162
c-family/
        * c-common.c (c_common_mark_addressable_vec): Don't set
        TREE_ADDRESSABLE on DECL_HARD_REGISTER.
c/
        * c-tree.h (c_mark_addressable): Add array_ref_p argument.
        * c-typeck.c (c_mark_addressable): Likewise.  Look through
        VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
        to ARRAY_TYPE.
        (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
cp/
        * cp-tree.h (cxx_mark_addressable): Add array_ref_p argument.
        * typeck.c (cxx_mark_addressable): Likewise.  Look through
        VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
        to ARRAY_TYPE.
        (cp_build_array_ref): Pass true as array_ref_p to cxx_mark_addressable.
testsuite/
        * c-c++-common/pr80162-1.c: New test.
        * c-c++-common/pr80162-2.c: New test.
        * c-c++-common/pr80162-3.c: New test.

Added:
    trunk/gcc/testsuite/c-c++-common/pr80162-1.c
    trunk/gcc/testsuite/c-c++-common/pr80162-2.c
    trunk/gcc/testsuite/c-c++-common/pr80162-3.c
Modified:
    trunk/gcc/c-family/ChangeLog
    trunk/gcc/c-family/c-common.c
    trunk/gcc/c/ChangeLog
    trunk/gcc/c/c-tree.h
    trunk/gcc/c/c-typeck.c
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/cp-tree.h
    trunk/gcc/cp/typeck.c
    trunk/gcc/testsuite/ChangeLog

Reply via email to