Home | History | Annotate | Download | only in PCH
      1 // RUN: %clang -x c-header -o %t.pch %s
      2 // RUN: echo > %t.empty.c
      3 // RUN: %clang -include %t -x c %t.empty.c -emit-llvm -S -o -
      4 
      5 // FIXME: This test is forcibly disabled, it is flaky on the clang-i686-xp-msvc9
      6 // buildbot.
      7 //
      8 // RUN: false
      9 // XFAIL: *
     10 
     11 // PR 4489: Crash with PCH
     12 // PR 4492: Crash with PCH (round two)
     13 // PR 4509: Crash with PCH (round three)
     14 typedef struct _IO_FILE FILE;
     15 extern int fprintf (struct _IO_FILE *__restrict __stream,
     16                     __const char *__restrict __format, ...);
     17 
     18 int x(void)
     19 {
     20   switch (1) {
     21     case 2: ;
     22       int y = 0;
     23   }
     24 }
     25 
     26 void y(void) {
     27   extern char z;
     28   fprintf (0, "a");
     29 }
     30 
     31 struct y0 { int i; } y0[1] = {};
     32 
     33 void x0(void)
     34 {
     35   extern char z0;
     36   fprintf (0, "a");
     37 }
     38 
     39 void x1(void)
     40 {
     41   fprintf (0, "asdf");
     42 }
     43 
     44 void y1(void)
     45 {
     46   extern char e;
     47   fprintf (0, "asdf");
     48 }
     49