From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 36123 invoked by alias); 23 Feb 2018 15:52:25 -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 36098 invoked by uid 89); 23 Feb 2018 15:52:25 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail-ot0-f169.google.com Received: from mail-ot0-f169.google.com (HELO mail-ot0-f169.google.com) (74.125.82.169) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 23 Feb 2018 15:52:23 +0000 Received: by mail-ot0-f169.google.com with SMTP id 79so7733395oth.11 for ; Fri, 23 Feb 2018 07:52:23 -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:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=QwJJryWk2vK+uoQ6HrMlGnxXaqIuJgtPNBt1B2idOQY=; b=tKkpDws84so5L+fo9IzSNEBas5SUddP7hGYRsJfSbhkkPhsKHXCMjFrvr49nVutNIC Lgh+efiv8Te1iDO+kPkVcGqke0DsTR9Kw059KzufJdOnEm2i4XHkmKnuH46AUqEDOvVi lHJNXXMEIRGV0gavhni/6FNl623iBnVu0VvjYZRRPqkQNHAIv9scO9LZLgRlDQM+3c7p kT9F4jUpk9ZSmw33weuLtIQ0tRUdPG0VGpI+rlajNm+Bf59JUJHyH05I9UHyxUj0hlrQ NND2RV14yR3a5Ao7mVaJ0g1yuXhDK07A3nK1OBOJd/KJo4OSJ3K05JTJFda/QA2HoOTD 51IQ== X-Gm-Message-State: APf1xPAOikVM/AXDHT987810VdyDKSQkAdpPW1QVnWujLgVEH4WUrTV1 Rw9fEilwENZh5JNRBv/+ykg= X-Google-Smtp-Source: AG47ELu4MuTdQ5pqhQrVGoaqJJEQzCj4FZe3nDEA7nQdQmcashGy5zfVo2yRMgohiOzOzrpjEbJNZg== X-Received: by 10.157.48.42 with SMTP id d39mr1438455otc.151.1519401141670; Fri, 23 Feb 2018 07:52:21 -0800 (PST) Received: from localhost.localdomain (75-171-228-29.hlrn.qwest.net. [75.171.228.29]) by smtp.gmail.com with ESMTPSA id 93sm1293155ots.42.2018.02.23.07.52.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Feb 2018 07:52:20 -0800 (PST) Subject: Re: [PATCH] correct -Wrestrict handling of arrays of arrays (PR 84095) To: Siddhesh Poyarekar , Gcc Patch List , Jakub Jelinek References: From: Martin Sebor Message-ID: Date: Fri, 23 Feb 2018 15:52:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2018-02/txt/msg01329.txt.bz2 On 02/22/2018 08:17 PM, Siddhesh Poyarekar wrote: > On Friday 02 February 2018 05:15 AM, Martin Sebor wrote: >> PR middle-end/84095 - false-positive -Wrestrict warnings for memcpy within array >> >> gcc/ChangeLog: >> >> PR middle-end/84095 >> * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New. >> (builtin_memref::set_base_and_offset): Same. Handle inner references. >> (builtin_memref::builtin_memref): Factor out parts into >> set_base_and_offset and call it. >> >> gcc/testsuite/ChangeLog: >> >> PR middle-end/84095 >> * c-c++-common/Warray-bounds-3.c: Adjust text of expected warnings. >> * c-c++-common/Wrestrict.c: Same. >> * gcc.dg/Wrestrict-6.c: Same. >> * gcc.dg/Warray-bounds-27.c: New test. >> * gcc.dg/Wrestrict-8.c: New test. >> * gcc.dg/Wrestrict-9.c: New test. >> * gcc.dg/pr84095.c: New test. > > This is causing failures in Warray-bounds-2.c in the testsuite: > > FAIL: c-c++-common/Warray-bounds-2.c -Wc++-compat memcpy (test for > warnings, line 67) I see no failures in this test in any of the recently reported results on any targets except those below: https://gcc.gnu.org/ml/gcc-testresults/2018-02/msg01530.html https://gcc.gnu.org/ml/gcc-testresults/2018-02/msg01514.html There are a large number of failures in these reports in many tests that were reported previously (before r257910), suggesting something else is wrong. They all seem to use -fpic. If you referring to some other report or your own result please post a link or say what target/configuration, etc.. Martin > FAIL: c-c++-common/Warray-bounds-2.c -Wc++-compat (test for warnings, > line 72) > FAIL: c-c++-common/Warray-bounds-2.c -Wc++-compat strncpy (test for > warnings, line 178) > FAIL: c-c++-common/Warray-bounds-2.c -Wc++-compat (test for warnings, > line 183) > FAIL: c-c++-common/Warray-bounds-2.c -std=gnu++98 memcpy (test for > warnings, line 67) > FAIL: c-c++-common/Warray-bounds-2.c -std=gnu++98 (test for warnings, > line 72) > FAIL: c-c++-common/Warray-bounds-2.c -std=gnu++98 strncpy (test for > warnings, line 178) > FAIL: c-c++-common/Warray-bounds-2.c -std=gnu++98 (test for warnings, > line 183) > FAIL: c-c++-common/Warray-bounds-2.c -std=gnu++11 memcpy (test for > warnings, line 67) > FAIL: c-c++-common/Warray-bounds-2.c -std=gnu++11 (test for warnings, > line 72) > FAIL: c-c++-common/Warray-bounds-2.c -std=gnu++11 strncpy (test for > warnings, line 178) > FAIL: c-c++-common/Warray-bounds-2.c -std=gnu++11 (test for warnings, > line 183) > FAIL: c-c++-common/Warray-bounds-2.c -std=gnu++14 memcpy (test for > warnings, line 67) > FAIL: c-c++-common/Warray-bounds-2.c -std=gnu++14 (test for warnings, > line 72) > FAIL: c-c++-common/Warray-bounds-2.c -std=gnu++14 strncpy (test for > warnings, line 178) > FAIL: c-c++-common/Warray-bounds-2.c -std=gnu++14 (test for warnings, > line 183) > > Siddhesh >