// RUN: %clang_cc1 -fsyntax-only -verify %s
// PR3459
struct bar {
  char n[1];
};

struct foo {
  char name[(int)&((struct bar *)0)->n];
  char name2[(int)&((struct bar *)0)->n - 1]; //expected-error{{array size is negative}}
};

// PR3430
struct s {
  struct st {
    int v;
  } *ts;
};

struct st;

int foo() {
  struct st *f;
  return f->v + f[0].v;
}

// PR3642, PR3671
struct pppoe_tag {
 short tag_type;
 char tag_data[];
};
struct datatag {
  struct pppoe_tag hdr; //expected-warning{{field 'hdr' with variable sized type 'struct pppoe_tag' not at the end of a struct or class is a GNU extension}}
  char data;
};


// PR4092
struct s0 {
  char a;  // expected-note {{previous declaration is here}}
  char a;  // expected-error {{duplicate member 'a'}}
};

struct s0 f0(void) {}

// <rdar://problem/8177927> - This previously triggered an assertion failure.
struct x0 {
  unsigned int x1;
};

// RUN: %clang_cc1 -fsyntax-only -verify %s
// PR3459
struct bar {
  char n[1];
};

struct foo {
  char name[(int)&((struct bar *)0)->n];
  char name2[(int)&((struct bar *)0)->n - 1]; //expected-error{{array size is negative}}
};

// PR3430
struct s {
  struct st {
    int v;
  } *ts;
};

struct st;

int foo() {
  struct st *f;
  return f->v + f[0].v;
}

// PR3642, PR3671
struct pppoe_tag {
 short tag_type;
 char tag_data[];
};
struct datatag {
  struct pppoe_tag hdr; //expected-warning{{field 'hdr' with variable sized type 'struct pppoe_tag' not at the end of a struct or class is a GNU extension}}
  char data;
};


// PR4092
struct s0 {
  char a;  // expected-note {{previous declaration is here}}
  char a;  // expected-error {{duplicate member 'a'}}
};

struct s0 f0(void) {}

--- 
+++ 
@@ -41,3 +41,8 @@
 };
 
 struct s0 f0(void) {}
+
+// <rdar://problem/8177927> - This previously triggered an assertion failure.
+struct x0 {
+  unsigned int x1;
+};
Add test case for <rdar://problem/8177927> (which triggered an assertion failure in SemaChecking).

git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@108159 91177308-0d34-0410-b5e6-96231b3b80d8
