This patch by Than McIntosh fixes an off-by-one error in the array
length of the value we create for a GC symbol. This was not serious,
it just wasted an element. Bootstrapped and ran Go testsuite on
x86_64-pc-linux-gnu. Committed to mainline.
Ian
Index: gcc/go/gofrontend/MERGE
===================================================================
--- gcc/go/gofrontend/MERGE (revision 243729)
+++ gcc/go/gofrontend/MERGE (working copy)
@@ -1,4 +1,4 @@
-e807c1deec1e7114bc4757b6193510fdae13e75f
+ae57b28b3caf1f6670e0f663235f1bf7655db870
The first line of this file holds the git revision number of the last
merge done from the gofrontend repository.
Index: gcc/go/gofrontend/types.cc
===================================================================
--- gcc/go/gofrontend/types.cc (revision 243445)
+++ gcc/go/gofrontend/types.cc (working copy)
@@ -2261,7 +2261,7 @@ Type::gc_symbol_constructor(Gogo* gogo)
vals->push_back(Expression::make_integer_ul(GC_END, uintptr_t, bloc));
- Expression* len = Expression::make_integer_ul(vals->size() + 1, NULL,
+ Expression* len = Expression::make_integer_ul(vals->size(), NULL,
bloc);
Array_type* gc_symbol_type = Type::make_array_type(uintptr_t, len);
return Expression::make_array_composite_literal(gc_symbol_type, vals, bloc);