13573b2c84372d9484296fa658f5276f6c09acb92Daniel Dunbar// RUN: %clang_cc1 -S %s -o - 2fcd44772533dde856580db1300c92e9b85368656Seo Sanghyeon 3fcd44772533dde856580db1300c92e9b85368656Seo Sanghyeontypedef int Int; 4fcd44772533dde856580db1300c92e9b85368656Seo Sanghyeon 54fd58ab865d3f56ca2051154d0a977b31cc5e383Daniel Dunbarint f0(int *a, Int *b) { return a - b; } 6a570d31f798157bf93a444493df182f09b2ee1c6Seo Sanghyeon 74fd58ab865d3f56ca2051154d0a977b31cc5e383Daniel Dunbarint f1(const char *a, char *b) { return b - a; } 84fd58ab865d3f56ca2051154d0a977b31cc5e383Daniel Dunbar 94fd58ab865d3f56ca2051154d0a977b31cc5e383Daniel Dunbar// GNU extensions 104fd58ab865d3f56ca2051154d0a977b31cc5e383Daniel Dunbartypedef void (*FP)(void); 114fd58ab865d3f56ca2051154d0a977b31cc5e383Daniel Dunbarvoid *f2(void *a, int b) { return a + b; } 128d033e911931bc942681b5ef85c125f9559a570bAbramo Bagnaravoid *f2_0(void *a, int b) { return &a[b]; } 134fd58ab865d3f56ca2051154d0a977b31cc5e383Daniel Dunbarvoid *f2_1(void *a, int b) { return (a += b); } 144fd58ab865d3f56ca2051154d0a977b31cc5e383Daniel Dunbarvoid *f3(int a, void *b) { return a + b; } 154fd58ab865d3f56ca2051154d0a977b31cc5e383Daniel Dunbarvoid *f3_1(int a, void *b) { return (a += b); } 164fd58ab865d3f56ca2051154d0a977b31cc5e383Daniel Dunbarvoid *f4(void *a, int b) { return a - b; } 174fd58ab865d3f56ca2051154d0a977b31cc5e383Daniel Dunbarvoid *f4_1(void *a, int b) { return (a -= b); } 184fd58ab865d3f56ca2051154d0a977b31cc5e383Daniel DunbarFP f5(FP a, int b) { return a + b; } 194fd58ab865d3f56ca2051154d0a977b31cc5e383Daniel DunbarFP f5_1(FP a, int b) { return (a += b); } 204fd58ab865d3f56ca2051154d0a977b31cc5e383Daniel DunbarFP f6(int a, FP b) { return a + b; } 214fd58ab865d3f56ca2051154d0a977b31cc5e383Daniel DunbarFP f6_1(int a, FP b) { return (a += b); } 224fd58ab865d3f56ca2051154d0a977b31cc5e383Daniel DunbarFP f7(FP a, int b) { return a - b; } 234fd58ab865d3f56ca2051154d0a977b31cc5e383Daniel DunbarFP f7_1(FP a, int b) { return (a -= b); } 248d033e911931bc942681b5ef85c125f9559a570bAbramo Bagnaravoid f8(void *a, int b) { return *(a + b); } 258d033e911931bc942681b5ef85c125f9559a570bAbramo Bagnaravoid f8_1(void *a, int b) { return a[b]; } 26