Re: [PATCH 1/3] score/cpu: Silence ARM and AARCH64 GCC 12 false trigger array warning

2022-06-14 Thread Joel Sherrill
Correct the URL in the commit message and push it.

--joel

On Mon, Jun 13, 2022 at 8:57 PM Chris Johns  wrote:

> On 14/6/2022 11:24 am, chr...@rtems.org wrote:
> > From: Chris Johns 
> >
> > The false trigger is covered in:
> >
> > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104657
>
> This is the link I meant to include ..
>
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99578
>
> I will update commit and push with this link if approved.
>
> Chris
> ___
> devel mailing list
> devel@rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
>
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: [PATCH 1/3] score/cpu: Silence ARM and AARCH64 GCC 12 false trigger array warning

2022-06-13 Thread Chris Johns
On 14/6/2022 11:24 am, chr...@rtems.org wrote:
> From: Chris Johns 
> 
> The false trigger is covered in:
> 
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104657

This is the link I meant to include ..

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99578

I will update commit and push with this link if approved.

Chris
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH 1/3] score/cpu: Silence ARM and AARCH64 GCC 12 false trigger array warning

2022-06-13 Thread chrisj
From: Chris Johns 

The false trigger is covered in:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104657

GCC 11 and 12 has been patched for constant pointer casts above
4K. This code casts a constant pointer within the first 4K
page. As a result the patch disables the warning.

Updates #4662
---
 cpukit/score/cpu/aarch64/cpu.c | 3 +++
 cpukit/score/cpu/arm/cpu.c | 5 -
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/cpukit/score/cpu/aarch64/cpu.c b/cpukit/score/cpu/aarch64/cpu.c
index 88e7ad8a8c..f0062adf30 100644
--- a/cpukit/score/cpu/aarch64/cpu.c
+++ b/cpukit/score/cpu/aarch64/cpu.c
@@ -180,6 +180,8 @@ void _CPU_ISR_install_vector(
   CPU_ISR_handler *old_handler
 )
 {
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Warray-bounds"
   /* Redirection table starts at the end of the vector table */
   CPU_ISR_handler *table = (CPU_ISR_handler *) (MAX_EXCEPTIONS * 4);
 
@@ -194,6 +196,7 @@ void _CPU_ISR_install_vector(
   if (current_handler != new_handler) {
 table [vector] = new_handler;
   }
+#pragma GCC diagnostic pop
 }
 
 void _CPU_Initialize( void )
diff --git a/cpukit/score/cpu/arm/cpu.c b/cpukit/score/cpu/arm/cpu.c
index 5c5b253470..b2cc6039b0 100644
--- a/cpukit/score/cpu/arm/cpu.c
+++ b/cpukit/score/cpu/arm/cpu.c
@@ -167,8 +167,10 @@ void _CPU_ISR_install_vector(
   CPU_ISR_handler *old_handler
 )
 {
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Warray-bounds"
   /* Redirection table starts at the end of the vector table */
-  CPU_ISR_handler *table = (CPU_ISR_handler *) (MAX_EXCEPTIONS * 4);
+  CPU_ISR_handler volatile  *table = (CPU_ISR_handler *) (MAX_EXCEPTIONS * 4);
 
   CPU_ISR_handler current_handler = table [vector];
 
@@ -181,6 +183,7 @@ void _CPU_ISR_install_vector(
   if (current_handler != new_handler) {
 table [vector] = new_handler;
   }
+#pragma GCC diagnostic pop
 }
 
 void _CPU_Initialize( void )
-- 
2.19.1

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel