1  /* { dg-do run } */
       2  /* { dg-options "-mno-sse2 -mno-popcnt -mno-avx" } */
       3  
       4  
       5  __attribute__((always_inline,target("avx2")))
       6  __inline int c1 ()
       7  {
       8    return 0;
       9  }
      10  
      11  __attribute__((always_inline,target("avx")))
      12  __inline int c2 ()
      13  {
      14    return 0;
      15  }
      16  
      17  __attribute__((always_inline,target("popcnt")))
      18  __inline int c3 ()
      19  {
      20    return 0;
      21  }
      22  
      23  __attribute__((always_inline,target("sse4.2")))
      24  __inline int c4 ()
      25  {
      26    return 0;
      27  }
      28  
      29  __attribute__((always_inline,target("sse4.1")))
      30  __inline int c5 ()
      31  {
      32    return 0;
      33  }
      34  
      35  __attribute__((always_inline,target("ssse3")))
      36  __inline int c6 ()
      37  {
      38    return 0;
      39  }
      40  
      41  __attribute__((always_inline,target("sse3")))
      42  __inline int c7 ()
      43  {
      44    return 0;
      45  }
      46  
      47  __attribute__((always_inline,target("sse2")))
      48  __inline int c8 ()
      49  {
      50    return 0;
      51  }
      52  
      53  int nop ()
      54  {
      55    return 1;
      56  }
      57  
      58  #pragma GCC push_options
      59  #pragma GCC target("sse2")
      60  int C8 ()
      61  {
      62    return c8 ();
      63  }
      64  #pragma GCC pop_options
      65  
      66  
      67  #pragma GCC push_options
      68  #pragma GCC target("sse3")
      69  int C7 ()
      70  {
      71    return c7 ();
      72  }
      73  #pragma GCC pop_options
      74  
      75  
      76  #pragma GCC push_options
      77  #pragma GCC target("ssse3")
      78  int C6 ()
      79  {
      80    return c6 ();
      81  }
      82  #pragma GCC pop_options
      83  
      84  
      85  #pragma GCC push_options
      86  #pragma GCC target("sse4.1")
      87  int C5 ()
      88  {
      89    return c5 ();
      90  }
      91  #pragma GCC pop_options
      92  
      93  
      94  #pragma GCC push_options
      95  #pragma GCC target("sse4.2")
      96  int C4 ()
      97  {
      98    return c4 ();
      99  }
     100  #pragma GCC pop_options
     101  
     102  
     103  #pragma GCC push_options
     104  #pragma GCC target("popcnt")
     105  int C3 ()
     106  {
     107    return c3 ();
     108  }
     109  #pragma GCC pop_options
     110  
     111  
     112  #pragma GCC push_options
     113  #pragma GCC target("avx")
     114  int C2 ()
     115  {
     116    return c2 ();
     117  }
     118  #pragma GCC pop_options
     119  
     120  
     121  #pragma GCC push_options
     122  #pragma GCC target("avx2")
     123  int C1 ()
     124  {
     125    return c1 ();
     126  }
     127  #pragma GCC pop_options
     128  
     129  int main ()
     130  {
     131    return C1 () + C2 () + C3 () + C4 () + C5 () + C6 () + C7 () + C8 ();
     132  }