This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/71372] [6/7 Regression] C++ FE drops TREE_THIS_VOLATILE in cp_fold on all tcc_reference trees


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

--- Comment #14 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Thu Jun  2 16:43:04 2016
New Revision: 237042

URL: https://gcc.gnu.org/viewcvs?rev=237042&root=gcc&view=rev
Log:
        PR c++/71372
        * cp-gimplify.c (cp_fold): For INDIRECT_REF, if the folded expression
        is INDIRECT_REF or MEM_REF, copy over TREE_READONLY, TREE_SIDE_EFFECTS
        and TREE_THIS_VOLATILE flags.  For ARRAY_REF and ARRAY_RANGE_REF, copy
        over TREE_READONLY, TREE_SIDE_EFFECTS and TREE_THIS_VOLATILE flags
        to the newly built tree.

        * c-c++-common/pr71372.c: New test.

Added:
    branches/gcc-6-branch/gcc/testsuite/c-c++-common/pr71372.c
Modified:
    branches/gcc-6-branch/gcc/cp/ChangeLog
    branches/gcc-6-branch/gcc/cp/cp-gimplify.c
    branches/gcc-6-branch/gcc/testsuite/ChangeLog

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]