diff options
author | Marek Polacek <polacek@redhat.com> | 2019-10-29 20:34:43 +0000 |
---|---|---|
committer | Marek Polacek <mpolacek@gcc.gnu.org> | 2019-10-29 20:34:43 +0000 |
commit | 0f1848002a137f3cac5026c5a3af6e16ceabe552 (patch) | |
tree | 4af514ce33b47850b73ec43906ac4a386d66cae7 /gcc/tree-vectorizer.c | |
parent | 6cd96bad607c5d6a2302e97ab6f749edb85b82ed (diff) | |
download | gcc-0f1848002a137f3cac5026c5a3af6e16ceabe552.zip gcc-0f1848002a137f3cac5026c5a3af6e16ceabe552.tar.gz gcc-0f1848002a137f3cac5026c5a3af6e16ceabe552.tar.bz2 |
PR c++/91548 - fix detecting modifying const objects for ARRAY_REF.
This fixes a bogus "modifying a const object" error for an array that actually
isn't declared const. The problem was how I handled ARRAY_REFs here; we
shouldn't look at the ARRAY_REF itself, but at the array its accessing.
* constexpr.c (cxx_eval_store_expression): Don't call
modifying_const_object_p for ARRAY_REF.
* g++.dg/cpp1y/constexpr-tracking-const15.C: New test.
* g++.dg/cpp1y/constexpr-tracking-const16.C: New test.
* g++.dg/cpp1z/constexpr-tracking-const1.C: New test.
From-SVN: r277591
Diffstat (limited to 'gcc/tree-vectorizer.c')
0 files changed, 0 insertions, 0 deletions