Jim Grosbach | f794705 | 2012-07-09 18:34:21 +0000 | [diff] [blame^] | 1 | // REQUIRES: arm-registered-target |
NAKAMURA Takumi | e1adf81 | 2011-07-28 03:53:54 +0000 | [diff] [blame] | 2 | // RUN: %clang_cc1 -S -triple armv7-apple-darwin %s -emit-llvm -o - | FileCheck %s |
Nuno Lopes | 77e1dfc | 2008-06-06 16:41:08 +0000 | [diff] [blame] | 3 | |
| 4 | typedef struct _zend_ini_entry zend_ini_entry; |
| 5 | struct _zend_ini_entry { |
Mike Stump | 1eb4433 | 2009-09-09 15:08:12 +0000 | [diff] [blame] | 6 | void *mh_arg1; |
Nuno Lopes | 77e1dfc | 2008-06-06 16:41:08 +0000 | [diff] [blame] | 7 | }; |
| 8 | |
| 9 | char a; |
| 10 | |
| 11 | const zend_ini_entry ini_entries[] = { |
Mike Stump | 1eb4433 | 2009-09-09 15:08:12 +0000 | [diff] [blame] | 12 | { ((char*)&((zend_ini_entry*)0)->mh_arg1 - (char*)(void*)0)}, |
Nuno Lopes | 77e1dfc | 2008-06-06 16:41:08 +0000 | [diff] [blame] | 13 | }; |
Chris Lattner | 2bc0025 | 2010-07-05 18:03:30 +0000 | [diff] [blame] | 14 | |
| 15 | // PR7564 |
| 16 | struct GLGENH { |
| 17 | int : 27; |
| 18 | int EMHJAA : 1; |
| 19 | }; |
| 20 | |
| 21 | struct GLGENH ABHFBF = {1}; |
Argyrios Kyrtzidis | 65e7a9e | 2011-02-01 00:52:10 +0000 | [diff] [blame] | 22 | |
| 23 | typedef __attribute__(( ext_vector_type(2) )) unsigned int uint2; |
| 24 | typedef __attribute__(( __vector_size__(8) )) unsigned int __neon_uint32x2_t; |
| 25 | |
| 26 | // rdar://8183908 |
Eric Christopher | 55528b2 | 2011-07-28 00:25:28 +0000 | [diff] [blame] | 27 | typedef unsigned int uint32_t; |
| 28 | typedef __attribute__((neon_vector_type(2))) uint32_t uint32x2_t; |
Argyrios Kyrtzidis | 65e7a9e | 2011-02-01 00:52:10 +0000 | [diff] [blame] | 29 | void foo() { |
| 30 | const uint32x2_t signBit = { (uint2) 0x80000000 }; |
| 31 | } |
Chris Lattner | 71305cc | 2011-07-15 05:16:14 +0000 | [diff] [blame] | 32 | |
Eric Christopher | 55528b2 | 2011-07-28 00:25:28 +0000 | [diff] [blame] | 33 | // CHECK: %struct.fp_struct_foo = type { void ([1 x i32])* } |
Chris Lattner | 71305cc | 2011-07-15 05:16:14 +0000 | [diff] [blame] | 34 | struct fp_struct_bar { int a; }; |
| 35 | |
| 36 | struct fp_struct_foo { |
| 37 | void (*FP)(struct fp_struct_bar); |
| 38 | } G; |