https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111889

--- Comment #5 from Haochen Jiang <haochen.jiang at intel dot com> ---
It is actually a legacy issue from this:

$ cat 2.c
#include <immintrin.h>


__attribute__ ((target ("no-avx2")))
void foo ()
{
    return _mm_empty ();
}

$ x86_64-pc-linux-gnu-gcc -O2 -mavx512f 2.c

It will also fail.

The main reason is caused by caller's target is higher than callee's.

Previously it will not cause problem since we consider it makes sense and
nobody will write code in such pattern.

But we will introduce avx10.x-256/512 options and function attributes in near
future, the problem might become visible.

Reply via email to