2009-12-16 06:01:24 +08:00
|
|
|
// RUN: %clang -x c-header -o %t.pch %s
|
2009-11-08 09:45:36 +08:00
|
|
|
// RUN: echo > %t.empty.c
|
2009-12-16 06:01:24 +08:00
|
|
|
// RUN: %clang -include %t -x c %t.empty.c -emit-llvm -S -o -
|
2010-04-09 23:30:57 +08:00
|
|
|
|
|
|
|
// FIXME: This test is forcibly disabled, it is flaky on the clang-i686-xp-msvc9
|
|
|
|
// buildbot.
|
|
|
|
//
|
|
|
|
// RUN: false
|
|
|
|
// XFAIL: *
|
|
|
|
|
2009-07-02 07:29:14 +08:00
|
|
|
// PR 4489: Crash with PCH
|
2009-07-08 00:35:42 +08:00
|
|
|
// PR 4492: Crash with PCH (round two)
|
|
|
|
// PR 4509: Crash with PCH (round three)
|
2009-07-02 07:29:14 +08:00
|
|
|
typedef struct _IO_FILE FILE;
|
|
|
|
extern int fprintf (struct _IO_FILE *__restrict __stream,
|
|
|
|
__const char *__restrict __format, ...);
|
|
|
|
|
|
|
|
int x(void)
|
|
|
|
{
|
|
|
|
switch (1) {
|
|
|
|
case 2: ;
|
|
|
|
int y = 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void y(void) {
|
|
|
|
extern char z;
|
|
|
|
fprintf (0, "a");
|
2009-07-07 02:54:52 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
struct y0 { int i; } y0[1] = {};
|
|
|
|
|
|
|
|
void x0(void)
|
|
|
|
{
|
|
|
|
extern char z0;
|
|
|
|
fprintf (0, "a");
|
2009-07-08 00:35:42 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
void x1(void)
|
|
|
|
{
|
|
|
|
fprintf (0, "asdf");
|
|
|
|
}
|
|
|
|
|
|
|
|
void y1(void)
|
|
|
|
{
|
|
|
|
extern char e;
|
|
|
|
fprintf (0, "asdf");
|
2009-11-04 01:56:18 +08:00
|
|
|
}
|