aboutsummaryrefslogtreecommitdiff
path: root/test/Sema/vector-init.c
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-10-22 05:17:15 +0000
committerChris Lattner <sabre@nondot.org>2009-10-22 05:17:15 +0000
commit9fcfe926432f3c3f7e9a61219e55c352fd358e45 (patch)
tree8d73e05215a22a32f7ade6292a0b6d84456e18a3 /test/Sema/vector-init.c
parent379afec20ce8fd419551874daf3a1e683547575e (diff)
fix PR5265: the size of a float3 should be rounded up to its alignment.
This ensures that arrays of float3 are correctly padded. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84833 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Sema/vector-init.c')
-rw-r--r--test/Sema/vector-init.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/Sema/vector-init.c b/test/Sema/vector-init.c
index 6eab32425a..523d23f32a 100644
--- a/test/Sema/vector-init.c
+++ b/test/Sema/vector-init.c
@@ -21,3 +21,10 @@ float4 array3[2] = { {1.0, 2.0, 3.0}, 5.0, 6.0, 7.0, 8.0,
__attribute__((vector_size(16))) // expected-error {{unsupported type 'float (void)' for vector_size attribute, please use on typedef}}
float f1(void) {
}
+
+
+
+// PR5265
+typedef float __attribute__((ext_vector_type (3))) float3;
+int test2[(sizeof(float3) == sizeof(float3)*2-1)];
+