1 /* { dg-do compile } */
2 /* { dg-options "-O -fdump-tree-forwprop1" } */
3 
4 /* We should be able to fold the comparison at least with the
5    first forwprop pass, if not a ccp pass before.  */
6 
7 extern void link_error (void);
foo()8 void foo()
9 {
10   int i;
11   char *p = (char *)&i;
12   long *q = (long *)p;
13   if (q == 0)
14     link_error ();
15 }
16 
17 /* { dg-final { scan-tree-dump-not "link_error" "forwprop1" } } */
18