blob: a7721e0430d95c4856b10fc5749d8a9d1a7df71d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
/*
bug-2254.c a bug in compile-time evaluation of integer constant division.
*/
#include <testfwk.h>
void testBug(void)
{
#if !defined( __SDCC_pdk14) && !defined( __SDCC_pdk15) // Not enough RAM
unsigned n = 5;
volatile unsigned n2 = 5;
volatile unsigned i = (unsigned) ( n / 2.5 );
ASSERT(n2 / 2.5 == i);
#endif
}
|