PR testsuite/86649
[official-gcc.git] / gcc / testsuite / g++.dg / tree-ssa / ptrmemfield.C
blob50cf20c763f1e32c60813eb193955b87aec3ce6e
1 /* { dg-do compile } */
2 // { dg-options "-O2 -fdump-tree-optimized" }
5 struct f
7   char m;
8   char m1;
9 };
11 static inline char f:: *g(int a)
13   return a?0:&f::m;
16 int h(void)
18   char f:: *a = g(0);
19   return a == 0;
22 /* We should have no cast to offset_type. */
23 /* { dg-final { scan-tree-dump-times "offset_type" 0 "optimized"} } */
24 // And we should optimized this code to just return 0
25 /* { dg-final { scan-tree-dump-times "return 0" 1 "optimized"} } */