Merge from mainline.
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / pr14814.c
bloba5bf8c85e0227db22d1dc91eaac576c5b3e56bd4
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-forwprop2" } */
5 struct YY {
6 double e[3]; };
8 static inline double *y(struct YY* this_1) { return &this_1->e[1]; }
10 struct XX {
11 struct YY v;
14 static inline struct YY direction (const struct XX* this_1) { return this_1->v;}
16 int foo(const struct XX* r) {
17 struct YY t = direction(r);
18 if (*y(&t) < 0.000001) return 0;
19 return 1;
22 /* { dg-final { scan-tree-dump-times "&" 0 "forwprop2" } } */
23 /* { dg-final { cleanup-tree-dump "forwprop2" } } */