Fix gcc.dg/tree-ssa/pr59597.c failure for avr
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
This commit is contained in:
parent
656b031126
commit
ddefad9a08
@ -1,3 +1,8 @@
|
||||
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
|
||||
|
@ -4,6 +4,8 @@
|
||||
typedef unsigned short u16;
|
||||
typedef unsigned char u8;
|
||||
typedef unsigned int u32;
|
||||
__extension__ typedef __INT32_TYPE__ i32;
|
||||
|
||||
long int random(int);
|
||||
#define NNN 10
|
||||
|
||||
@ -37,7 +39,7 @@ Calc_crc8 (u8 data, u16 crc)
|
||||
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++)
|
||||
|
Loading…
Reference in New Issue
Block a user