float-floor.c: New.

2005-10-05  Dale Johannesen  <dalej@apple.com>

        * gcc.c-torture/execute/float-floor.c:  New.

From-SVN: r105004
This commit is contained in:
Dale Johannesen 2005-10-05 17:28:50 +00:00 committed by Dale Johannesen
parent db38c6bb93
commit 8acdc22e8e
2 changed files with 19 additions and 0 deletions

View file

@ -1,3 +1,7 @@
2005-10-05 Dale Johannesen <dalej@apple.com>
* gcc.c-torture/execute/float-floor.c: New.
2005-10-05 Paolo Bonzini <bonzini@gnu.org>
PR tree-optimization/21419

View file

@ -0,0 +1,15 @@
double d = 1024.0 - 1.0 / 32768.0;
extern double floor(double);
extern float floorf(float);
extern void abort();
int main() {
double df = floor(d);
float f1 = (float)floor(d);
if ((int)df != 1023 || (int)f1 != 1023)
abort ();
return 0;
}