xref: /llvm-project/clang/test/CodeGen/X86/avx512bf16-error.c (revision e62175736551abf40a3410bc246f58e650eb8158)
1 // RUN: %clang_cc1 -fsyntax-only -verify -ffreestanding -triple x86_64-linux-pc %s
2 
3 // expected-error@+1 3 {{unknown type name '__bfloat16'}}
foo(__bfloat16 a,__bfloat16 b)4 __bfloat16 foo(__bfloat16 a, __bfloat16 b) {
5   return a + b;
6 }
7 
8 #include <immintrin.h>
9 
10 // expected-warning@+2 3 {{'__bfloat16' is deprecated: use __bf16 instead}}
11 // expected-note@* 3 {{'__bfloat16' has been explicitly marked deprecated here}}
bar(__bfloat16 a,__bfloat16 b)12 __bfloat16 bar(__bfloat16 a, __bfloat16 b) {
13   return a + b;
14 }
15