freebsd-dev/test/PCH/pr4489.c

43 lines
699 B
C
Raw Normal View History

2010-01-01 10:34:51 +00:00
// RUN: %clang -x c-header -o %t.pch %s
2009-11-18 14:59:57 +00:00
// RUN: echo > %t.empty.c
2010-01-01 10:34:51 +00:00
// RUN: %clang -include %t -x c %t.empty.c -emit-llvm -S -o -
2010-05-04 16:12:48 +00:00
2009-07-04 13:58:54 +00:00
// PR 4489: Crash with PCH
2009-10-14 18:03:49 +00:00
// PR 4492: Crash with PCH (round two)
// PR 4509: Crash with PCH (round three)
2009-07-04 13:58:54 +00: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-10-14 18:03:49 +00:00
}
struct y0 { int i; } y0[1] = {};
void x0(void)
{
extern char z0;
fprintf (0, "a");
}
void x1(void)
{
fprintf (0, "asdf");
}
void y1(void)
{
extern char e;
fprintf (0, "asdf");
2009-11-04 15:04:32 +00:00
}