mirror of
https://github.com/nArnoSNES/tcc-65816.git
synced 2024-06-12 13:29:29 +00:00
37 lines
445 B
C
37 lines
445 B
C
/* 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
|
|
|