From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31266 invoked by alias); 19 Oct 2016 15:55:52 -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 31246 invoked by uid 89); 19 Oct 2016 15:55:52 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=upcoming X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 19 Oct 2016 15:55:50 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 628035277D; Wed, 19 Oct 2016 15:55:49 +0000 (UTC) Received: from localhost.localdomain (ovpn-116-87.phx2.redhat.com [10.3.116.87]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u9JFtmI8007833; Wed, 19 Oct 2016 11:55:48 -0400 Subject: Re: PING: new pass to warn on questionable uses of alloca() and VLAs To: Aldy Hernandez , Eric Botcazou , Andreas Schwab References: <5798785F.8020001@redhat.com> <1595501.f2BvEmWqcT@polaris> <40a675db-261e-2fbf-9760-673bf0e990d8@redhat.com> Cc: gcc-patches@gcc.gnu.org, christophe.lyon@linaro.org From: Jeff Law Message-ID: Date: Wed, 19 Oct 2016 15:55:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <40a675db-261e-2fbf-9760-673bf0e990d8@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2016-10/txt/msg01560.txt.bz2 On 10/19/2016 09:32 AM, Aldy Hernandez wrote: > On 10/19/2016 09:16 AM, Eric Botcazou wrote: >>> m68k-suse-linux >> >> visium-elf too. >> > > The attached patch fixes the failures on m68k-suse-linux, visium-elf, > and arm-eabi. > > There were a few problems. > > One problem is that on lp64 targets (where sizeof(size_t) != > sizeof(int)), the warning is slightly different-- and rightly so. I > have updated the test to handle both warnings on the respective targets. > > The other problem is that the following snippet is incorrectly warning > on 32-bit targets: > > if (n > 0 && n < 2000) > p = __builtin_alloca (n); > > Looking at the gimple it seems like another case of VRP failing to give > any range information whatsoever. I have xfailed it as another case > where Andrew's upcoming work should theoretically fix this. The test is > fine on 64-bit targets. > > Can y'all double check it on your respective targets as I only have a > crude cross build? OK for the trunk whenever you're ready. jeff