Add and use DominatorTreeBase::findNearestCommonDominator().
[llvm-complete.git] / test / C++Frontend / 2005-02-11-AnonymousUnion.cpp
blobb0ff7e7507588a073a2819dc00821620385072b7
1 // RUN: %llvmgxx %s -S -o -
3 // Test anonymous union with members of the same size.
4 int test1(float F) {
5 union {
6 float G;
7 int i;
8 };
9 G = F;
10 return i;
13 // test anonymous union with members of differing size.
14 int test2(short F) {
15 volatile union {
16 short G;
17 int i;
19 G = F;
20 return i;
23 // Make sure that normal unions work. duh :)
24 volatile union {
25 short S;
26 int i;
27 } U;
29 int test3(short s) {
30 U.S = s;
31 return U.i;