]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/CodeGen/2010-08-12-asm-aggr-arg.c
Vendor import of clang release_34 branch r197841 (effectively, 3.4 RC3):
[FreeBSD/FreeBSD.git] / test / CodeGen / 2010-08-12-asm-aggr-arg.c
1 // RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s
2 // Radar 8288710: A small aggregate can be passed as an integer.  Make sure
3 // we don't get an error with "input constraint with a matching output
4 // constraint of incompatible type!" 
5
6 struct wrapper {
7   int i;
8 };
9
10 // CHECK: xyz
11 int test(int i) {
12   struct wrapper w;
13   w.i = i;
14   __asm__("xyz" : "=r" (w) : "0" (w));
15   return w.i;
16 }