1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-optimized" } */
4 extern void link_error (void);
7 /* check that cprop for variables of different types still works even
8 if function calls or assignments to different types of data are
11 int test7 (int *intarr
)
13 extern int foo7 (int);
34 extern int foo(int *);
72 extern int foo(int *);
102 int test9 (int *intarr
)
104 extern int foo9 (int) __attribute__ ((const));
114 int test99 (int *intarr
)
116 extern int foo9 (int) __attribute__ ((pure
));
126 extern int foo99 (int);
128 int test999 (int *arr
)
165 return v1
+ garr9
[0];
169 /* There should be not link_error calls, if there is any the
170 optimization has failed */
171 /* { dg-final { scan-tree-dump-times "link_error" 0 "optimized"} } */
172 /* { dg-final { cleanup-tree-dump "optimized" } } */