| 1 |
// RUN: %clang_cc1 %s -pedantic -verify -triple=x86_64-apple-darwin9 |
| 2 |
|
| 3 |
typedef float float4 __attribute__((ext_vector_type(4))); |
| 4 |
|
| 5 |
float test_fminf(float f, int i, int *ptr, float4 v) { |
| 6 |
float r1 = __builtin_fminf(f, ptr); |
| 7 |
// expected-error@-1 {{passing 'int *' to parameter of incompatible type 'float'}} |
| 8 |
float r2 = __builtin_fminf(ptr, f); |
| 9 |
// expected-error@-1 {{passing 'int *' to parameter of incompatible type 'float'}} |
| 10 |
float r3 = __builtin_fminf(v, f); |
| 11 |
// expected-error@-1 {{passing 'float4' (vector of 4 'float' values) to parameter of incompatible type 'float'}} |
| 12 |
float r4 = __builtin_fminf(f, v); |
| 13 |
// expected-error@-1 {{passing 'float4' (vector of 4 'float' values) to parameter of incompatible type 'float'}} |
| 14 |
|
| 15 |
|
| 16 |
int *r5 = __builtin_fminf(f, f); |
| 17 |
// expected-error@-1 {{initializing 'int *' with an expression of incompatible type 'float'}} |
| 18 |
|
| 19 |
int *r6 = __builtin_fminf(f, v); |
| 20 |
// expected-error@-1 {{passing 'float4' (vector of 4 'float' values) to parameter of incompatible type 'float'}} |
| 21 |
} |