blob: 420ba2c64b3cc43e8cf7c445fb687b44274bbd77 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
/* { dg-do compile } */
/* -Og does not build the points-to aliasing info. */
/* { dg-skip-if "" { *-*-* } { "-O0" "-Og" } { "" } } */
/* { dg-options "-fdump-tree-fre1" } */
struct S { int i; void *p; int j; };
int
foo (struct S * __restrict p, int *q, int flag)
{
int *x = &p->j;
if (flag)
x = &p->i;
*q = 1;
*x = 2;
return *q;
}
/* { dg-final { scan-tree-dump "return 1;" "fre1" } } */
|