1 // RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 \ 2 // RUN: -triple aarch64-arm-none-eabi -target-cpu cortex-a75 \ 3 // RUN: -target-feature +bf16 -target-feature +neon %s 4 // RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 \ 5 // RUN: -triple arm-arm-none-eabi -target-cpu cortex-a53 \ 6 // RUN: -target-feature +bf16 -target-feature +neon %s 7 8 void test(bool b) { 9 __bf16 bf16; 10 11 bf16 + bf16; // expected-error {{invalid operands to binary expression ('__bf16' and '__bf16')}} 12 bf16 - bf16; // expected-error {{invalid operands to binary expression ('__bf16' and '__bf16')}} 13 bf16 * bf16; // expected-error {{invalid operands to binary expression ('__bf16' and '__bf16')}} 14 bf16 / bf16; // expected-error {{invalid operands to binary expression ('__bf16' and '__bf16')}} 15 16 __fp16 fp16; 17 18 bf16 + fp16; // expected-error {{invalid operands to binary expression ('__bf16' and '__fp16')}} 19 fp16 + bf16; // expected-error {{invalid operands to binary expression ('__fp16' and '__bf16')}} 20 bf16 - fp16; // expected-error {{invalid operands to binary expression ('__bf16' and '__fp16')}} 21 fp16 - bf16; // expected-error {{invalid operands to binary expression ('__fp16' and '__bf16')}} 22 bf16 * fp16; // expected-error {{invalid operands to binary expression ('__bf16' and '__fp16')}} 23 fp16 * bf16; // expected-error {{invalid operands to binary expression ('__fp16' and '__bf16')}} 24 bf16 / fp16; // expected-error {{invalid operands to binary expression ('__bf16' and '__fp16')}} 25 fp16 / bf16; // expected-error {{invalid operands to binary expression ('__fp16' and '__bf16')}} 26 bf16 = fp16; // expected-error {{assigning to '__bf16' from incompatible type '__fp16'}} 27 fp16 = bf16; // expected-error {{assigning to '__fp16' from incompatible type '__bf16'}} 28 bf16 + (b ? fp16 : bf16); // expected-error {{incompatible operand types ('__fp16' and '__bf16')}} 29 } 30