Re: [PATCH] Fix minor nits in gimple-ssa-sprintf.c (PR tree-optimization/78586)

2016-12-01 Thread Martin Sebor
On 12/01/2016 09:24 AM, Martin Sebor wrote: So, let's use another testcase, -O2 -W -Wall -fno-tree-vrp -fno-tree-ccp and again UB in it: volatile bool e; volatile int x; int main () { x = 123; *(char *)&e = x; bool f = e; x = __builtin_snprintf (0, 0, "%d", f); } This will store 1 into

Re: [PATCH] Fix minor nits in gimple-ssa-sprintf.c (PR tree-optimization/78586)

2016-12-01 Thread Jeff Law
On 11/30/2016 12:01 PM, Jakub Jelinek wrote: Hi! This patch fixes some minor nits I've raised in the PR, more severe issues left unresolved there. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2016-11-30 Jakub Jelinek PR tree-optimization/78586 * gimp

Re: [PATCH] Fix minor nits in gimple-ssa-sprintf.c (PR tree-optimization/78586)

2016-12-01 Thread Jeff Law
On 12/01/2016 12:51 AM, Jakub Jelinek wrote: On Wed, Nov 30, 2016 at 06:14:14PM -0700, Martin Sebor wrote: On 11/30/2016 12:01 PM, Jakub Jelinek wrote: Hi! This patch fixes some minor nits I've raised in the PR, more severe issues left unresolved there. Bootstrapped/regtested on x86_64-linux

Re: [PATCH] Fix minor nits in gimple-ssa-sprintf.c (PR tree-optimization/78586)

2016-12-01 Thread Martin Sebor
So, let's use another testcase, -O2 -W -Wall -fno-tree-vrp -fno-tree-ccp and again UB in it: volatile bool e; volatile int x; int main () { x = 123; *(char *)&e = x; bool f = e; x = __builtin_snprintf (0, 0, "%d", f); } This will store 1 into x, while without -fprintf-return-value it wou

Re: [PATCH] Fix minor nits in gimple-ssa-sprintf.c (PR tree-optimization/78586)

2016-11-30 Thread Jakub Jelinek
On Wed, Nov 30, 2016 at 06:14:14PM -0700, Martin Sebor wrote: > On 11/30/2016 12:01 PM, Jakub Jelinek wrote: > >Hi! > > > >This patch fixes some minor nits I've raised in the PR, more severe issues > >left unresolved there. > > > >Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?

Re: [PATCH] Fix minor nits in gimple-ssa-sprintf.c (PR tree-optimization/78586)

2016-11-30 Thread Martin Sebor
On 11/30/2016 12:01 PM, Jakub Jelinek wrote: Hi! This patch fixes some minor nits I've raised in the PR, more severe issues left unresolved there. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? Thank you. One comment below. @@ -1059,7 +1048,12 @@ format_integer (const

[PATCH] Fix minor nits in gimple-ssa-sprintf.c (PR tree-optimization/78586)

2016-11-30 Thread Jakub Jelinek
Hi! This patch fixes some minor nits I've raised in the PR, more severe issues left unresolved there. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2016-11-30 Jakub Jelinek PR tree-optimization/78586 * gimple-ssa-sprintf.c (format_integer): Don't handle