Mercurial > projects > ldc
annotate test/intrinsics.d @ 275:665b81613475 trunk
[svn r296] Removed: the 'suite' dir, it never took off!
Fixed: foreach statement, key-type checks were buggy.
Fixed: setting LLVMDC versions on the command line is now an error.
Fixed: array compare runtime had incorrect param attrs on call.
Fixed: index expressions on dynamic array slices w/o storage was broken.
Fixed: scope classes had incorrect finalization in some cases.
Fixed: when outputting !ClassInfoS !OffsetTypeInfoS, static class members were trying to be included, crashing the compiler.
Fixed: calling LLVMDC with -inline but not any -O option caused assertion failure.
Changed: the runtime now uses a single interface to "get" to !TypeInfoS, part of eliminating duplicate !TypeInfo codegen.
author | lindquist |
---|---|
date | Thu, 19 Jun 2008 17:30:32 +0200 |
parents | 44a95ac7368a |
children |
rev | line source |
---|---|
1 | 1 import llvm.intrinsic; |
2 | |
133
44a95ac7368a
[svn r137] Many fixes towards tango.io.Console working, but not quite there yet...
lindquist
parents:
1
diff
changeset
|
3 extern(C) int printf(char*,...); |
1 | 4 extern(C) int scanf(char*,...); |
5 | |
6 void main() | |
7 { | |
8 { | |
9 float f; | |
10 printf("Enter float: "); | |
11 scanf("%f", &f); | |
12 float sf = llvm_sqrt(f); | |
13 printf("sqrt(%f) = %f\n", f, sf); | |
14 } | |
15 | |
16 { | |
17 double d; | |
18 printf("Enter double: "); | |
19 scanf("%lf", &d); | |
20 double sd = llvm_sqrt(d); | |
21 printf("sqrt(%lf) = %lf\n", d, sd); | |
22 } | |
23 | |
24 { | |
25 real d; | |
26 printf("Enter real: "); | |
27 scanf("%lf", &d); | |
28 real sd = llvm_sqrt(d); | |
29 printf("sqrt(%lf) = %lf\n", d, sd); | |
30 } | |
31 } |