Commit 4ae35e69 by Senthil Kumar Selvaraj Committed by Senthil Kumar Selvaraj

Fix bogus pr64277.c failure for avr

The smaller int size for the avr target breaks the test's
expectation on the number of iterations. The failure goes
away if 32 bit ints are used in place of a plain int.

Fix by conditionally typedef int32_t to __INT32_TYPE__ for targets
with int size < 4,  and then use int32_t everywhere.

gcc/testsuite
016-11-25  Senthil Kumar Selvaraj  <senthil_kumar.selvaraj@atmel.com>

	* gcc.dg/pr64277.c: Use __INT32_TYPE__ for targets
	with sizeof(int) < 4.

From-SVN: r242859
parent 2131e489
2016-11-25 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
* gcc.dg/pr64277.c: Use __INT32_TYPE__ for targets
with sizeof(int) < 4.
2016-11-24 Martin Sebor <msebor@redhat.com>
PR tree-optimization/78476
......
......@@ -4,17 +4,23 @@
/* { dg-final { scan-tree-dump "loop with 5 iterations completely unrolled" "cunroll" } } */
/* { dg-final { scan-tree-dump "loop with 6 iterations completely unrolled" "cunroll" } } */
int f1[10];
#if __SIZEOF_INT__ < 4
__extension__ typedef __INT32_TYPE__ int32_t;
#else
typedef int int32_t;
#endif
int32_t f1[10];
void test1 (short a[], short m, unsigned short l)
{
int i = l;
int32_t i = l;
for (i = i + 5; i < m; i++)
f1[i] = a[i]++;
}
void test2 (short a[], short m, short l)
{
int i;
int32_t i;
if (m > 5)
m = 5;
for (i = m; i > l; i--)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment