brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1018 B · e18b98a Raw
22 lines · c
1// RUN: %clang_cc1 %s -pedantic -verify -triple=x86_64-apple-darwin92 3typedef float float4 __attribute__((ext_vector_type(4)));4 5float 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}22