projects
/
gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7a5add1
)
compiler: adjust closure field indexes
author
Ian Lance Taylor
<ian@gcc.gnu.org>
Tue, 16 Jul 2013 22:45:24 +0000
(22:45 +0000)
committer
Ian Lance Taylor
<ian@gcc.gnu.org>
Tue, 16 Jul 2013 22:45:24 +0000
(22:45 +0000)
This corrects the code that handles composite literals where
the key is a variable in an enclosing function. See bug475.go
in the testsuite.
From-SVN: r200990
gcc/go/gofrontend/gogo.cc
patch
|
blob
|
history
diff --git
a/gcc/go/gofrontend/gogo.cc
b/gcc/go/gofrontend/gogo.cc
index a21493a786c6e7ccab45151eda81a8a8046ddb40..6ae72b6a1c98b93c998af9e98b06fdc380425804 100644
(file)
--- a/
gcc/go/gofrontend/gogo.cc
+++ b/
gcc/go/gofrontend/gogo.cc
@@
-3380,7
+3380,7
@@
Function::set_closure_type()
st->push_field(Struct_field(Typed_identifier(".$f", voidptr_type,
this->location_)));
- unsigned int index =
0
;
+ unsigned int index =
1
;
for (Closure_fields::const_iterator p = this->closure_fields_.begin();
p != this->closure_fields_.end();
++p, ++index)