Merged trunk at revision 161680 into branch.
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / forwprop-10.c
blobb46b8ece81606836484ee8a793db3a55e910090c
1 /* { dg-do compile } */
2 /* { dg-options "-O -fdump-tree-fre-details" } */
4 int b;
5 unsigned a;
7 static inline int *g(void)
9 a = 1;
10 return (int*)&a;
12 void test2(void)
14 b = *g();
17 /* The indirect load should be replaced by a load from a and a
18 conversion to int. FRE should then be able to replace
19 the rhs of the store to b by 1. */
21 /* { dg-final { scan-tree-dump "Replaced\[^\\n\]*with 1" "fre" } } */
22 /* { dg-final { cleanup-tree-dump "fre" } } */