Re: [committed] analyzer: avoid comparisons between uncomparable types (PR 93450)

2020-01-30 Thread David Malcolm
On Thu, 2020-01-30 at 15:36 +0100, Jakub Jelinek wrote: > On Thu, Jan 30, 2020 at 09:27:33AM -0500, David Malcolm wrote: > > --- a/gcc/analyzer/region-model.cc > > +++ b/gcc/analyzer/region-model.cc > > @@ -666,12 +666,16 @@ constant_svalue::eval_condition > > (constant_svalue *lhs, > >gcc_asse

Re: [committed] analyzer: avoid comparisons between uncomparable types (PR 93450)

2020-01-30 Thread Jakub Jelinek
On Thu, Jan 30, 2020 at 09:27:33AM -0500, David Malcolm wrote: > --- a/gcc/analyzer/region-model.cc > +++ b/gcc/analyzer/region-model.cc > @@ -666,12 +666,16 @@ constant_svalue::eval_condition (constant_svalue *lhs, >gcc_assert (CONSTANT_CLASS_P (lhs_const)); >gcc_assert (CONSTANT_CLASS_P (

[committed] analyzer: avoid comparisons between uncomparable types (PR 93450)

2020-01-30 Thread David Malcolm
PR analyzer/93450 reports an ICE trying to fold an EQ_EXPR comparison of (int)0 with (float)Inf. Most comparisons inside the analyzer come from gimple conditions, for which the necessary casts have already been added. This one is done inside constant_svalue::eval_condition as part of purging sm-s