From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 78720 invoked by alias); 14 Nov 2017 09:20:50 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 78468 invoked by uid 89); 14 Nov 2017 09:20:50 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.5 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KB_WAM_FROM_NAME_SINGLEWORD,RCVD_IN_DNSWL_NONE,SPF_PASS,URIBL_RED autolearn=ham version=3.3.2 spammy=Require, Hx-languages-length:1443 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 14 Nov 2017 09:20:48 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=SVR-IES-MBX-04.mgc.mentorg.com) by relay1.mentorg.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-SHA384:256) id 1eEXOf-0000pd-7L from Tom_deVries@mentor.com ; Tue, 14 Nov 2017 01:20:45 -0800 Received: from [172.30.72.87] (137.202.0.87) by SVR-IES-MBX-04.mgc.mentorg.com (139.181.222.4) with Microsoft SMTP Server (TLS) id 15.0.1320.4; Tue, 14 Nov 2017 09:20:41 +0000 Subject: [testsuite, committed] Require alloca for c-c++-common/Wstringop-truncation.c To: Martin Sebor , Jeff Law , Gcc Patch List References: <13944863-99a8-4144-1703-c6e1a2f36425@gmail.com> <0bbc91cd-fcdb-be61-e1d0-4b230f23b1a9@redhat.com> <4f4fbd4c-cb46-b80d-5749-ebb6bb050bc4@gmail.com> From: Tom de Vries Message-ID: Date: Tue, 14 Nov 2017 09:24:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/mixed; boundary="------------862933003DEF92474F518540" X-ClientProxiedBy: svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) To SVR-IES-MBX-04.mgc.mentorg.com (139.181.222.4) X-SW-Source: 2017-11/txt/msg01049.txt.bz2 --------------862933003DEF92474F518540 Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Content-length: 453 [ 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 --------------862933003DEF92474F518540 Content-Type: text/x-patch; name="0001-Require-alloca-for-c-c-common-Wstringop-truncation.c.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename*0="0001-Require-alloca-for-c-c-common-Wstringop-truncation.c.pa"; filename*1="tch" Content-length: 933 Require alloca for c-c++-common/Wstringop-truncation.c 2017-11-14 Tom de Vries * 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; --------------862933003DEF92474F518540--