From patchwork Tue Nov 14 09:20:19 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom de Vries X-Patchwork-Id: 837756 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-466706-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="MhmpVGbm"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3ybhnr4Xtmz9sPr for ; Tue, 14 Nov 2017 20:21:04 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type; q=dns; s=default; b=lpFvXANWSm+Lb8iB6 oV7mf6Wp1LDWlhg+7Vos0KJXeNFt3LVEQlrPBVuUrvHHw3Mttfe5LIwfxy2Vi/Tr XlvPiIoJ9xkR6kYQDDQJ/RK3p6IO159JNLi6dVK+p9LmKOuweK7T+Yy3TKgAv6M4 AcY84eULPl+nKIT+XfjJm5NmC4= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type; s=default; bh=CeONKpGj/Q+p32Po4Qw61BF TuRM=; b=MhmpVGbmxjfikUD5Eoth+omt7v97XovNWT6FGehzJylJCigffv7Jqve ncVds8mJG5zbh0Vv6gs9sK+1yKn2Zn6HQG/XpQ1gyIhpGlNNfW5ALrQJejJLYLmu SrR/t/am4EEp5rQOdIIYor0Z7H2okFWzVvHdT6zDl2JY5AVP5AzU= 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-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@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 10:20:19 +0100 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: 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) [ 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 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;