struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / bug-2254.c
bloba7721e0430d95c4856b10fc5749d8a9d1a7df71d
1 /*
2 bug-2254.c a bug in compile-time evaluation of integer constant division.
3 */
5 #include <testfwk.h>
7 void testBug(void)
9 #if !defined( __SDCC_pdk14) && !defined( __SDCC_pdk15) // Not enough RAM
10 unsigned n = 5;
11 volatile unsigned n2 = 5;
12 volatile unsigned i = (unsigned) ( n / 2.5 );
13 ASSERT(n2 / 2.5 == i);
14 #endif