blob: 7306fdb5b52064e32cdca1e7aa6ac761effb1d38 [file] [log] [blame]
//--Make sure we can run DSA on it!
//RUN: llvm-gcc %s -c --emit-llvm -o - | \
//RUN: dsaopt -dsa-bu -dsa-td -disable-output
#include <stdlib.h>
struct StructType1 {
int a1;
int b1;
int c1;
};
struct StructType2 {
int a2;
short b2;
short c3;
int c2;
};
union UnionType {
struct StructType1 s1;
struct StructType2 s2;
};
void func() {
union UnionType obj;
obj.s1.a1 = 2l;
obj.s1.b1 = 33;
obj.s1.c1 = 22;
struct StructType2 s = obj.s2;
}