From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 125907 invoked by alias); 4 Dec 2018 13:17:29 -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 125889 invoked by uid 89); 4 Dec 2018 13:17:29 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=BAYES_00,KAM_NUMSUBJECT,SPF_PASS autolearn=no version=3.3.2 spammy= X-HELO: mx1.suse.de Received: from mx2.suse.de (HELO mx1.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 04 Dec 2018 13:17:27 +0000 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 22EE5B08A; Tue, 4 Dec 2018 13:17:25 +0000 (UTC) Date: Tue, 04 Dec 2018 13:17:00 -0000 From: Richard Biener To: Christophe Lyon cc: gcc Patches Subject: Re: [PATCH] Fix PR88301 In-Reply-To: Message-ID: References: User-Agent: Alpine 2.20 (LSU 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-SW-Source: 2018-12/txt/msg00173.txt.bz2 On Tue, 4 Dec 2018, Christophe Lyon wrote: > Hi Richard, > On Mon, 3 Dec 2018 at 14:37, Richard Biener wrote: > > > > > > This fixes a missed optimization in EVRP by teaching the code > > figuring out conditional asserts about conversions that preserve > > the converted value. > > > > Bootstrapped and tested on x86_64-unknown-linux-gnu, applied to trunk > > sofar. > > > > Richard. > > > > 2018-12-03 Richard Biener > > > > PR tree-optimization/88301 > > * tree-vrp.c (register_edge_assert_for_2): Handle conversions > > that do not change the value by registering the same assert > > for the operand. > > > > * gcc.dg/tree-ssa/evrp13.c: New testcase. > > > > I noticed a regression in g++ on aarch64, and git bisect indicates > this commits is the culprit. > g++.dg/warn/Wstringop-overflow-1.C -std=c++14 (test for warnings, line 14) > g++.dg/warn/Wstringop-overflow-1.C -std=c++14 (test for excess errors) > g++.dg/warn/Wstringop-overflow-1.C -std=c++17 (test for warnings, line 14) > g++.dg/warn/Wstringop-overflow-1.C -std=c++17 (test for excess errors) > g++.dg/warn/Wstringop-overflow-1.C -std=c++98 (test for warnings, line 14) > g++.dg/warn/Wstringop-overflow-1.C -std=c++98 (test for excess errors) > > g++.log says: > Excess errors: > /gcc/testsuite/g++.dg/warn/Wstringop-overflow-1.C:14:21: warning: > 'char* __builtin_strncpy(char*, const char*, long unsigned int)' > writing between 6 and 2147483647 bytes into a region of size 5 > overflows the destination [-Wstringop-overflow=] Yes, sorry. r266773 should have fixed this. Richard.