Message ID | BF230D13CA30DD48930C31D4099330003A43B6DD@FMSMSX101.amr.corp.intel.com |
---|---|
State | New |
Headers | show |
On Wed, 26 Jun 2013, Iyer, Balaji V wrote: > Hello Everyone, > This patch will fix a FAIL in one of the test cases for array notations. The reason for fail is that the array sizes were huge and thus it was causing a stack overflow. This patch should fix the issue. I am committing this patch as semi-obvious. I am willing to revert this change if anyone has objections. > > 2013-06-25 Balaji V. Iyer <balaji.v.iyer@intel.com> > > * c-c++-common/cilk-plus/AN/gather_scatter.c: Fixed a bug of stack > overflow due to size of arrays. It looks like this is the same situation as PR57766. (You're already CC:ed on it. Is your @gcc.gnu.org email address correctly redirected?) brgds, H-P
> -----Original Message----- > From: Hans-Peter Nilsson [mailto:hp@bitrange.com] > Sent: Tuesday, July 02, 2013 7:24 PM > To: Iyer, Balaji V > Cc: gcc-patches@gcc.gnu.org > Subject: Re: [PATCH] Fix for PR 57692 > > On Wed, 26 Jun 2013, Iyer, Balaji V wrote: > > Hello Everyone, > > This patch will fix a FAIL in one of the test cases for array notations. The > reason for fail is that the array sizes were huge and thus it was causing a stack > overflow. This patch should fix the issue. I am committing this patch as semi- > obvious. I am willing to revert this change if anyone has objections. > > > > 2013-06-25 Balaji V. Iyer <balaji.v.iyer@intel.com> > > > > * c-c++-common/cilk-plus/AN/gather_scatter.c: Fixed a bug of stack > > overflow due to size of arrays. > > It looks like this is the same situation as PR57766. > (You're already CC:ed on it. Is your @gcc.gnu.org email address correctly > redirected?) Hi Hans, I am getting those emails and am fixing them and submitting patches to gcc-patches. The fix was similar, but it was occurring in different testsuite case. Also, it was not occurring any of the machines I use to develop and so I didn't see the similarity between them. Thanks, Balaji V. Iyer. > > brgds, H-P
Index: gcc/testsuite/c-c++-common/cilk-plus/AN/gather_scatter.c =================================================================== --- gcc/testsuite/c-c++-common/cilk-plus/AN/gather_scatter.c (revision 200413) +++ gcc/testsuite/c-c++-common/cilk-plus/AN/gather_scatter.c (working copy) @@ -1,16 +1,16 @@ /* { dg-do run } */ /* { dg-options "-fcilkplus" } */ -#define NUMBER 100 +#define NUMBER 20 #if HAVE_IO #include <stdio.h> #endif +float array4[NUMBER][NUMBER][NUMBER][NUMBER]; int main(void) { int array[NUMBER][NUMBER], array2[NUMBER], array3[NUMBER], x = 0, y; - int x_correct, y_correct, ii, jj = 0; - float array4[NUMBER][NUMBER][NUMBER][NUMBER]; + int x_correct, y_correct, ii, jj = 0, kk = 0, ll = 0; for (ii = 0; ii < NUMBER; ii++) { for (jj = 0; jj < NUMBER; jj++)