http://d.puremagic.com/issues/show_bug.cgi?id=11310
Summary: Alignment failure in test42.d
Product: D
Version: D2
Platform: x86_64
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: [email protected]
ReportedBy: [email protected]
--- Comment #0 from Walter Bright <[email protected]> 2013-10-20
22:43:57 PDT ---
Here's the code that fails in test/runnable/test42.d:
-----------------------------
align(16) struct S41
{
int[4] a;
}
shared int x41;
shared S41 s41;
void test41()
{
printf("&x = %p\n", &x41);
printf("&s = %p\n", &s41);
assert((cast(int)&s41 & 0xF) == 0);
}
----------------------------
when compiled on Linux with:
-O -fPIC
Curiously, it prints:
&x = 0x7fef00
&s = 0x7fef10
which shows it is aligned correctly - so why does the assert fail?
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------