Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/gcc.c-torture/execute/floatunsisf-1.c @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
line wrap: on
line source
/* The fp-bit.c function __floatunsisf had a latent bug where guard bits could be lost leading to incorrect rounding. */ /* Origin: Joseph Myers <joseph@codesourcery.com> */ extern void abort (void); extern void exit (int); #if __INT_MAX__ >= 0x7fffffff volatile unsigned u = 0x80000081; #else volatile unsigned long u = 0x80000081; #endif volatile float f1, f2; int main (void) { f1 = (float) u; f2 = (float) 0x80000081; if (f1 != f2) abort (); exit (0); }