]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gcc.dg/tree-ssa/pr68198.c
16097d7e2bc5e8fc11c764c9601b15e1a11c60b2
[thirdparty/gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / pr68198.c
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-thread1-details -fdisable-tree-ethread" } */
3
4 extern void abort (void);
5
6 typedef union tree_node *tree;
7 union tree_node
8 {
9 int code;
10 tree chain;
11 int omp_code;
12 }
13 bitmap_head;
14
15 extern int c_omp_predetermined_sharing (tree);
16
17 tree
18 c_finish_omp_clauses (tree clauses)
19 {
20 tree c, t, *pc = &clauses;
21 for (pc = &clauses, c = clauses; c; c = *pc)
22 {
23 unsigned char remove = 0;
24 switch (((c->omp_code)))
25 {
26 case 1:
27 if (t->code != 42)
28 remove = 1;
29 switch (c_omp_predetermined_sharing (t))
30 {
31 case 2:
32 abort ();
33 }
34 }
35 if (remove)
36 *pc = c->chain;
37 }
38 }
39
40 /* There are 3 FSM jump threading opportunities, two of which will
41 get filtered out. */
42 /* { dg-final { scan-tree-dump-times "Registering FSM" 1 "thread1"} } */
43 /* { dg-final { scan-tree-dump-times "FSM Thread through multiway branch without threading a multiway branch" 2 "thread1"} } */