https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69511
Bug ID: 69511
Summary: G.gcstack_size uses uintptr instead of size_t
Product: gcc
Version: 6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: go
Assignee: ian at airs dot com
Reporter: vogt at linux dot vnet.ibm.com
CC: cmang at google dot com, krebbel at gcc dot gnu.org
Target Milestone: ---
Target: s390 s390x
Created attachment 37488
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37488&action=edit
Proposed fix.
The field gcstack_size in the G structure in libgo/runtime/runtime.h has
"uintptr" as its type, but &G.gcstack_size is passed to a function expecting
"size_t *". On S/390 this results in a warning and hence a bootstrap failure
with the split stack patches we're working on:
error: passing argument 3 of
‘__splitstack_find’ from incompatible pointer type
[-Werror=incompatible-pointer-types]
g->gcstack = __splitstack_find(nil, nil, &g->gcstack_size,
I believe it's safe to change the type to size_t which it should have been in
the first place. But theoretically it's possible that size_t and unitptr are
of different bit size. What do you think about the attached patch?