https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101017
Hongtao Liu <liuhongt at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |haochen.jiang at intel dot com --- Comment #7 from Hongtao Liu <liuhongt at gcc dot gnu.org> --- > For arch=core-avx2, function returns in reg(cfun->returns_struct), but for > "default" and resolver function, it returns in memory(cfun->returns_struct > == 1) > > The mismatch between resolver and dispatched function caused the ICE. similar issue for #include <immintrin.h> __attribute__((target_clones ("avx512f", "default"))) __m512d foo(__m512d a, __m512d b) { c = a + b; } with -O2, under avx512f, it returns in reg, by default it returns in memory.