1/* { dg-do compile } */ 2/* { dg-options "-O2 -fdump-tree-pre-stats" } */ 3struct tree_common 4{ 5 int code; 6}; 7union tree_node 8{ 9 struct tree_common common; 10}; 11typedef union tree_node *tree; 12 13extern tree test (tree, int, int); 14extern tree foo (void); 15extern void abort (void) __attribute__ ((__noreturn__)); 16 17/* Redundant loads of expr->common.code */ 18tree 19test (tree expr, int t, int D17630) 20{ 21 int __i; 22 23L0: 24 if (expr->common.code != 142) goto L23; else goto L2; 25 26L2: 27 __i = 0; 28 goto L10; 29 30L10: 31 __i = __i + 1; 32 if (D17630 != __i) goto L8; else goto L19; 33 34L8: 35 if (t) goto L15; else goto L10; 36 37L15: 38 expr = foo (); 39 if (expr->common.code != 142) goto L23; else goto L0; 40 41L19: 42 abort (); 43 44L23: 45 return expr; 46} 47/* { dg-final { scan-tree-dump-times "Eliminated: 1" 1 "pre"} } */ 48/* { dg-final { cleanup-tree-dump "pre" } } */ 49 50