aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/modref-dse-7.c
blob: 85a01d30cea850ec90896cd0f2b0fb2baa010a9e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-optimized"  } */
struct list
{
	 struct list *next;
};
__attribute__ ((noinline))
void
kill(struct list *l, int *a)
{
	while (l)
		l=l->next;
	*a = 0;
}
void
test(struct list *l, int *a)
{
	*a=12345;
	kill (l, a);
	return;
}
/* { dg-final { scan-tree-dump-not "12345" "optimized"} } */