Mercurial > projects > ldc
view test/b.d @ 205:9d44ec83acd1 trunk
[svn r221] Update: Switched to the 2.3 LLVM svn branch, http://llvm.org/svn/llvm-project/llvm/branches/release_23 .
Fixed: Implemented volatile statements. Uses the LLVM memory barrier intrinsic, closes #21 .
author | lindquist |
---|---|
date | Tue, 13 May 2008 17:58:11 +0200 |
parents | 25d4fcce53f4 |
children | d9d5d59873d8 |
line wrap: on
line source
module b; struct S { int i; float[4] f; } void main() { S s; int i = s.i; int* p = &s.i; *p = 42; printf("%d == %d\n", *p, s.i); float* f = &s.f[0]; printf("%f == %f\n", *f, s.f[0]); *f = 3.1415; printf("%f == %f\n", *f, s.f[0]); s.f[0] = 123.456; printf("%f == %f\n", *f, s.f[0]); }