1 /* { dg-do compile } */
2 /* { dg-options "-O1 -fdump-tree-dom2" } */
3 extern void abort (void);
4 struct rtx_def;
5 typedef struct rtx_def *rtx;
6 enum rtx_code
7 {
8   CALL_INSN,
9   EXPR_LIST,
10   NOTE,
11   LAST = 256
12 };
13 
14 struct rtx_def
15 {
16 
17   enum rtx_code code:16;
18 };
19 
20 extern void blah (rtx *);
21 
22 int
nonlocal_mentioned_p(x)23 nonlocal_mentioned_p (x)
24      rtx x;
25 {
26   if (x->code == CALL_INSN)
27     {
28       rtx const _rtx = ((x));
29       if (_rtx->code != CALL_INSN
30 	  && _rtx->code != NOTE
31 	  && _rtx->code != EXPR_LIST)
32 	abort ();
33     }
34 
35   blah (&x);
36 }
37 
38 /* There should be no casts to a short unsigned int since the entire
39    set of conditionals should optimize away.  */
40 /* { dg-final { scan-tree-dump-times "\\(short unsigned int\\)" 0 "dom2"} } */
41 
42 /* There should be no IF conditionals.  */
43 /* { dg-final { scan-tree-dump-times "if " 0 "dom2"} } */
44 
45