PR c++/87398
commite3cb810239595334bc66762574cb539af28bc1e6
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 25 Sep 2018 16:40:57 +0000 (25 16:40 +0000)
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 25 Sep 2018 16:40:57 +0000 (25 16:40 +0000)
treea81d24f799f5ff07f0de4364dc757092c1195464
parentdaa809dae4da44718692b2c667ff4a34aeaa7a39
PR c++/87398
* constexpr.c (cxx_eval_constant_expression) <case OBJ_TYPE_REF>: Only
look through COMPONENT_REFs with DECL_FIELD_IS_BASE FIELD_DECLs.

* g++.dg/other/pr87398.C: New test.
* g++.dg/cpp2a/constexpr-virtual10.C: New test.
* g++.dg/cpp2a/constexpr-virtual11.C: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@264580 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/cp/ChangeLog
gcc/cp/constexpr.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp2a/constexpr-virtual10.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp2a/constexpr-virtual11.C [new file with mode: 0644]
gcc/testsuite/g++.dg/other/pr87398.C [new file with mode: 0644]