summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr43419.c
blob: a4306f04855e0e3c3b1746deb5e43b5334f4a02d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* { dg-do run } */
/* { dg-options "-O1" } */
/* { dg-add-options ieee } */
#include <math.h>

extern void abort (void);
void __attribute__((noinline)) f (double x)
{
  double pluszero = pow (x, 0.5);
  double minuszero = sqrt (x);
  if (signbit (pluszero) == signbit (minuszero))
    abort ();
}

int main(void)
{
  f (-0.0);
  return 0;
}