From e6d2e627dae94c95f6fb994620ca145353d36be6 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 29 Apr 2009 06:46:27 +0000 Subject: [PATCH] testcase for PR4082 llvm-svn: 70375 --- llvm/test/FrontendC/2009-04-28-UnionArrayCrash.c | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 llvm/test/FrontendC/2009-04-28-UnionArrayCrash.c diff --git a/llvm/test/FrontendC/2009-04-28-UnionArrayCrash.c b/llvm/test/FrontendC/2009-04-28-UnionArrayCrash.c new file mode 100644 index 000000000000..75851d0f5c01 --- /dev/null +++ b/llvm/test/FrontendC/2009-04-28-UnionArrayCrash.c @@ -0,0 +1,11 @@ +// RUN: %llvmgcc -S %s -o - +// PR4082 +union U { + int I; + double F; +}; + +union U arr[] = { { .I = 4 }, { .F = 123.} }; +union U *P = &arr[0]; + +