* [testsuite] fix loop index for gcc.dg/webizer.c
@ 2013-01-15 21:55 Janis Johnson
2013-01-15 22:02 ` Jeff Law
0 siblings, 1 reply; 4+ messages in thread
From: Janis Johnson @ 2013-01-15 21:55 UTC (permalink / raw)
To: gcc-patches
[-- Attachment #1: Type: text/plain, Size: 279 bytes --]
Execution of test gcc.dg/webizer.c fails with a segfault for
powerpc-eabi with the GNU simulator. The test has an array of size 2
and accesses that array with indices of 1 and 2. This patch fixes the
bounds of the loop index.
Tested on powerpc-none-eabi; OK for trunk?
Janis
[-- Attachment #2: gcc-20130115-2 --]
[-- Type: text/plain, Size: 506 bytes --]
2013-01-15 Janis Johnson <janisjo@codesourcery.com>
* gcc.dg/webizer.c: Adjust loop variable.
Index: testsuite/gcc.dg/webizer.c
===================================================================
--- testsuite/gcc.dg/webizer.c (revision 195216)
+++ testsuite/gcc.dg/webizer.c (working copy)
@@ -21,7 +21,7 @@
configure2()
{
block = 0 ;
- for( row = 1 ; row <= numRows ; row++ ) {
+ for( row = 0 ; row < numRows ; row++ ) {
block++ ;
if( rowArray[row].endx1 > 0 ) {
block++ ;
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [testsuite] fix loop index for gcc.dg/webizer.c
2013-01-15 21:55 [testsuite] fix loop index for gcc.dg/webizer.c Janis Johnson
@ 2013-01-15 22:02 ` Jeff Law
2013-01-15 22:06 ` Janis Johnson
0 siblings, 1 reply; 4+ messages in thread
From: Jeff Law @ 2013-01-15 22:02 UTC (permalink / raw)
To: janisjo; +Cc: Janis Johnson, gcc-patches
On 01/15/2013 02:57 PM, Janis Johnson wrote:
> Execution of test gcc.dg/webizer.c fails with a segfault for
> powerpc-eabi with the GNU simulator. The test has an array of size 2
> and accesses that array with indices of 1 and 2. This patch fixes the
> bounds of the loop index.
>
> Tested on powerpc-none-eabi; OK for trunk?
Based on:
http://gcc.gnu.org/ml/gcc-patches/2012-10/msg01259.html
I think the the loop variables are fairly important. I think we're less
likely to perturb the test by increasing the size of the array.
Jeff
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [testsuite] fix loop index for gcc.dg/webizer.c
2013-01-15 22:02 ` Jeff Law
@ 2013-01-15 22:06 ` Janis Johnson
2013-01-15 22:16 ` Jeff Law
0 siblings, 1 reply; 4+ messages in thread
From: Janis Johnson @ 2013-01-15 22:06 UTC (permalink / raw)
To: Jeff Law; +Cc: janisjo, gcc-patches
On 01/15/2013 02:01 PM, Jeff Law wrote:
> On 01/15/2013 02:57 PM, Janis Johnson wrote:
>> Execution of test gcc.dg/webizer.c fails with a segfault for
>> powerpc-eabi with the GNU simulator. The test has an array of size 2
>> and accesses that array with indices of 1 and 2. This patch fixes the
>> bounds of the loop index.
>>
>> Tested on powerpc-none-eabi; OK for trunk?
> Based on:
>
>
> http://gcc.gnu.org/ml/gcc-patches/2012-10/msg01259.html
>
> I think the the loop variables are fairly important. I think we're less
> likely to perturb the test by increasing the size of the array.
>
> Jeff
Increasing the size of the array to 3 works. OK to do that?
Janis
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [testsuite] fix loop index for gcc.dg/webizer.c
2013-01-15 22:06 ` Janis Johnson
@ 2013-01-15 22:16 ` Jeff Law
0 siblings, 0 replies; 4+ messages in thread
From: Jeff Law @ 2013-01-15 22:16 UTC (permalink / raw)
To: janisjo; +Cc: Janis Johnson, gcc-patches
On 01/15/2013 03:08 PM, Janis Johnson wrote:
> On 01/15/2013 02:01 PM, Jeff Law wrote:
>> On 01/15/2013 02:57 PM, Janis Johnson wrote:
>>> Execution of test gcc.dg/webizer.c fails with a segfault for
>>> powerpc-eabi with the GNU simulator. The test has an array of size 2
>>> and accesses that array with indices of 1 and 2. This patch fixes the
>>> bounds of the loop index.
>>>
>>> Tested on powerpc-none-eabi; OK for trunk?
>> Based on:
>>
>>
>> http://gcc.gnu.org/ml/gcc-patches/2012-10/msg01259.html
>>
>> I think the the loop variables are fairly important. I think we're less
>> likely to perturb the test by increasing the size of the array.
>>
>> Jeff
>
> Increasing the size of the array to 3 works. OK to do that?
Yes. That sounds good. Please install.
jeff
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-01-15 22:16 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-15 21:55 [testsuite] fix loop index for gcc.dg/webizer.c Janis Johnson
2013-01-15 22:02 ` Jeff Law
2013-01-15 22:06 ` Janis Johnson
2013-01-15 22:16 ` Jeff Law
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).