aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/pr107490.c
blob: 87c7f0aacdd3a8c483221d28f06481f2dc5613c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// { dg-do compile }
// { dg-options "-Os -fno-trapping-math -w" }

extern void abort (void);

#define MIN2(a,b) (((a)<(b)) ? (a) : (b))
#define MAX2(a,b) (((a)>(b)) ? (a) : (b))

double p[2] = { 4.f, 5.f };

int main()
{
  long j;
  double R, n, x;
  n = 1.e300f;
  x = -1.e300f;
  for( j=0; j < 2; j++ )
    {
      x = MAX2(x,p[j]);
      n = MIN2(n,p[j]);
    }
  R = x-n;

  if( R < 0.1 )
      abort ();

  return 0;
}