This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix PR88301


On Tue, 4 Dec 2018, Christophe Lyon wrote:

> Hi Richard,
> On Mon, 3 Dec 2018 at 14:37, Richard Biener <rguenther@suse.de> 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  <rguenther@suse.de>
> >
> >         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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]