1 /* { dg-do run } */
2 /* { dg-options "-O2 -fdump-tree-alias" } */
3 
4 const static int a;
5 
6 int __attribute__((noinline))
foo(int i)7 foo(int i)
8 {
9   const int *q;
10   int b;
11   if (i)
12     q = &a;
13   else
14     q = &b;
15   b = 1;
16   /* We should not prune a from the points-to set of q.  */
17   return *q;
18 }
19 
20 extern void abort (void);
main()21 int main()
22 {
23   if (foo(1) != 0)
24     abort ();
25   return 0;
26 }
27 
28 /* { dg-final { scan-tree-dump "q_. = { a b }" "alias" } } */
29