1 /* { dg-do compile {target *-*-darwin* } } */
2 /* { dg-options "-std=c99 -w -fcommon" } */
4 /* This has been designed to give the same section usage for
5 -m32 and -m64 - so don't put any ints or longs in it ... */
7 /* A zero-sized object. */
8 typedef struct _empty
{} e_s
;
10 /* These should go in .comm */
13 /* { dg-final { scan-assembler ".comm\[\t \]_ub,1" } } */
14 /* { dg-final { scan-assembler ".comm\[\t \]_ea,1" } } */
16 /* These should go into __DATA,__common */
23 long long al_256
__attribute__((aligned (256))) = 0;
24 /* { dg-final { scan-assembler {.zerofill __DATA,__common,_a,1,0} } } */
25 /* { dg-final { scan-assembler {.zerofill __DATA,__common,_b,2,1} } } */
26 /* { dg-final { scan-assembler {.zerofill __DATA,__common,_d,8,3} } } */
27 /* { dg-final { scan-assembler {.zerofill __DATA,__common,_e,4,2} } } */
28 /* { dg-final { scan-assembler {.zerofill __DATA,__common,_f,8,3} } } */
29 /* long double can be 64 or 128 bits depending on the Darwin subtarget. */
30 /* { dg-final { scan-assembler {.zerofill __DATA,__common,_g,(16,4|8,3)} } } */
31 /* { dg-final { scan-assembler {.zerofill __DATA,__common,_al_256,8,8} } } */
33 /* These should go into __DATA,__bss */
40 static long double sg
;
41 static long long sal_256
__attribute__((aligned (2048)));
42 /* { dg-final { scan-assembler {.zerofill __DATA,__bss,_sea,1,0} } } */
43 /* { dg-final { scan-assembler {.zerofill __DATA,__bss,_sa,1,0} } } */
44 /* { dg-final { scan-assembler {.zerofill __DATA,__bss,_sb,2,1} } } */
45 /* { dg-final { scan-assembler {.zerofill __DATA,__bss,_sd,8,3} } } */
46 /* { dg-final { scan-assembler {.zerofill __DATA,__bss,_se,4,2} } } */
47 /* { dg-final { scan-assembler {.zerofill __DATA,__bss,_sf,8,3} } } */
48 /* long double can be 64 or 128 bits depending on the Darwin subtarget. */
49 /* { dg-final { scan-assembler {.zerofill __DATA,__bss,_sg,(16,4|8,3)} } } */
50 /* { dg-final { scan-assembler {.zerofill __DATA,__bss,_sal_256,8,11} } } */
68 return (long long) sd
+ b
;