← Back to index
|
Original Bugzilla link
Bug 10459 – align(16) does not work on Win64 with seperate compilation
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-06-23T23:31:00Z
Last change time
2013-11-30T02:05:17Z
Keywords
pull, wrong-code
Assigned to
nobody
Creator
r.sagitario
Comments
Comment #0
by r.sagitario — 2013-06-23T23:31:07Z
Compile these two files separately: //////////////////////// module test; import core.stdc.stdio; import test2; int x; align(16) int y; __gshared int ga; align(16) __gshared int gb; void main() { int[] arr = (&y)[0..1]; printf("&x = %p\n", &x); printf("&y = %p\n", &y); printf("&ga = %p\n", &ga); printf("&gb = %p\n", &gb); printf("&x2 = %p\n", &x2); printf("&y2 = %p\n", &y2); printf("&ga2 = %p\n", &ga2); printf("&gb2 = %p\n", &gb2); } //////////////////////// module test2; int x2; align(16) int y2; __gshared int ga2; align(16) __gshared int gb2; //////////////////////// dmd -c -m64 test.d dmd -c -m64 test2.d dmd -m64 test.obj test2.obj test prints &x = 00000000001D2C40 &y = 00000000001D2C50 &ga = 00000001400350E0 &gb = 00000001400350F0 &x2 = 00000000001D2C60 &y2 = 00000000001D2C70 &ga2 = 00000001400350F8 &gb2 = 0000000140035108 showing that gb2 is not aligned to 16 as requested.
Comment #1
by r.sagitario — 2013-06-23T23:38:50Z
https://github.com/D-Programming-Language/dmd/pull/2253
Comment #2
by github-bugzilla — 2013-06-24T09:02:45Z
Commit pushed to master at
https://github.com/D-Programming-Language/dmd
https://github.com/D-Programming-Language/dmd/commit/30701cefbb2489d024e5601063446b8561687181
Merge pull request #2253 from rainers/fix_10459 fix Issue 10459 - align(16) does not work on Win64 with seperate compilation
Comment #3
by r.sagitario — 2013-11-30T02:05:17Z
fixed in dmd 2.064