aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorSenthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>2017-05-09 09:59:25 +0000
committerSenthil Kumar Selvaraj <saaadhu@gcc.gnu.org>2017-05-09 09:59:25 +0000
commitfd71825b428daa5f466c8e3a26dbeace303e08f8 (patch)
treed602a2e5ba54445ec8c8e7b9de6e7b59b3020080 /gcc
parent39032dee86e21245131591df3d876f114a1768c6 (diff)
downloadgcc-fd71825b428daa5f466c8e3a26dbeace303e08f8.zip
gcc-fd71825b428daa5f466c8e3a26dbeace303e08f8.tar.gz
gcc-fd71825b428daa5f466c8e3a26dbeace303e08f8.tar.bz2
Fix broken cunroll-13.c for avr target
The test reports bogus failures because the loop variable i is declared as int, and the constant expected in the dump doesn't fit in an int for avr. Fixed by explicitly using __INT32_TYPE__ for targets with __SIZEOF_INT__ < 4. gcc/testsuite/ 2017-05-09 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com> * gcc.dg/tree-ssa/cunroll-13.c: Use __INT32_TYPE__ for for targets with __SIZEOF_INT__ < 4. From-SVN: r247782
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/cunroll-13.c9
2 files changed, 13 insertions, 1 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 0207d9f..af1e6de 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2017-05-09 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
+
+ * gcc.dg/tree-ssa/cunroll-13.c: Use __INT32_TYPE__ for
+ for targets with __SIZEOF_INT__ < 4.
+
2017-05-09 Richard Biener <rguenther@suse.de>
* gcc.dg/vect/vect-50.c: Revert last change.
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/cunroll-13.c b/gcc/testsuite/gcc.dg/tree-ssa/cunroll-13.c
index f3fe8b5..904e6dc 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/cunroll-13.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/cunroll-13.c
@@ -1,10 +1,17 @@
/* { dg-do compile } */
/* { dg-options "-O3 -fdisable-tree-evrp -fdisable-tree-cunrolli -fdisable-tree-vrp1 -fdump-tree-cunroll-blocks-details" } */
+
+#if __SIZEOF_INT__ < 4
+__extension__ typedef __INT32_TYPE__ i32;
+#else
+typedef int i32;
+#endif
+
struct a {int a[8];int b;};
void
t(struct a *a)
{
- for (int i=0;i<123456 && a->a[i];i++)
+ for (i32 i=0;i<123456 && a->a[i];i++)
a->a[i]++;
}
/* This pass relies on the fact that we do not eliminate the redundant test for i early.