1 /* { dg-do compile } */ 2 /* { dg-options "-O1 -fdump-tree-dom2" } */ 3 int link_error(void); 4 int s(void); 5 t(int i)6int t(int i) 7 { 8 _Bool g = i == 4; 9 int h = g; 10 _Bool j = h; 11 int k = j; 12 _Bool l = k == 0; 13 _Bool o = !l; 14 int m = o; 15 16 if (m) 17 if (i != 4) 18 return link_error(); 19 return 0; 20 } 21 22 /* There should be no link_error calls, if there is any, the 23 optimization has failed */ 24 /* { dg-final { scan-tree-dump-times "link_error" 0 "dom2"} } */ 25