Skip to content
Snippets Groups Projects
Commit 59c82332 authored by liuhongt's avatar liuhongt
Browse files

Issue a warning for conversion between short and __bf16 under TARGET_AVX512BF16.

__bfloat16 is redefined from typedef short to real __bf16 since GCC
V13. The patch issues an warning for potential silent implicit
conversion between __bf16 and short where users may only expect a
data movement.

To avoid too many false positive, warning is only under
TARGET_AVX512BF16.

gcc/ChangeLog:

	* config/i386/i386.cc (ix86_invalid_conversion): New function.
	(TARGET_INVALID_CONVERSION): Define as
	ix86_invalid_conversion.

gcc/testsuite/ChangeLog:

	* gcc.target/i386/bf16_short_warn.c: New test.
parent 74ae9709
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment