This test has been automatized
[oota-llvm.git] / test / CFrontend / 2002-02-14-EntryNodePreds.c
1 /* GCC Used to generate code that contained a branch to the entry node of 
2  * the do_merge function.  This is illegal LLVM code.  To fix this, GCC now
3  * inserts an entry node regardless of whether or not it has to insert allocas.
4  */
5
6 struct edge_rec
7 {
8   struct VERTEX *v;
9   struct edge_rec *next;
10   int wasseen;
11   int more_data;
12 };
13
14 typedef struct edge_rec *QUAD_EDGE;
15
16 typedef struct {
17   QUAD_EDGE left, right;
18 } EDGE_PAIR;
19
20 struct EDGE_STACK {
21     int ptr;
22     QUAD_EDGE *elts;
23     int stack_size;
24 };
25
26 int do_merge(QUAD_EDGE ldo, QUAD_EDGE rdo) {
27   int lvalid;
28   QUAD_EDGE basel,rcand;
29   while (1) {
30     if (!lvalid) {
31       return (int)basel->next;
32     }
33   }
34 }
35