PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / iinline-attr-2.c
blob4b390cae0ef735cfa37c4abb3f1bb30f673b274a
1 /* Verify that alignment flags are set when attribute __optimize is used. */
2 /* { dg-do compile } */
3 /* { dg-options "-O2" } */
5 extern void non_existent(int);
7 __attribute__ ((__optimize__ ("O2")))
8 static void hooray ()
10 non_existent (1);
13 __attribute__ ((__optimize__ ("O2")))
14 static void hiphip (void (*f)())
16 non_existent (2);
17 f ();
20 __attribute__ ((__optimize__ ("O2")))
21 int test (void)
23 hiphip (hooray);
24 return 0;
27 /* { dg-final { scan-assembler "p2align" } } */