OSDN Git Service

PR rtl-optimization/52139
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / tree-ssa / 20040211-1.c
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-cddce2" } */
3
4 struct rtx_def;
5 typedef struct rtx_def *rtx;
6 extern const char rtx_class[];
7 union rtunion_def
8 {
9   rtx rtx;
10 };
11 typedef union rtunion_def rtunion;
12 struct rtx_def
13 {
14   int code;
15   rtunion fld[1];
16 };
17 static int
18 can_move_up (rtx insn, int n_insns)
19 {
20   while (n_insns > 0)
21     {
22       insn = (((insn)->fld[1]).rtx);
23       if (((rtx_class[(int) (((insn)->code))]) == 'i'))
24         n_insns--;
25     }
26   return n_insns <= 0;
27 }
28 int
29 com (rtx insn, int blah)
30 {
31   if (!can_move_up (insn, blah))
32     foo ();
33 }
34
35 /* Cddce cannot remove possibly infinite loops and there is no way how to
36    determine whether the loop in can_move_up ends.  */
37 /* { dg-final { scan-tree-dump "if " "cddce2"} } */
38 /* { dg-final { cleanup-tree-dump "cddce2" } } */