aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/modref-dse-3.c
blob: c69e423c6fd60148031553ef1f5d498f95f7e68d (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-dse1-details"  } */
__attribute__ ((noinline))
void write (int *a)
{
	*a=1;
	a[1]=2;
}
int test ()
{
	int a;
	a=2;
	write (&a);
	return a;
}
int test2 (int *a)
{
	*a=2;
	write (a);
	return *a;
}
/* { dg-final { scan-tree-dump-times "Deleted dead store" 2 "dse1"} } */