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
@ -677,7 +677,8 @@ Move_subexpressions::expression(Expression** pexpr)
|
|||||||
{
|
{
|
||||||
if (this->skip_ > 0)
|
if (this->skip_ > 0)
|
||||||
--this->skip_;
|
--this->skip_;
|
||||||
else if ((*pexpr)->temporary_reference_expression() == NULL)
|
else if ((*pexpr)->temporary_reference_expression() == NULL
|
||||||
|
&& !(*pexpr)->is_nil_expression())
|
||||||
{
|
{
|
||||||
Location loc = (*pexpr)->location();
|
Location loc = (*pexpr)->location();
|
||||||
Temporary_statement* temp = Statement::make_temporary(NULL, *pexpr, loc);
|
Temporary_statement* temp = Statement::make_temporary(NULL, *pexpr, loc);
|
||||||
|
Loading…
Reference in New Issue
Block a user