annotate gcc/testsuite/gcc.dg/builtin-unreachable-2.c @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* Check that __builtin_unreachable() is a no-return function thus
kono
parents:
diff changeset
2 causing the dead call to foo() to be removed. The comparison is
kono
parents:
diff changeset
3 dead too, and should be removed. */
kono
parents:
diff changeset
4 /* { dg-do compile } */
kono
parents:
diff changeset
5 /* { dg-options "-O2 -fdump-tree-optimized -fdump-rtl-cse1" } */
kono
parents:
diff changeset
6 void foo (void);
kono
parents:
diff changeset
7
kono
parents:
diff changeset
8 int
kono
parents:
diff changeset
9 f (int i)
kono
parents:
diff changeset
10 {
kono
parents:
diff changeset
11 if (i > 1)
kono
parents:
diff changeset
12 __builtin_unreachable();
kono
parents:
diff changeset
13 if (i > 1)
kono
parents:
diff changeset
14 foo ();
kono
parents:
diff changeset
15 return 1;
kono
parents:
diff changeset
16 }
kono
parents:
diff changeset
17 /* { dg-final { scan-tree-dump-not "foo" "optimized" } } */
kono
parents:
diff changeset
18 /* { dg-final { scan-rtl-dump-not "\\(if_then_else" "cse1" } } */