1 /* Check that __builtin_unreachable() is a no-return function thus
2    causing the dead call to foo() to be removed.  The comparison is
3    dead too, and should be removed.  */
4 /* { dg-do compile } */
5 /* { dg-options "-O2 -fdump-tree-optimized -fdump-rtl-cse1" } */
6 void foo (void);
7 
8 int
f(int i)9 f (int i)
10 {
11   if (i > 1)
12     __builtin_unreachable();
13   if (i > 1)
14     foo ();
15   return 1;
16 }
17 /* { dg-final { scan-tree-dump-not "foo" "optimized" } } */
18 /* { dg-final { scan-rtl-dump-not "\\(if_then_else" "cse1" } } */
19