re PR c++/81061 (ICE modifying read-only variable)
authorPaolo Carlini <paolo.carlini@oracle.com>
Wed, 13 Dec 2017 20:29:11 +0000 (20:29 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Wed, 13 Dec 2017 20:29:11 +0000 (20:29 +0000)
commitae51fb47811a9d5a3cfbb67677dae0eababc263d
tree9b90ea22696cd42a9a266ff8ccd88a7ec0606cf6
parent5ef54d5722c86095bafaf6d83ecdac38db1bce52
re PR c++/81061 (ICE modifying read-only variable)

/cp
2017-12-13  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/81061
* typeck.c (cp_build_modify_expr): Upon cxx_readonly_error
immediately return error_mark_node.

/testsuite
2017-12-13  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/81061
* g++.dg/other/const5.C: New.

From-SVN: r255613
gcc/cp/ChangeLog
gcc/cp/typeck.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/other/const5.C [new file with mode: 0644]