diff mbox series

[testsuite,committed] Require alloca for c-c++-common/Wstringop-truncation.c

Message ID e6897159-5785-1831-9d87-1fc5e2f21064@mentor.com
State New
Headers show
Series [testsuite,committed] Require alloca for c-c++-common/Wstringop-truncation.c | expand

Commit Message

Tom de Vries Nov. 14, 2017, 9:20 a.m. UTC
[ was: Re: [PATCH 3/4] enhance overflow and truncation detection in 
strncpy and strncat (PR 81117) ]

On 08/06/2017 10:07 PM, Martin Sebor wrote:

> 	* c-c++-common/Wstringop-truncation.c: Same.

> +/* Verify warnings for VLAs.  */
> +
> +void test_strncpy_vla (unsigned n, const char* s)
> +{
> +  char vla[n];

Hi,

this patch requires effective target alloca for test-case 
c-c++-common/Wstringop-truncation.c.

Committed as obvious.

Thanks,
- Tom
diff mbox series

Patch

Require alloca for c-c++-common/Wstringop-truncation.c

2017-11-14  Tom de Vries  <tom@codesourcery.com>

	* c-c++-common/Wstringop-truncation.c: Require effective target alloca.

---
 gcc/testsuite/c-c++-common/Wstringop-truncation.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gcc/testsuite/c-c++-common/Wstringop-truncation.c b/gcc/testsuite/c-c++-common/Wstringop-truncation.c
index c536a13..7fc439f 100644
--- a/gcc/testsuite/c-c++-common/Wstringop-truncation.c
+++ b/gcc/testsuite/c-c++-common/Wstringop-truncation.c
@@ -1,6 +1,7 @@ 
 /* PR middle-end/81117 - Improve buffer overflow checking in strncpy
    { dg-do compile }
-   { dg-options "-O2 -Wstringop-truncation -Wno-stringop-overflow -ftrack-macro-expansion=0" } */
+   { dg-options "-O2 -Wstringop-truncation -Wno-stringop-overflow -ftrack-macro-expansion=0" }
+   { dg-require-effective-target alloca } */
 
 
 typedef __SIZE_TYPE__ size_t;