From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 0702B3857BBB for ; Wed, 25 May 2022 17:23:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 0702B3857BBB Received: from mail-io1-f72.google.com (mail-io1-f72.google.com [209.85.166.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-561-TapBowdhNa-B5bLbsgH9Kg-1; Wed, 25 May 2022 13:23:57 -0400 X-MC-Unique: TapBowdhNa-B5bLbsgH9Kg-1 Received: by mail-io1-f72.google.com with SMTP id l9-20020a5e8809000000b0065e534ca51dso9324470ioj.17 for ; Wed, 25 May 2022 10:23:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:from:to:references:in-reply-to :content-transfer-encoding; bh=q/V4Ihf48ByNav8gv9EVyHeqrJWPT3R+vuu9wS7pOm4=; b=F1Lgkk4ynnyvdXeHME9ANcz7IBNP3/CjAkSk3/pj/w/UphBZUUeAOkRYaae6natXlc e3+2Rj/llpV9Bmnh3s9lGxzUwEIh28PeBoWoef1KR5Gvc5Rwm3B8Gg+ntefpuUp6eIGD Bqa0LkgW2T7qUtSSMGjSwlNEimPXj7Zwjq0HxROwIpOh9tytn8OiaP7jXZYw6JbmSYM1 1vkuIrPghD24s4iivBzGIs1VmWIj7zdggojc+jT+tYDMkvaqgNdsShYfVJK3zda6VHXI 0L3vdyzkN1D3fnefRZ3Ohb3G/3luRvTJx7u9RcuQJkB8cquHbNE5WC4wu7BVQMBJX9A/ CMsQ== X-Gm-Message-State: AOAM533M0G/nV30pAu2f13MDxyVluK5Fa+VVKzCjrZ5YkaWxm1o8au0h BGQUcdW2xR+dIZuZBkOm89aWZNRpX9yjmFJMhiZ/sTqLGCJlJKD0ZescksayC9TGDbcU9e1Cxu4 TF8dRyIEa3ejF5WcIWw== X-Received: by 2002:a05:6e02:12cd:b0:2d1:43bb:ae30 with SMTP id i13-20020a056e0212cd00b002d143bbae30mr17069298ilm.294.1653499436816; Wed, 25 May 2022 10:23:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxIVHrrFQ/q7EsCxtV98LNZPtD1LNRezN8azpZwpK9jINtzjutpumnQXEFhMRZ82TZwbC36kQ== X-Received: by 2002:a05:6e02:12cd:b0:2d1:43bb:ae30 with SMTP id i13-20020a056e0212cd00b002d143bbae30mr17069289ilm.294.1653499436628; Wed, 25 May 2022 10:23:56 -0700 (PDT) Received: from [192.168.0.41] (97-118-121-109.hlrn.qwest.net. [97.118.121.109]) by smtp.gmail.com with ESMTPSA id e11-20020a92a00b000000b002d176be6912sm4049985ili.33.2022.05.25.10.23.55 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 25 May 2022 10:23:56 -0700 (PDT) Message-ID: <02a18746-6113-f70e-5f31-ff6cfda5b5ec@redhat.com> Date: Wed, 25 May 2022 11:23:55 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.4.0 Subject: Re: [PATCH] tree-optimization/105726 - adjust array bound heuristic From: Martin Sebor To: Richard Biener , gcc-patches@gcc.gnu.org References: <20220525104937.C71D413ADF@imap2.suse-dmz.suse.de> <172756e6-6cd6-a05c-b8cb-8b72c023fa36@redhat.com> In-Reply-To: <172756e6-6cd6-a05c-b8cb-8b72c023fa36@redhat.com> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) 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: Wed, 25 May 2022 17:24:00 -0000 On 5/25/22 11:19, Martin Sebor wrote: > On 5/25/22 04:49, Richard Biener wrote: ... > [*] For example, no warning is issued for the following overread: Scratch that, there is no overread with strncpy. When there is like with memcpy, it is diagnosed as it should be. > > struct A a; > > void g (char *d) > { >   struct B *q = &a.b; >   __builtin_strncpy (d, q->a, 123);   // { dg-warning > "-Wstringop-overread" "pr???????" { xfail *-*-* } } > }