From 3a33f4903a31d35db13fb2846c5fcd0feb623888 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 29 Apr 2009 06:46:27 +0000 Subject: [PATCH] testcase for PR4082 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70375 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/FrontendC/2009-04-28-UnionArrayCrash.c | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 test/FrontendC/2009-04-28-UnionArrayCrash.c diff --git a/test/FrontendC/2009-04-28-UnionArrayCrash.c b/test/FrontendC/2009-04-28-UnionArrayCrash.c new file mode 100644 index 00000000000..75851d0f5c0 --- /dev/null +++ b/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]; + +