http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59601
--- Comment #2 from Uroš Bizjak <ubizjak at gmail dot com> --- (In reply to Uroš Bizjak from comment #1) > mv1.C failure migh be a testcase problem. However, the testcase works for me > on ivybridge, which is also corei7 arch with popcnt. It also fails for me if I remove avx alternative. Looks like a bug, indeed. Following test doesn't work on ivbridge (a corei7 cpu): --cut here-- #include <assert.h> /* Default version. */ int foo (); // Extra declaration that is merged with the second one. int foo () __attribute__ ((target("default"))); int foo () __attribute__ ((target("arch=corei7"))); int (*p)() = &foo; int main () { int val = foo (); assert (val == (*p)()); /* Check in the exact same order in which the dispatching is expected to happen. */ if (__builtin_cpu_is ("corei7")) assert (val == 5); else assert (val == 0); return 0; } int __attribute__ ((target("default"))) foo () { return 0; } int __attribute__ ((target("arch=corei7"))) foo () { return 5; } --cut here-- It looks to me that dispatcher doesn't call corei7 version, while __builtin_cpu_is works OK.