blob: 9f0b080d9508c515c67f54c75888f99918d9af97 [file] [log] [blame]
Nuno Lopes81e51e22009-01-17 00:48:48 +00001// RUN: clang -emit-llvm < %s -o %t &&
2// RUN: grep "store i32 351, i32*" %t &&
Chris Lattner6f877cd2009-03-01 00:59:19 +00003// RUN: grep "w = global %0 <{ i32 2, i8 0, i8 0, i8 0, i8 0 }>" %t &&
4// RUN: grep "y = global %1 <{ double 7.300000e+01 }>" %t
Nuno Lopes7e916272009-01-15 20:14:33 +00005
Nuno Lopes81e51e22009-01-17 00:48:48 +00006union u { int i; double d; };
Nuno Lopes7e916272009-01-15 20:14:33 +00007
8void foo() {
9 union u ola = (union u) 351;
10}
11
Nuno Lopes81e51e22009-01-17 00:48:48 +000012union u w = (union u)2;
13union u y = (union u)73.0;