public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Fix size of static array in gcc.dg/vect/vect-simd-20.c
@ 2021-11-03 14:54 Olivier Hainque
  2021-12-17 11:21 ` [PING] " Olivier Hainque
  0 siblings, 1 reply; 4+ messages in thread
From: Olivier Hainque @ 2021-11-03 14:54 UTC (permalink / raw)
  To: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 735 bytes --]

Hello,

This fixes the definition of the "p" static array in
gcc.dg/vect/vect-simd-20.c to accommodate the number of
strides performed by foo() for s == 78, which will be
129 and not 128 since 10000 / 78 > 128.

This fixes a failure of the test we first observed in-house
on a x86_64-elf run, where the first call to foo() was clobbering
part of a static object we provide to __register_frame_info,
causing an abort() from __deregister_frame_info at termination time.

Ok to commit?

Thanks in advance,

With Kind Regards,

Olivier


2021-11-02  Olivier Hainque  <hainque@adacore.com>

testsuite/
    
	* gcc.dg/vect/vect-simd-20.c: Fix size of p[]
        to accommodate the number of strides performed
        by foo() for s == 78.


[-- Attachment #2: simd-20.diff --]
[-- Type: application/octet-stream, Size: 975 bytes --]

    Fix static array size in gcc.dg/vect/vect-simd-20.c
    
    10000 / 78 is a strictly greater than 128 so we will
    actually do 128+1 strides in foo() for s == 78 and p[]
    needs to be dimensioned accordingly.
    
    2021-11-02  Olivier Hainque  <hainque@adacore.com>
    
            * gcc.dg/vect/vect-simd-20.c: Fix size of p[]
            to accommodate the number of strides performed
            by foo() for s == 78.

diff --git a/gcc/testsuite/gcc.dg/vect/vect-simd-20.c b/gcc/testsuite/gcc.dg/vect/vect-simd-20.c
index c85f05f61c6..8d8d8378484 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-simd-20.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-simd-20.c
@@ -18,7 +18,10 @@ foo (int s, int m, int n, int *p)
   return r;
 }
 
-int p[10000 / 78 * 7];
+/* Dimension this static array in accordance with the maximum number
+   of inner strides we might do in foo().  This will be for s == 78,
+   and 10000 % 78 > 0.  */
+int p[((10000 / 78) + 1) * 7];
 
 int
 main ()

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PING] Fix size of static array in gcc.dg/vect/vect-simd-20.c
  2021-11-03 14:54 Fix size of static array in gcc.dg/vect/vect-simd-20.c Olivier Hainque
@ 2021-12-17 11:21 ` Olivier Hainque
  2021-12-20 15:32   ` Jeff Law
  0 siblings, 1 reply; 4+ messages in thread
From: Olivier Hainque @ 2021-12-17 11:21 UTC (permalink / raw)
  To: gcc-patches; +Cc: Olivier Hainque, jakub

Hello,

Ping for https://gcc.gnu.org/pipermail/gcc-patches/2021-November/583222.html

please ?

Thanks in advance!

With Kind Regards,

Olivier

> On 3 Nov 2021, at 15:54, Olivier Hainque <hainque@adacore.com> wrote:
> 
> Hello,
> 
> This fixes the definition of the "p" static array in
> gcc.dg/vect/vect-simd-20.c to accommodate the number of
> strides performed by foo() for s == 78, which will be
> 129 and not 128 since 10000 / 78 > 128.
> 
> This fixes a failure of the test we first observed in-house
> on a x86_64-elf run, where the first call to foo() was clobbering
> part of a static object we provide to __register_frame_info,
> causing an abort() from __deregister_frame_info at termination time.
> 
> Ok to commit?
> 
> Thanks in advance,
> 
> With Kind Regards,
> 
> Olivier
> 
> 
> 2021-11-02  Olivier Hainque  <hainque@adacore.com>
> 
> testsuite/
> 
> 	* gcc.dg/vect/vect-simd-20.c: Fix size of p[]
>        to accommodate the number of strides performed
>        by foo() for s == 78.
> 
> <simd-20.diff>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PING] Fix size of static array in gcc.dg/vect/vect-simd-20.c
  2021-12-17 11:21 ` [PING] " Olivier Hainque
@ 2021-12-20 15:32   ` Jeff Law
  2021-12-20 16:10     ` Olivier Hainque
  0 siblings, 1 reply; 4+ messages in thread
From: Jeff Law @ 2021-12-20 15:32 UTC (permalink / raw)
  To: Olivier Hainque, gcc-patches; +Cc: jakub



On 12/17/2021 4:21 AM, Olivier Hainque via Gcc-patches wrote:
> Hello,
>
> Ping for https://gcc.gnu.org/pipermail/gcc-patches/2021-November/583222.html
>
> please ?
>
> Thanks in advance!
OK for the trunk.  Sorry it got lost.

jeff


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PING] Fix size of static array in gcc.dg/vect/vect-simd-20.c
  2021-12-20 15:32   ` Jeff Law
@ 2021-12-20 16:10     ` Olivier Hainque
  0 siblings, 0 replies; 4+ messages in thread
From: Olivier Hainque @ 2021-12-20 16:10 UTC (permalink / raw)
  To: Jeff Law; +Cc: Olivier Hainque, gcc-patches, jakub



> On 20 Dec 2021, at 16:32, Jeff Law <jeffreyalaw@gmail.com> wrote:
> 
> 
> 
> On 12/17/2021 4:21 AM, Olivier Hainque via Gcc-patches wrote:
>> Hello,
>> 
>> Ping for https://gcc.gnu.org/pipermail/gcc-patches/2021-November/583222.html
>> 
>> please ?
>> 
>> Thanks in advance!

> OK for the trunk.

>  Sorry it got lost.

Thanks Jeff, no pb at all. All busy :)



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-12-20 16:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-03 14:54 Fix size of static array in gcc.dg/vect/vect-simd-20.c Olivier Hainque
2021-12-17 11:21 ` [PING] " Olivier Hainque
2021-12-20 15:32   ` Jeff Law
2021-12-20 16:10     ` Olivier Hainque

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).