projects
/
gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e846322
)
re PR go/61254 (gccgo: spurious "error: slice end must be integer" [GoSmith])
author
Ian Lance Taylor
<ian@gcc.gnu.org>
Sat, 13 Dec 2014 01:41:49 +0000
(
01:41
+0000)
committer
Ian Lance Taylor
<ian@gcc.gnu.org>
Sat, 13 Dec 2014 01:41:49 +0000
(
01:41
+0000)
PR go/61254
compiler: Don't move nil subexpressions into temporaries.
From-SVN: r218701
gcc/go/gofrontend/statements.cc
patch
|
blob
|
history
diff --git
a/gcc/go/gofrontend/statements.cc
b/gcc/go/gofrontend/statements.cc
index 5b8c2e73fc775af5c175a310f29a59c10ae22680..6094e5c684b6cbb61e24c2fac563b4c5b1554e88 100644
(file)
--- a/
gcc/go/gofrontend/statements.cc
+++ b/
gcc/go/gofrontend/statements.cc
@@
-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);