summaryrefslogtreecommitdiff
path: root/support/regression/tests/bug-3745.c
blob: 72cfc67da8ca5218ed713eec0464bffdb001f7a0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/* bug-3711.c
   A bug in compile-time conversion of large floating-point constants, on host systems with a 32-bit long.
*/

#include <stdint.h>

#include <testfwk.h>

const uint64_t f=1e18; // floating-point constant converted to unsigned integer.
uint64_t i=1000000000000000000;

void
testBug (void)
{
  ASSERT (i * 2 >= f && f >= i / 2);
}