Daniel Dunbar | a572887 | 2009-12-15 20:14:24 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -emit-llvm < %s | grep puts | count 4 |
Eli Friedman | 8f426fa | 2009-04-20 03:21:44 +0000 | [diff] [blame] | 2 | |
Eli Friedman | c62aad8 | 2009-04-20 03:54:15 +0000 | [diff] [blame] | 3 | // PR3248 |
Eli Friedman | 8f426fa | 2009-04-20 03:21:44 +0000 | [diff] [blame] | 4 | int a(int x) |
| 5 | { |
| 6 | int (*y)[x]; |
| 7 | return sizeof(*(puts("asdf"),y)); |
| 8 | } |
Eli Friedman | c62aad8 | 2009-04-20 03:54:15 +0000 | [diff] [blame] | 9 | |
| 10 | // PR3247 |
| 11 | int b() { |
| 12 | return sizeof(*(char(*)[puts("asdf")])0); |
| 13 | } |
| 14 | |
| 15 | // PR3247 |
| 16 | int c() { |
| 17 | static int (*y)[puts("asdf")]; |
| 18 | return sizeof(*y); |
| 19 | } |