Mercurial > projects > ldc
annotate test/b.d @ 81:3587401b6eeb trunk
[svn r85] Fixed: if a return statement appeared in the try block of a nested try-finally, only the inner-most finally block would be executed.
Changed: Renamed all the LLVM_Dto... helper function to just Dto...
author | lindquist |
---|---|
date | Thu, 01 Nov 2007 17:27:18 +0100 |
parents | c53b6e3fe49a |
children | fd32135dca3e |
rev | line source |
---|---|
1 | 1 module b; |
2 | |
3 struct S | |
4 { | |
5 int i; | |
6 float[4] f; | |
7 } | |
8 | |
9 void main() | |
10 { | |
11 S s; | |
12 int i = s.i; | |
13 int* p = &s.i; | |
14 *p = 42; | |
15 printf("%d == %d\n", *p, s.i); | |
16 | |
17 float* f = &s.f[0]; | |
18 printf("%f == %f\n", *f, s.f[0]); | |
19 *f = 3.1415; | |
20 printf("%f == %f\n", *f, s.f[0]); | |
21 s.f[0] = 123.456; | |
22 printf("%f == %f\n", *f, s.f[0]); | |
23 } |