Implement GNU C extension: two types are compatible if they appear
as a function argument, one of the types is a transparent union type
and the other type is compatible with a union member
llvm-svn: 117243
diff --git a/clang/test/CodeGen/transparent-union.c b/clang/test/CodeGen/transparent-union.c
index 9f1cdda..0bdbd57 100644
--- a/clang/test/CodeGen/transparent-union.c
+++ b/clang/test/CodeGen/transparent-union.c
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple i386-unknown-unknown -emit-llvm -o %t %s
+// RUN: %clang_cc1 -Werror -triple i386-unknown-unknown -emit-llvm -o %t %s
// RUN: FileCheck < %t %s
//
// FIXME: Note that we don't currently get the ABI right here. f0() should be
@@ -12,9 +12,12 @@
// CHECK: define void @f1_0(i32* %a0)
// CHECK: call void @f0(%union.anon* byval %{{.*}})
+// CHECK: call void %{{.*}}(i8* %{{[a-z0-9]*}})
// CHECK: }
void f1_0(int *a0) {
+ void (*f0p)(void *) = f0;
f0(a0);
+ f0p(a0);
}
void f1_1(int *a0) {