From 8406b1e1bbc1eb0487f1f4eb38e5e20ee1f62d58 Mon Sep 17 00:00:00 2001 From: Michael Beck Date: Mon, 1 Sep 2008 00:21:05 +0000 Subject: [PATCH 1/1] add testcase for union cast [r21611] --- parsetest/gnu99/union_cast.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 parsetest/gnu99/union_cast.c diff --git a/parsetest/gnu99/union_cast.c b/parsetest/gnu99/union_cast.c new file mode 100644 index 0000000..088aa48 --- /dev/null +++ b/parsetest/gnu99/union_cast.c @@ -0,0 +1,16 @@ +union foo { int i; double d; }; +int x; +double y; + +union foo u; + +void hack (union foo p) { + y = p.d; +} + +int main(int argc, char *argv[]) { + u = (union foo) x; + + hack ((union foo) x); + return 0; +} -- 2.20.1