Declare loop index variable j as a 32 bit int instead of assuming ints
are 32 bits. The smaller int size on the avr makes prior passes optimize
away the loop exit check (j <
10000000), as the constant is outside
the range of a 16 bit int.
gcc/testsuite/ChangeLog
2016-10-11 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
* gcc.dg/tree-ssa/pr59597.c: Typedef __INT32_TYPE__ to i32.
(main): Declare j as i32 instead of int.
From-SVN: r240986
+2016-10-11 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
+
+ * gcc.dg/tree-ssa/pr59597.c: Typedef __INT32_TYPE__ to i32.
+ (main): Declare j as i32 instead of int.
+
2016-10-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
PR testsuite/PR77710
typedef unsigned short u16;
typedef unsigned char u8;
typedef unsigned int u32;
+__extension__ typedef __INT32_TYPE__ i32;
+
long int random(int);
#define NNN 10
int
main (int argc, char argv[])
{
- int i, j; u16 crc;
+ int i; i32 j; u16 crc;
for (j = 0; j < 10000000; j++)
{
for (i = 0; i < NNN; i++)