blob: a9ea3274ae4bdc31bab60f7bcd9fa7653b725a0c [file] [log] [blame]
Amara Emerson8c3de542013-09-16 18:07:35 +00001// RUN: %clang_cc1 -triple thumbv7-apple-ios0.0.0 -target-feature +neon -analyze -analyzer-checker=core -analyzer-store=region -verify -fblocks -analyzer-opt-analyze-nested-blocks -Wno-objc-root-class %s
Andy Gibbsc6e68da2012-10-19 12:44:48 +00002// expected-no-diagnostics
Ted Kremenekf534e912012-05-08 21:49:54 +00003
4// <rdar://problem/11405978> - Handle casts of vectors to structs, and loading
5// a value.
6typedef float float32_t;
7typedef __attribute__((neon_vector_type(2))) float32_t float32x2_t;
8
9typedef struct
10{
11 float x, y;
12} Rdar11405978Vec;
13
14float32x2_t rdar11405978_bar();
15float32_t rdar11405978() {
16 float32x2_t v = rdar11405978_bar();
17 Rdar11405978Vec w = *(Rdar11405978Vec *)&v;
18 return w.x; // no-warning
19}