blob: 03aee3e30c4fe368abd8d4894c0c3cc36a4bb919 [file] [log] [blame]
Daniel Dunbard7d5f022009-03-24 02:24:46 +00001// RUN: clang-cc -emit-llvm < %s -o %t &&
Nuno Lopes81e51e22009-01-17 00:48:48 +00002// 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;