Douglas Gregor | ae4df62 | 2009-07-01 23:29:14 +0000 | [diff] [blame] | 1 | // RUN: clang -x c-header -o %t.pch %s && |
2 | // RUN: clang -include %t -x c /dev/null -emit-llvm -S -o - | ||||
3 | // PR 4489: Crash with PCH | ||||
4 | |||||
5 | typedef struct _IO_FILE FILE; | ||||
6 | extern int fprintf (struct _IO_FILE *__restrict __stream, | ||||
7 | __const char *__restrict __format, ...); | ||||
8 | |||||
9 | int x(void) | ||||
10 | { | ||||
11 | switch (1) { | ||||
12 | case 2: ; | ||||
13 | int y = 0; | ||||
14 | } | ||||
15 | } | ||||
16 | |||||
17 | void y(void) { | ||||
18 | extern char z; | ||||
19 | fprintf (0, "a"); | ||||
20 | } |