aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorVolker Reichelt <reichelt@igpm.rwth-aachen.de>2006-05-22 19:22:24 +0000
committerVolker Reichelt <reichelt@gcc.gnu.org>2006-05-22 19:22:24 +0000
commit1bd229b76d79228d76f15fb7c450e5462503d133 (patch)
tree131788ce5f4f5bc288ec6bbf9206b4bbba264b05 /gcc/cp
parent6a70560c4c363f6d7d9a927a146d77753b2f041b (diff)
downloadgcc-1bd229b76d79228d76f15fb7c450e5462503d133.zip
gcc-1bd229b76d79228d76f15fb7c450e5462503d133.tar.gz
gcc-1bd229b76d79228d76f15fb7c450e5462503d133.tar.bz2
re PR c++/27716 (ICE with invalid assignment)
PR c++/27716 * typeck.c (build_modify_expr): Test arguments for error_operand_p. * g++.dg/other/assign1.C: New test. From-SVN: r113990
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog3
-rw-r--r--gcc/cp/typeck.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 28ee033..4cfa827 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,5 +1,8 @@
2006-05-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
+ PR c++/27716
+ * typeck.c (build_modify_expr): Test arguments for error_operand_p.
+
* decl.c (grokdeclarator): Return error_mark_node instead of NULL_TREE.
2006-05-21 Mark Mitchell <mark@codesourcery.com>
diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c
index 93d6c22..5ee2ba1 100644
--- a/gcc/cp/typeck.c
+++ b/gcc/cp/typeck.c
@@ -5502,7 +5502,7 @@ build_modify_expr (tree lhs, enum tree_code modifycode, tree rhs)
bool plain_assign = (modifycode == NOP_EXPR);
/* Avoid duplicate error messages from operands that had errors. */
- if (lhs == error_mark_node || rhs == error_mark_node)
+ if (error_operand_p (lhs) || error_operand_p (rhs))
return error_mark_node;
/* Handle control structure constructs used as "lvalues". */