1 /* Same as x86gprintrin-3.c, except converted to use #pragma GCC option.  */
2 /* { dg-do compile } */
3 /* { dg-options "-O0 -Werror-implicit-function-declaration -march=x86-64 -mno-sse -mno-mmx" } */
4 /* { dg-add-options bind_pic_locally } */
5 
6 /* Test that the intrinsics in <x86gprintrin.h> compile without optimization.
7    All of them are defined as inline functions that reference the proper
8    builtin functions.
9 
10    Defining away "extern" and "__inline" results in all of them being
11    compiled as proper functions.  */
12 
13 #define extern
14 #define __inline
15 
16 #ifndef DIFFERENT_PRAGMAS
17 #ifdef __x86_64__
18 #pragma GCC target ("adx,bmi,bmi2,fsgsbase,fxsr,hreset,lwp,lzcnt,popcnt,rdrnd,rdseed,tbm,rtm,serialize,tsxldtrk,uintr,xsaveopt")
19 #else
20 #pragma GCC target ("adx,bmi,bmi2,fsgsbase,fxsr,hreset,lwp,lzcnt,popcnt,rdrnd,rdseed,tbm,rtm,serialize,tsxldtrk,xsaveopt")
21 #endif
22 #endif
23 
24 /* popcnintrin.h (POPCNT).  */
25 #ifdef DIFFERENT_PRAGMAS
26 #pragma GCC target ("popcnt")
27 #endif
28 #include <popcntintrin.h>
29 
30 /* x86intrin.h (LWP/BMI/BMI2/TBM/LZCNT). */
31 #ifdef DIFFERENT_PRAGMAS
32 #pragma GCC target ("lwp,bmi,bmi2,tbm,lzcnt")
33 #endif
34 #include <x86gprintrin.h>
35