1  /* { dg-do run } */
       2  /* { dg-require-effective-target lp64 } */
       3  /* { dg-options "-O2 -mtune=nocona" } */
       4  
       5  double x;
       6  
       7  void
       8  __attribute__ ((noinline, noclone))
       9  test_fabs (double a)
      10  {
      11    asm volatile ("" : "+r" (a));
      12    x = __builtin_fabs (a);
      13  }
      14  
      15  void
      16  __attribute__ ((noinline, noclone))
      17  test_neg (double a)
      18  {
      19    asm volatile ("" : "+r" (a));
      20    x = -a;
      21  }
      22  
      23  int main ()
      24  {
      25    test_fabs (-1.0);
      26  
      27    if (x != 1.0)
      28      __builtin_abort ();
      29  
      30    test_neg (-1.0);
      31  
      32    if (x != 1.0)
      33      __builtin_abort ();
      34  
      35    return 0;
      36  }