clang/test/CodeGen/X86/avx512bf16-error.c
raw| 1 | // RUN: %clang_cc1 -fsyntax-only -verify -ffreestanding -triple x86_64-linux-pc %s |
| 2 | |
| 3 | // expected-error@+1 3 {{unknown type name '__bfloat16'}} |
| 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}} |
| 12 | __bfloat16 bar(__bfloat16 a, __bfloat16 b) { |
| 13 | return a + b; |
| 14 | } |