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
c_finish_omp_clauses(tree clauses)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.  */
41 /* { dg-final { scan-tree-dump-times "Registering FSM" 3 "thread1"} } */
42