[Issue 17726] Older DMD versions segfault when building Druntime with GCC 7.1
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Mon Aug 7 09:12:39 PDT 2017
https://issues.dlang.org/show_bug.cgi?id=17726
Vladimir Panteleev <dlang-bugzilla at thecybershadow.net> changed:
What |Removed |Added
----------------------------------------------------------------------------
See Also| |https://issues.dlang.org/sh
| |ow_bug.cgi?id=6215
--- Comment #8 from Vladimir Panteleev <dlang-bugzilla at thecybershadow.net> ---
elem* instances aren't 16-byte-aligned because of the following code in
tk/mem.c:
#if defined(__llvm__) && (defined(__GNUC__) || defined(__clang__))
// LLVM-GCC and Clang assume some types, notably elem (see DMD issue 6215),
// to be 16-byte aligned. Because we do not have any type information
// available here, we have to 16 byte-align everything.
numbytes = (numbytes + 0xF) & ~0xF;
#else
if (sizeof(size_t) == 2)
numbytes = (numbytes + 1) & ~1; /* word align */
else
numbytes = (numbytes + 3) & ~3; /* dword align */
#endif
Looks like the same restrictions which apply to LLVM now also apply to GCC 7.
Although I would expect that master would fail in the same way when built with
RELEASE=1, it doesn't seem to be the case.
--
More information about the Digitalmars-d-bugs
mailing list