This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: RFA: Fix isl-ast-gen-if-1.c test
- From: Nicholas Clifton <nickc at redhat dot com>
- To: Jeff Law <law at redhat dot com>, gcc-patches at gcc dot gnu dot org
- Date: Mon, 22 Jun 2015 17:07:29 +0100
- Subject: Re: RFA: Fix isl-ast-gen-if-1.c test
- Authentication-results: sourceware.org; auth=none
- References: <87r3p3sqh6 dot fsf at redhat dot com> <55882C9C dot 9060405 at redhat dot com>
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 <nickc@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)