PR c++/91845 - ICE with invalid pointer-to-member.
authorMarek Polacek <polacek@redhat.com>
Tue, 24 Sep 2019 14:38:53 +0000 (14:38 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Tue, 24 Sep 2019 14:38:53 +0000 (14:38 +0000)
commitfea3397e56a3662a9b2361c14e427c9786042ebf
tree9d35a2a0067ef25ec4399d80f2ef29e7177d6c49
parentfe69bee34c645589d3f2a489d7c67c349960410d
PR c++/91845 - ICE with invalid pointer-to-member.

* expr.c (mark_use): Use error_operand_p.
* typeck2.c (build_m_component_ref): Check error_operand_p after
calling mark_[lr]value_use.

* g++.dg/cpp1y/pr91845.C: New test.

From-SVN: r276102
gcc/cp/ChangeLog
gcc/cp/expr.c
gcc/cp/typeck2.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp1y/pr91845.C [new file with mode: 0644]