OSDN Git Service

2010-01-26 Richard Guenther <rguenther@suse.de>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / tree-ssa / forwprop-10.c
1 /* { dg-do compile } */
2 /* { dg-options "-O -fdump-tree-forwprop1" } */
3
4 int b;
5 unsigned a;
6
7 static inline int *g(void)
8 {
9   a = 1;
10   return (int*)&a;
11 }
12 void test2(void)
13 {
14   b = *g();
15 }
16
17 /* The indirect load should be replaced by a load from a and a
18    conversion to int.  */
19
20 /* { dg-final { scan-tree-dump "= a;" "forwprop1" } } */
21 /* { dg-final { scan-tree-dump "= \\\(int\\\) " "forwprop1" } } */
22 /* { dg-final { scan-tree-dump-not "= \\\*" "forwprop1" } } */
23 /* { dg-final { cleanup-tree-dump "forwprop1" } } */