2008-05-30 Vladimir Makarov <vmakarov@redhat.com>
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / pta-fp.c
blob022783df135fb43f28c7938859f31ad407301fac
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-alias" } */
3 extern double cos (double);
4 extern double sin (double);
5 double f(double a)
7 double b;
8 double c,d;
9 double (*fp) (double);
10 if (a < 2.0)
12 fp = sin;
13 c = fp (a);
15 else
17 c = 1.0;
18 fp = cos;
20 d = fp (a);
21 return d + c;
23 /* The points-to set of the final function pointer should be "sin cos" */
25 /* { dg-final { scan-tree-dump-times "{ sin cos }" 1 "alias"} } */
26 /* { dg-final { cleanup-tree-dump "alias" } } */