Commit 1bd229b7 by Volker Reichelt Committed by Volker Reichelt

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
parent 6a70560c
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>
......
......@@ -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". */
......
2006-05-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR c++/27716
* g++.dg/other/assign1.C: New test.
2006-05-22 Kazu Hirata <kazu@codesourcery.com>
PR target/27266
// PR c++/27716
// { dg-do compile }
int foo()
{
return i ""= i; // { dg-error "not declared|string constant" }
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment