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
This commit is contained in:
parent
e846322c86
commit
967b254be1
1 changed files with 2 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue