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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [20020720-1.c] - Rev 688

Compare with Previous | Blame | View Log

/* Copyright (C) 2002  Free Software Foundation.
 
   Ensure that fabs(x) < 0.0 optimization is working.
 
   Written by Roger Sayle, 20th July 2002.  */
 
extern void abort (void);
extern double fabs (double);
extern void link_error (void);
 
void
foo (double x)
{
  double p, q;
 
  p = fabs (x);
  q = 0.0;
  if (p < q)
    link_error ();
}
 
int
main()
{
  foo (1.0);
  return 0;
}
 
#ifndef __OPTIMIZE__
void
link_error ()
{
  abort ();
}
#endif
 
 

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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