https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67722
Bug ID: 67722 Summary: Misplaced #endif in libgo/runtime/lfstack.goc Product: gcc Version: 5.2.0 Status: UNCONFIRMED Severity: minor Priority: P3 Component: go Assignee: ian at airs dot com Reporter: pashev.igor at gmail dot com CC: cmang at google dot com Target Milestone: --- libgo fails to build on illumos. Here is a trivial patch: Index: gcc-5/src/libgo/runtime/lfstack.goc =================================================================== --- gcc-5.orig/src/libgo/runtime/lfstack.goc +++ gcc-5/src/libgo/runtime/lfstack.goc @@ -29,7 +29,6 @@ static inline LFNode* lfUnpack(uint64 va // So we use 17msb of pointers as ABA counter. # define PTR_BITS 47 # endif -# endif # define CNT_BITS (64 - PTR_BITS + 3) static inline uint64 lfPack(LFNode *node, uintptr cnt) { return ((uint64)(node)<<(64-PTR_BITS)) | (cnt&(((1<<CNT_BITS)-1))); @@ -37,6 +36,7 @@ static inline uint64 lfPack(LFNode *node static inline LFNode* lfUnpack(uint64 val) { return (LFNode*)((val >> CNT_BITS) << 3); } +# endif /* __sparc__ ... */ #else static inline uint64 lfPack(LFNode *node, uintptr cnt) { return ((uint64)(uintptr)(node)<<32) | cnt;