1*f4a2713aSLionel Sambuc// 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 2*f4a2713aSLionel Sambuc// expected-no-diagnostics 3*f4a2713aSLionel Sambuc 4*f4a2713aSLionel Sambuc// <rdar://problem/11405978> - Handle casts of vectors to structs, and loading 5*f4a2713aSLionel Sambuc// a value. 6*f4a2713aSLionel Sambuctypedef float float32_t; 7*f4a2713aSLionel Sambuctypedef __attribute__((neon_vector_type(2))) float32_t float32x2_t; 8*f4a2713aSLionel Sambuc 9*f4a2713aSLionel Sambuctypedef struct 10*f4a2713aSLionel Sambuc{ 11*f4a2713aSLionel Sambuc float x, y; 12*f4a2713aSLionel Sambuc} Rdar11405978Vec; 13*f4a2713aSLionel Sambuc 14*f4a2713aSLionel Sambucfloat32x2_t rdar11405978_bar(); 15*f4a2713aSLionel Sambucfloat32_t rdar11405978() { 16*f4a2713aSLionel Sambuc float32x2_t v = rdar11405978_bar(); 17*f4a2713aSLionel Sambuc Rdar11405978Vec w = *(Rdar11405978Vec *)&v; 18*f4a2713aSLionel Sambuc return w.x; // no-warning 19*f4a2713aSLionel Sambuc} 20