1 /* Verify that valid alignment on either a function declaration
2    or a definition has the expected effect and overrides -Os.
3    { dg-do compile }
4    { dg-options "-Os" }  */
5 
6 #define ALIGN(n)         __attribute__ ((aligned (n)))
7 
8 /* No alignment specified (to cause the subsequent instruction
9    to be at an odd boundary due to -Os).  */
f(void)10 void f (void) { }
11 
12 void f4 (void);
13 
14 ALIGN (4)
f4(void)15 void f4 (void) { }
16 
17 /* { dg-final { scan-assembler ".align 4\n\t.globl\tf4" { target { ! *-*-darwin* } } } } */
18 /* { dg-final { scan-assembler {.align[ \t]2,0x90\n\t.globl[ \t]_f4} { target *-*-darwin*  } } } */
19 
g(void)20 void g (void) { }
21 
22 
23 ALIGN (4)
24 void g4 (void);
25 
g4(void)26 void g4 (void) { }
27