From 53de3e63cc63b7580c42bb035cd6408d643f3725 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 11 Apr 2007 23:45:16 +0000 Subject: [PATCH] new testcase. llvm-svn: 35931 --- test/CFrontend/2007-04-11-InlineAsmStruct.c | 9 +++++++++ test/CFrontend/2007-04-11-InlineAsmUnion.c | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 test/CFrontend/2007-04-11-InlineAsmStruct.c diff --git a/test/CFrontend/2007-04-11-InlineAsmStruct.c b/test/CFrontend/2007-04-11-InlineAsmStruct.c new file mode 100644 index 00000000000..8f7bc83648d --- /dev/null +++ b/test/CFrontend/2007-04-11-InlineAsmStruct.c @@ -0,0 +1,9 @@ +// RUN: %llvmgcc %s -S -emit-llvm -o - | grep 'call i32 asm' + +struct V { short X, Y; }; +int bar() { + struct V bar; + __asm__ volatile("foo %0\n" : "=r"(bar)); + return bar.X; +} + diff --git a/test/CFrontend/2007-04-11-InlineAsmUnion.c b/test/CFrontend/2007-04-11-InlineAsmUnion.c index 28ffe73feca..e4ea69a39e9 100644 --- a/test/CFrontend/2007-04-11-InlineAsmUnion.c +++ b/test/CFrontend/2007-04-11-InlineAsmUnion.c @@ -1,4 +1,4 @@ -// RUN: %llvmgcc %s -S -emit-llvm -o - | grep 'call void asm' +// RUN: %llvmgcc %s -S -emit-llvm -o - | grep 'call i32 asm' union U { int x; char* p; }; void foo() {