From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi1-x22f.google.com (mail-oi1-x22f.google.com [IPv6:2607:f8b0:4864:20::22f]) by sourceware.org (Postfix) with ESMTPS id 832603861815 for ; Tue, 29 Sep 2020 23:15:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 832603861815 Received: by mail-oi1-x22f.google.com with SMTP id i17so7408050oig.10 for ; Tue, 29 Sep 2020 16:15:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=z6mUfJee72CZMiJy+30+QaudY0Sshk7fW2VxN6jqu6s=; b=aj4kq4lSAtRhW1iC/K8Ge9YgioofJD3Hw6zDf3byKdTW0kqtLSTWQCqYYAwxWIogrz K1l43Gzcwh9UN2cVpH8Z/MWNAd36Ng3S08mA0h5lh0S4cZkd4IBx6bXUdaU23T5RoAoL DqC/I1iqAw5TEwNZlLLo1+kbjtUW42NiVZBZb12F6b0bSE4nbRSzhUGHoSzBRzdszcwp 5ihqZ6IFfdZCVwRLqxqN/3aosN0rQR+GoYczYSy27d5oQXrVB79xov00MyEHNGuthaOl u8Af6s0RLVxbY4L6lDzllShO5V3zqNAA1YnlsVtK0XLQRnTF0JlOEYAFwZDX1rVojTdL 0Wwg== X-Gm-Message-State: AOAM532QIt3rISY4JqX+HrZUZTO2UaLC57Q8mACccM8G3RglpeNnlgQl 6UKVrdimVFq6q+8rvyh3HxjfI97TSag= X-Google-Smtp-Source: ABdhPJwFDph+F8e6ckYoVMtX9YiDqRs2r+V2aYgumigXMXEuy9ALwi+D96jq18DovdTVFZcPdr4SHQ== X-Received: by 2002:aca:4ec9:: with SMTP id c192mr6818oib.2.1601421321755; Tue, 29 Sep 2020 16:15:21 -0700 (PDT) Received: from [192.168.0.41] (97-118-127-189.hlrn.qwest.net. [97.118.127.189]) by smtp.gmail.com with ESMTPSA id g23sm3484636ooh.45.2020.09.29.16.15.21 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 29 Sep 2020 16:15:21 -0700 (PDT) Subject: [pushed] correct/improve handling of null VLA arguments (PR 97188) From: Martin Sebor To: gcc-patches References: <76459e14-ce07-db88-f7b9-ec9bad7715a3@gmail.com> Message-ID: <9897cf44-869c-0da2-1ee5-f2e40b8df4df@gmail.com> Date: Tue, 29 Sep 2020 17:15:20 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 MIME-Version: 1.0 In-Reply-To: <76459e14-ce07-db88-f7b9-ec9bad7715a3@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Sep 2020 23:15:23 -0000 I have committed & pushed the fix in r11-3540. On 9/24/20 6:15 PM, Martin Sebor wrote: > The machinery recently added to support -Warray-parameter and > -Wvla-parameter also results in enhanced detection of null > pointer arguments to VLA function parameters.  This enhancement > wasn't tested as comprehensively as it should have been and > so has some bugs.  The attached patch fixes one that leads > to an ICE.  It also restructures the function and improves > the warning issues in this case. > > The fix is slightly bit bigger than what I would normally commit > without a review but since it's all in code I just wrote and in > my view low risk I will go ahead and push it in a few days unless > I hear requests for changes by then. > > Martin