Hi Jeff,
I'd tend to prefer to change the size of the array -- adding another
conditional in the loop may have unintended consequences that possibly
scramble things just enough to compromise the test.
Okey dokey, here is a revised version. Is this one OK ?
Cheers
Nick
gcc/ChangeLog
Index: 2015-06-22 Nick Clifton <ni...@redhat.com>
* gcc.dg/graphite/isl-ast-gen-if.c (main): Increase size of a
array to allow a[50] to be a valid location.
gcc/testsuite/gcc.dg/graphite/isl-ast-gen-if-1.c
===================================================================
--- gcc/testsuite/gcc.dg/graphite/isl-ast-gen-if-1.c (revision 224722)
+++ gcc/testsuite/gcc.dg/graphite/isl-ast-gen-if-1.c (working copy)
@@ -28,7 +28,7 @@
int
main (void)
{
- int a[50];
+ int a[51]; /* NB This size allows foo's first iteration to write to
a[50]. */
foo (a, 50);
int res = array_sum (a);
if (res != 49)