]> granicus.if.org Git - clang/commitdiff
I forgot to check this in earlier
authorChris Lattner <sabre@nondot.org>
Tue, 17 Jul 2007 04:58:06 +0000 (04:58 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 17 Jul 2007 04:58:06 +0000 (04:58 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39958 91177308-0d34-0410-b5e6-96231b3b80d8

test/Sema/typedef-retain.c [new file with mode: 0644]

diff --git a/test/Sema/typedef-retain.c b/test/Sema/typedef-retain.c
new file mode 100644 (file)
index 0000000..341252f
--- /dev/null
@@ -0,0 +1,14 @@
+// RUN: clang -parse-ast-check %s
+
+typedef float float4 __attribute__((vector_size(16)));
+typedef int int4 __attribute__((vector_size(16)));
+typedef int4* int4p;
+
+void test1(float4 a, int4 *result, int i) {
+    result[i] = a; // expected-error {{assigning 'float4' to 'int4'}}
+}
+
+void test2(float4 a, int4p result, int i) {
+    result[i] = a; // expected-error {{assigning 'float4' to 'int4'}}
+}
+