Daniel Dunbar | a572887 | 2009-12-15 20:14:24 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -S %s -o - |
Seo Sanghyeon | ec86b97 | 2007-12-03 06:23:43 +0000 | [diff] [blame] | 2 | |
| 3 | typedef int Int; |
| 4 | |
Daniel Dunbar | b09fae7 | 2009-01-23 18:51:09 +0000 | [diff] [blame] | 5 | int f0(int *a, Int *b) { return a - b; } |
Seo Sanghyeon | 9bb947a | 2007-12-26 05:21:37 +0000 | [diff] [blame] | 6 | |
Daniel Dunbar | b09fae7 | 2009-01-23 18:51:09 +0000 | [diff] [blame] | 7 | int f1(const char *a, char *b) { return b - a; } |
| 8 | |
| 9 | // GNU extensions |
| 10 | typedef void (*FP)(void); |
| 11 | void *f2(void *a, int b) { return a + b; } |
| 12 | void *f2_1(void *a, int b) { return (a += b); } |
| 13 | void *f3(int a, void *b) { return a + b; } |
| 14 | void *f3_1(int a, void *b) { return (a += b); } |
| 15 | void *f4(void *a, int b) { return a - b; } |
| 16 | void *f4_1(void *a, int b) { return (a -= b); } |
| 17 | FP f5(FP a, int b) { return a + b; } |
| 18 | FP f5_1(FP a, int b) { return (a += b); } |
| 19 | FP f6(int a, FP b) { return a + b; } |
| 20 | FP f6_1(int a, FP b) { return (a += b); } |
| 21 | FP f7(FP a, int b) { return a - b; } |
| 22 | FP f7_1(FP a, int b) { return (a -= b); } |