Skip to content
This repository was archived by the owner on Feb 8, 2024. It is now read-only.

Commit 14ff752

Browse files
committed
runnable/mars1.d: Properly work around LLVM x86 backend bug/limitation
1 parent d654a08 commit 14ff752

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

runnable/mars1.d

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -794,23 +794,26 @@ struct S8658
794794
int[16385] a;
795795
}
796796

797+
// LDC_FIXME: The LLVM x86 backend suffers from this as well - an
798+
// argument's size in bytes seems to be limited to 16 bits.
799+
version (LDC) version (X86) version = LDC_X86;
800+
801+
version (LDC_X86) {} else
802+
{
797803
void foo8658(S8658 s)
798804
{
799805
int x;
800806
}
807+
}
801808

802809
void test8658()
803810
{
804811
S8658 s;
805-
version (LDC)
806-
{
807-
// LDC_FIXME: The LLVM x86 backend suffers from this as well.
808-
}
809-
else
810-
{
812+
version (LDC_X86) {} else
813+
{
811814
for(int i = 0; i < 1000; i++)
812815
foo8658(s);
813-
}
816+
}
814817
}
815818

816819
////////////////////////////////////////////////////////////////////////

0 commit comments

Comments
 (0)