OSDN Git Service

PR target/6428
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / 20020201-2.c
1 /* This testcase caused ICE because gcc was not able to add instructions
2    on edge from ENTRY block successor to itself.  */
3 /* { dg-do compile } */
4 /* { dg-options "-O3 -fssa" } */
5
6 struct A { int a1; int a2; };
7 struct B { long int b[32]; };
8
9 extern int bar (struct B *, struct A *);
10
11 int
12 foo (struct B x)
13 {
14   struct A a, b;
15   struct B c;
16   int d;
17
18   while (1)
19     {
20       a.a1 = 0;
21       a.a2 = 0;
22       b = a;
23       c = x;
24       d = bar (&c, &b);
25       if (d >= 0)
26         return d;
27     }
28
29   return 0;
30 }