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