1 /* Test case to check if Multiversioning works. */
2 /* { dg-do run { target i?86-*-* x86_64-*-* } } */
3 /* { dg-require-ifunc "" } */
4 /* { dg-options "-O2 -fPIC -march=x86-64" } */
9 int foo (); // Extra declaration that is merged with the second one.
10 int foo () __attribute__ ((target("default")));
12 int foo () __attribute__ ((target("arch=corei7")));
18 assert (val == (*p)());
20 /* Check in the exact same order in which the dispatching
21 is expected to happen. */
22 if (__builtin_cpu_is ("corei7"))
30 int __attribute__ ((target("default")))
36 int __attribute__ ((target("arch=corei7")))