From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qt1-x832.google.com (mail-qt1-x832.google.com [IPv6:2607:f8b0:4864:20::832]) by sourceware.org (Postfix) with ESMTPS id ADAC03870895 for ; Fri, 29 Jan 2021 17:22:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org ADAC03870895 Received: by mail-qt1-x832.google.com with SMTP id h16so6106053qth.11 for ; Fri, 29 Jan 2021 09:22:26 -0800 (PST) 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=f9Ufwd9+mLEPcf0KASxU4yUFVXKWGoNDEyOpEOBnxME=; b=BsCkOCWbkdi2Gau/jZ4ZXCrBbifKOEGqb370ebrJogM82bJzjNc0x3suE7JIYmykLO ANKgKNSwzTgfhKIyAmlFTFFSdTJkMbPh74zX3zFNZz3aTIxk7Z77nVeZmLBlBreZLWYU j9oAml1Djxpxdxev69sOwvjXJclIMoxD81srvuDFdDmfx17wVY6FFOBZ0AL1qnIj1Lxm yrWR6UIIM4CwFN97Ip63PGLc8Ud70cn49J7CAjh6jPd99FatrKvbPtIqZ83Qne45+Fp0 ZbjlqsuoSaVwKu2dv/YVmI+iGYrpEd6OEBcfYBi1f52JsVucM6XGrw/7Ti9RAIyRPfM5 GEgA== X-Gm-Message-State: AOAM532h9zNBAxzlyViExLv4CS0Zw6grcGl6UfbDrZ7m4Fy/JrlTXEMb aJFsf5t/TGU+H4OAr+edAz/35SKL4Rs= X-Google-Smtp-Source: ABdhPJyxTkFFNhhY+KIfTICHh0PAbCGjoDujATX3mtKFLjkmjPKaWfJu+eir4u1uxDSeO8EOBKepqw== X-Received: by 2002:ac8:4d93:: with SMTP id a19mr5074122qtw.28.1611940945824; Fri, 29 Jan 2021 09:22:25 -0800 (PST) Received: from [192.168.0.41] (184-96-239-30.hlrn.qwest.net. [184.96.239.30]) by smtp.gmail.com with ESMTPSA id x72sm6408926qka.51.2021.01.29.09.22.24 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 29 Jan 2021 09:22:25 -0800 (PST) Subject: PING [PATCH] avoid -Warray-bounds checks for vtable assignments (PR 98266) From: Martin Sebor To: gcc-patches References: <7fa3c1e0-8a09-3436-8669-6d1a577ca247@gmail.com> Message-ID: <3d36badc-429f-98d4-51fd-df6a2fe9e218@gmail.com> Date: Fri, 29 Jan 2021 10:22:24 -0700 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: <7fa3c1e0-8a09-3436-8669-6d1a577ca247@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, KAM_SHORT, 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: Fri, 29 Jan 2021 17:22:27 -0000 Ping: https://gcc.gnu.org/pipermail/gcc-patches/2021-January/563894.html On 1/19/21 5:56 PM, Martin Sebor wrote: > Similar to the problem reported for -Wstringop-overflow in pr98266 > and already fixed, -Warray-bounds is also susceptible to false > positives in assignments and copies involving virtual inheritance. > Because the two warnings don't share code yet (hopefully in GCC 12) > the attached patch adds its own workaround for this problem to > gimple-array-bounds.cc, this one slightly more crude because of > the limited insight the array bounds checking has into the checked > expressions. > > Tested on x86_64-linux. > > Martin