This avoids inline expansion to preserve the warning by making
the memcpy size a non-power-of-two as suggested by Martin Sebor.

Tested on x86_64-unknown-linux-gnu, pushed.

2021-09-29  Richard Biener  <rguent...@suse.de>

        * gcc.dg/out-of-bounds-1.c: Make memcpied size not power-of-two.
---
 gcc/testsuite/gcc.dg/out-of-bounds-1.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/testsuite/gcc.dg/out-of-bounds-1.c 
b/gcc/testsuite/gcc.dg/out-of-bounds-1.c
index 1c76341af27..5c134c096e3 100644
--- a/gcc/testsuite/gcc.dg/out-of-bounds-1.c
+++ b/gcc/testsuite/gcc.dg/out-of-bounds-1.c
@@ -8,6 +8,6 @@
 void ProjectOverlay(const float localTextureAxis[2], char *lump)
 {
    const void *d = &localTextureAxis;
-   int size = sizeof(float)*8 ;
+   int size = sizeof(float)*7 ;
    __builtin_memcpy( &lump[ 0 ], d, size );  /* { dg-warning "reading" } */
 }
-- 
2.31.1

Reply via email to