projects
/
platform
/
upstream
/
gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7a3eeb8
)
Don't lower blocks twice.
author
Ian Lance Taylor
<ian@gcc.gnu.org>
Mon, 29 Aug 2011 22:02:01 +0000
(22:02 +0000)
committer
Ian Lance Taylor
<ian@gcc.gnu.org>
Mon, 29 Aug 2011 22:02:01 +0000
(22:02 +0000)
From-SVN: r178263
gcc/go/gofrontend/gogo.cc
patch
|
blob
|
history
diff --git
a/gcc/go/gofrontend/gogo.cc
b/gcc/go/gofrontend/gogo.cc
index
4aafe41
..
c544eba
100644
(file)
--- a/
gcc/go/gofrontend/gogo.cc
+++ b/
gcc/go/gofrontend/gogo.cc
@@
-1268,6
+1268,12
@@
Lower_parse_tree::function(Named_object* no)
int
Lower_parse_tree::statement(Block* block, size_t* pindex, Statement* sorig)
{
+ // Because we explicitly traverse the statement's contents
+ // ourselves, we want to skip block statements here. There is
+ // nothing to lower in a block statement.
+ if (sorig->is_block_statement())
+ return TRAVERSE_CONTINUE;
+
Statement_inserter hold_inserter(this->inserter_);
this->inserter_ = Statement_inserter(block, pindex);