aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/iinline-attr-2.c
blob: 4b390cae0ef735cfa37c4abb3f1bb30f673b274a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/* Verify that alignment flags are set when  attribute __optimize is used.  */
/* { dg-do compile } */
/* { dg-options "-O2"  } */

extern void non_existent(int);

__attribute__ ((__optimize__ ("O2")))
static void hooray ()
{
  non_existent (1);
}

__attribute__ ((__optimize__ ("O2")))
static void hiphip (void (*f)())
{
  non_existent (2);
  f ();
}

__attribute__ ((__optimize__ ("O2")))
int test (void)
{
  hiphip (hooray);
  return 0;
}

/* { dg-final { scan-assembler "p2align" } } */