summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/globalalias-2.c
blob: ab6db292e6940fdc80bfe8138f3919f9941cc87e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* { dg-require-alias "" }  */
int test2count;
extern void abort (void);
static
void test(void)
{
  test2count++;
}
__attribute__ ((weak,noinline))
__attribute ((alias("test")))
void test2(void);

void tt() 
{
  int prev = test2count;
  /* This call must bind locally.  */
  test();
  if (test2count == prev)
    abort();
  test2();
 }