struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / bug-3745.c.in
blobd12bdd91db8e38cc2860773437bc66dcd42da8dd
1 /* bug-3745.c
2 A bug in compile-time conversion of large floating-point constants, on host systems with a 32-bit long.
4 qual: const, volatile, const volatile,
5 */
7 #include <stdint.h>
9 #include <testfwk.h>
11 // floating-point constant converted to unsigned integer.
12 {qual} uint64_t f=1e18;
14 // integer constant
15 {qual} uint64_t i=1000000000000000000;
17 void
18 testBug (void)
20 ASSERT (i * 2 >= f && f >= i / 2);