Imported Upstream version 4.8.1
[platform/upstream/gcc48.git] / gcc / testsuite / g++.dg / ext / mv12.C
1 // Test case to check if multiversioning works as expected when the versions
2 // are defined in different files.
3
4 // { dg-do run { target i?86-*-* x86_64-*-* } }
5 // { dg-require-ifunc "" }
6 // { dg-options "-O2" }
7 // { dg-additional-sources "mv12-aux.cc" }
8
9 #include "mv12.h"
10
11 int main ()
12 {
13   if (__builtin_cpu_supports ("sse4.2"))
14     return foo () - 1;
15   return foo ();
16 }
17
18 __attribute__ ((target ("default")))
19 int foo ()
20 {
21   return 0;
22 }