xref: /minix3/external/bsd/llvm/dist/clang/test/CodeGen/struct-init.c (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc // REQUIRES: arm-registered-target
2*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -S -triple armv7-apple-darwin -target-feature +neon %s -emit-llvm -o - | FileCheck %s
3*f4a2713aSLionel Sambuc 
4*f4a2713aSLionel Sambuc typedef struct _zend_ini_entry zend_ini_entry;
5*f4a2713aSLionel Sambuc struct _zend_ini_entry {
6*f4a2713aSLionel Sambuc   void *mh_arg1;
7*f4a2713aSLionel Sambuc };
8*f4a2713aSLionel Sambuc 
9*f4a2713aSLionel Sambuc char a;
10*f4a2713aSLionel Sambuc 
11*f4a2713aSLionel Sambuc const zend_ini_entry ini_entries[] = {
12*f4a2713aSLionel Sambuc   {  ((char*)&((zend_ini_entry*)0)->mh_arg1 - (char*)(void*)0)},
13*f4a2713aSLionel Sambuc };
14*f4a2713aSLionel Sambuc 
15*f4a2713aSLionel Sambuc // PR7564
16*f4a2713aSLionel Sambuc struct GLGENH {
17*f4a2713aSLionel Sambuc   int : 27;
18*f4a2713aSLionel Sambuc   int EMHJAA : 1;
19*f4a2713aSLionel Sambuc };
20*f4a2713aSLionel Sambuc 
21*f4a2713aSLionel Sambuc struct GLGENH ABHFBF = {1};
22*f4a2713aSLionel Sambuc 
23*f4a2713aSLionel Sambuc typedef __attribute__(( ext_vector_type(2) )) unsigned int uint2;
24*f4a2713aSLionel Sambuc typedef __attribute__(( __vector_size__(8) )) unsigned int __neon_uint32x2_t;
25*f4a2713aSLionel Sambuc 
26*f4a2713aSLionel Sambuc // rdar://8183908
27*f4a2713aSLionel Sambuc typedef unsigned int uint32_t;
28*f4a2713aSLionel Sambuc typedef __attribute__((neon_vector_type(2)))  uint32_t uint32x2_t;
foo()29*f4a2713aSLionel Sambuc void foo() {
30*f4a2713aSLionel Sambuc     const uint32x2_t signBit = { (uint2) 0x80000000 };
31*f4a2713aSLionel Sambuc }
32*f4a2713aSLionel Sambuc 
33*f4a2713aSLionel Sambuc // CHECK: %struct.fp_struct_foo = type { void ([1 x i32])* }
34*f4a2713aSLionel Sambuc struct fp_struct_bar { int a; };
35*f4a2713aSLionel Sambuc 
36*f4a2713aSLionel Sambuc struct fp_struct_foo {
37*f4a2713aSLionel Sambuc   void (*FP)(struct fp_struct_bar);
38*f4a2713aSLionel Sambuc } G;
39