Re: [PATCH] Fix gimple-ssa-sprintf.c ICE (PR tree-optimization/83198, take 2)

2017-12-14 Thread Richard Biener
On Thu, 14 Dec 2017, Jakub Jelinek wrote: > On Wed, Dec 13, 2017 at 03:55:13PM -0700, Martin Sebor wrote: > > For the second part, can you please also add a compile-time test > > to verify that the result isn't constrained to the same range as > > with a real argument? Checking that the abort bel

Re: [PATCH] Fix gimple-ssa-sprintf.c ICE (PR tree-optimization/83198)

2017-12-14 Thread Richard Biener
On Wed, 13 Dec 2017, Jakub Jelinek wrote: > Hi! > > This patch fixes 2 issues in format_floating. One is that when determining > precision, we should consider solely the type *printf* will read the > argument as (i.e. double unless L or ll modifier is used, in which case > long double), not the

[PATCH] Fix gimple-ssa-sprintf.c ICE (PR tree-optimization/83198, take 2)

2017-12-14 Thread Jakub Jelinek
On Wed, Dec 13, 2017 at 03:55:13PM -0700, Martin Sebor wrote: > For the second part, can you please also add a compile-time test > to verify that the result isn't constrained to the same range as > with a real argument? Checking that the abort below isn't > eliminated would do it for %f: > > vo

Re: [PATCH] Fix gimple-ssa-sprintf.c ICE (PR tree-optimization/83198)

2017-12-13 Thread Martin Sebor
On 12/13/2017 03:16 PM, Jakub Jelinek wrote: Hi! This patch fixes 2 issues in format_floating. One is that when determining precision, we should consider solely the type *printf* will read the argument as (i.e. double unless L or ll modifier is used, in which case long double), not the type of

[PATCH] Fix gimple-ssa-sprintf.c ICE (PR tree-optimization/83198)

2017-12-13 Thread Jakub Jelinek
Hi! This patch fixes 2 issues in format_floating. One is that when determining precision, we should consider solely the type *printf* will read the argument as (i.e. double unless L or ll modifier is used, in which case long double), not the type of the argument, because the corresponding argumen