blob: 033e55b853c8962ce5083e9d7bb62b861329295c [file] [log] [blame]
Daniel Dunbar80737ad2009-12-15 22:01:24 +00001// RUN: %clang -x c-header -o %t.pch %s
Daniel Dunbar4fcfde42009-11-08 01:45:36 +00002// RUN: echo > %t.empty.c
Daniel Dunbar80737ad2009-12-15 22:01:24 +00003// RUN: %clang -include %t -x c %t.empty.c -emit-llvm -S -o -
Daniel Dunbar08c0cdf2010-04-09 15:30:57 +00004
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
Douglas Gregorae4df622009-07-01 23:29:14 +000011// PR 4489: Crash with PCH
Douglas Gregorc29f77b2009-07-07 16:35:42 +000012// PR 4492: Crash with PCH (round two)
13// PR 4509: Crash with PCH (round three)
Douglas Gregorae4df622009-07-01 23:29:14 +000014typedef struct _IO_FILE FILE;
15extern int fprintf (struct _IO_FILE *__restrict __stream,
16 __const char *__restrict __format, ...);
17
18int x(void)
19{
20 switch (1) {
21 case 2: ;
22 int y = 0;
23 }
24}
25
26void y(void) {
27 extern char z;
28 fprintf (0, "a");
Douglas Gregord89275b2009-07-06 18:54:52 +000029}
30
31struct y0 { int i; } y0[1] = {};
32
33void x0(void)
34{
35 extern char z0;
36 fprintf (0, "a");
Douglas Gregorc29f77b2009-07-07 16:35:42 +000037}
38
39void x1(void)
40{
41 fprintf (0, "asdf");
42}
43
44void y1(void)
45{
46 extern char e;
47 fprintf (0, "asdf");
Daniel Dunbare584b652009-11-03 17:56:18 +000048}