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