Mercurial > projects > ldc
view tests/mini/classes13_bug239.d @ 1215:08f87d8cd101
Fix some unittests for 64-bit asm. They were operating on int variables as if
they were longs.
This was causing asm1_1 to fail when compiled with -O3 because it was
overwriting the spilled value of callee-saved register %rbx, which the runtime
was using as a pointer value at the time.
author | Frits van Bommel <fvbommel wxs.nl> |
---|---|
date | Mon, 13 Apr 2009 17:42:36 +0200 |
parents | 9d308feaec27 |
children |
line wrap: on
line source
extern(C) int printf(char*, ...); class A { bool Afoo = false; void foo() { Afoo = true; } } class B : A {} class C : B { bool Cfoo = false; void foo() { Cfoo = true; } } void main() { scope c1 = new C(); c1.foo(); assert(c1.Cfoo && !c1.Afoo); scope c2 = new C(); c2.B.foo(); assert(!c2.Cfoo && c2.Afoo); scope c3 = new C(); c3.A.foo(); assert(!c3.Cfoo && c3.Afoo); }