brintos

brintos / llvm-project-archived public Read only

0
0
Text · 745 B · a8f686c Raw
43 lines · c
1// RUN: %clang -Wno-error=return-type -x c-header -o %t.pch %s2// RUN: echo > %t.empty.c3// RUN: %clang -Wno-error=return-type -include %t -x c %t.empty.c -emit-llvm -S -o -4 5// PR 4489: Crash with PCH6// PR 4492: Crash with PCH (round two)7// PR 4509: Crash with PCH (round three)8typedef struct _IO_FILE FILE;9extern int fprintf (struct _IO_FILE *__restrict __stream,10                    __const char *__restrict __format, ...);11 12int x(void)13{14  switch (1) {15    case 2: ;16      int y = 0;17  }18}19 20void y(void) {21  extern char z;22  fprintf (0, "a");23}24 25struct y0 { int i; } y0[1] = {};26 27void x0(void)28{29  extern char z0;30  fprintf (0, "a");31}32 33void x1(void)34{35  fprintf (0, "asdf");36}37 38void y1(void)39{40  extern char e;41  fprintf (0, "asdf");42}43