Mercurial > projects > ldc
annotate tests/mini/union2.d @ 445:cc40db549aea
Changed the handling of variadic intrinsics a bit.
Removed the -fp80 option and made real be 80bit floats on X86, this is what the D spec really says it should be and fixes a bunch of issues.
Changed the handling of parameter attributes to a bit more generalized approach.
Added sext/zext attributes for byte/short/ubyte/ushort parameters, fixes #60 .
Parameter attribs now properly set for intrinsic calls if necessary.
Made the tango.math.Math patch less intrusive.
Fixed/added some mini tests.
author | Tomas Lindquist Olsen <tomas.l.olsen@gmail.com> |
---|---|
date | Fri, 01 Aug 2008 17:59:58 +0200 |
parents | 44f08170f4ef |
children |
rev | line source |
---|---|
73 | 1 module union2; |
2 | |
3 union U | |
4 { | |
5 float f; | |
6 long l; | |
7 } | |
8 | |
9 U u; | |
10 | |
11 void main() | |
12 { | |
13 assert(u.f !<>= 0); | |
94
61615fa85940
[svn r98] Added support for std.c.stdlib.alloca via pragma(LLVM_internal, "alloca").
lindquist
parents:
73
diff
changeset
|
14 { |
61615fa85940
[svn r98] Added support for std.c.stdlib.alloca via pragma(LLVM_internal, "alloca").
lindquist
parents:
73
diff
changeset
|
15 uint* p = 1 + cast(uint*)&u; |
61615fa85940
[svn r98] Added support for std.c.stdlib.alloca via pragma(LLVM_internal, "alloca").
lindquist
parents:
73
diff
changeset
|
16 {assert(*p == 0);} |
61615fa85940
[svn r98] Added support for std.c.stdlib.alloca via pragma(LLVM_internal, "alloca").
lindquist
parents:
73
diff
changeset
|
17 } |
73 | 18 } |