blob: afb7ca4b0df205f6e884a55ec4739b0349869730 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
/* { dg-do compile } */
/* { dg-options "-O1 -fdump-tree-local-pure-const1" } */
/* { dg-add-options bind_pic_locally } */
t(int a, int b, int c)
{
int *p;
if (a)
p = &a;
else
p = &c;
return *p;
}
/* { dg-final { scan-tree-dump-times "local memory is OK" 1 "local-pure-const1"} } */
/* { dg-final { scan-tree-dump-times "found to be const" 1 "local-pure-const1"} } */
/* { dg-final { cleanup-tree-dump "local-pure-const1" } } */
|