-3e9f4ee16683883ccfb8661d99318c74bb7a4bef
+d3be41f0a1fca20e241e1db62b4b0f5262caac55
The first line of this file holds the git revision number of the last
merge done from the gofrontend repository.
? p->type()->get_backend_placeholder(gogo)
: p->type()->get_backend(gogo));
(*bfields)[i].location = p->location();
- lastsize = gogo->backend()->type_size((*bfields)[i].btype);
- if (lastsize != 0)
- saw_nonzero = true;
+ int64_t size = gogo->backend()->type_size((*bfields)[i].btype);
+ if (size != 0)
+ saw_nonzero = true;
+
+ if (size > 0 || !Gogo::is_sink_name(p->field_name()))
+ lastsize = size;
+ else
+ {
+ // There is an unreferenceable field of zero size. This
+ // doesn't affect whether we may need zero padding, so leave
+ // lastsize unchanged.
+ }
}
go_assert(i == fields->size());
if (saw_nonzero && lastsize == 0 && !type->is_results_struct())
unsigned int index, const char *error_string)
{
index = go_append_artificial_name (ob, index);
- obstack_grow (ob, "_align ", 7);
+ obstack_grow (ob, "_ ", 2);
if (type_string == NULL)
obstack_grow (ob, error_string, strlen (error_string));
else
echo 'type epollevent struct { events uint32; data [8]byte }' >> ${OUT}
elif test "$val" = "8"; then
if test "$GOARCH" = "sparc64" -a "$GOOS" = "linux"; then
- echo 'type epollevent struct { events uint32; pad [4]byte; data [8]byte; _align [0]int64 }' >> ${OUT}
+ echo 'type epollevent struct { events uint32; pad [4]byte; data [8]byte; _ [0]int64 }' >> ${OUT}
else
echo 'type epollevent struct { events uint32; pad [4]byte; data [8]byte }' >> ${OUT}
fi