summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/torture/pr43879_1.c
blob: 151a184cb19d95ea0ffb35d2e32839af4e061684 (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
/* { dg-do run } */
/* { dg-options "-fipa-pta" } */
/* { dg-additional-sources "pr43879_2.c" } */

void bar(int c)
{
	static int x = 1;
	if (c != x) __builtin_abort();
	x--;
}

void baz(int *i)
{
	(*i)--;
}

struct TBL {
	int (*p)(int *i);
};
extern struct TBL tbl;

int main()
{
	int c = 1;
	return tbl.p(&c);
}