Commit 967b254b by Ian Lance Taylor

re PR go/61254 (gccgo: spurious "error: slice end must be integer" [GoSmith])

	PR go/61254
compiler: Don't move nil subexpressions into temporaries.

From-SVN: r218701
parent e846322c
......@@ -677,7 +677,8 @@ Move_subexpressions::expression(Expression** pexpr)
{
if (this->skip_ > 0)
--this->skip_;
else if ((*pexpr)->temporary_reference_expression() == NULL)
else if ((*pexpr)->temporary_reference_expression() == NULL
&& !(*pexpr)->is_nil_expression())
{
Location loc = (*pexpr)->location();
Temporary_statement* temp = Statement::make_temporary(NULL, *pexpr, loc);
......
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