mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 21:21:48 +03:00

* Fix issue 23514 - Incorrect compilation when adding a 64-bit constant to a link-time address The current cast to int causes a loss of precision, which can result in incorrect compilation. * Add test23514.d * Enable optimization in test * Improve test case * Use ulong instead of size_t * Restrict test to 64-bit targets * Re-enable test for 32-bit targets * Disable test for win64 and add comment
13 lines
350 B
D
13 lines
350 B
D
// DISABLED: win64
|
|
// https://issues.dlang.org/show_bug.cgi?id=23514
|
|
|
|
// Note: this test is disabled on Win64 because of an issue with the Windows
|
|
// MS-COFF backend causing it to fail.
|
|
|
|
enum ulong offset = 0xFFFF_FFFF_0000_0000UL;
|
|
|
|
void main()
|
|
{
|
|
ulong voffset = offset;
|
|
assert((cast(ulong)&main + voffset) == (cast(ulong)&main + offset));
|
|
}
|