OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [gcc.target/] [i386/] [excess-precision-2.c] - Diff between revs 318 and 338

Only display areas with differences | Details | Blame | View Log

Rev 318 Rev 338
/* Excess precision tests.  Test excess precision of constants.  */
/* Excess precision tests.  Test excess precision of constants.  */
/* { dg-do run } */
/* { dg-do run } */
/* { dg-options "-O2 -mfpmath=387 -fexcess-precision=standard" } */
/* { dg-options "-O2 -mfpmath=387 -fexcess-precision=standard" } */
 
 
#include <float.h>
#include <float.h>
 
 
extern void abort (void);
extern void abort (void);
extern void exit (int);
extern void exit (int);
 
 
volatile long double ldadd1 = 1.0l + 0x1.0p-30l;
volatile long double ldadd1 = 1.0l + 0x1.0p-30l;
volatile long double ld11f = 1.1f;
volatile long double ld11f = 1.1f;
volatile long double ld11d = 1.1;
volatile long double ld11d = 1.1;
volatile long double ld11 = 1.1;
volatile long double ld11 = 1.1;
 
 
void
void
test_const (void)
test_const (void)
{
{
  if (1.0f + 0x1.0p-30f != ldadd1)
  if (1.0f + 0x1.0p-30f != ldadd1)
    abort ();
    abort ();
  if (ld11f != ld11)
  if (ld11f != ld11)
    abort ();
    abort ();
  if (ld11d != ld11)
  if (ld11d != ld11)
    abort ();
    abort ();
  if (1.1f != ld11)
  if (1.1f != ld11)
    abort ();
    abort ();
}
}
 
 
int
int
main (void)
main (void)
{
{
  test_const ();
  test_const ();
  exit (0);
  exit (0);
}
}
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.