On Mon, 26 Oct 2020, Andrew MacLeod wrote:

> >   It is still broken at `-O0', does not build with `--enable-werror-always'
> > (which IMO should be on by default except for releases, just as we do with
> > binutils AFAIK, so as to make sure people do not introduce build problems
> > too easily):
> >
> > .../gcc/gimple-range.cc: In function 'bool
> > range_of_builtin_call(range_query&, irange&, gcall*)':
> > .../gcc/gimple-range.cc:677:15: error: 'zerov' may be used uninitialized
> > [-Werror=maybe-uninitialized]
> >    677 |               if (zerov == prec)
> >        |               ^~
> > cc1plus: all warnings being treated as errors
> > make[2]: *** [Makefile:1122: gimple-range.o] Error 1
> >
> >    Maciej
> >
> I can't reproduce it on x86_64-pc-linux-gnu , i presume this is some other
> target.
> 
> Eyeballing it, it seems that there was a missed initialization  when the
> builtin code was ported that might show up on a target that defines
> CLZ_DEFINED_VALUE_AT_ZERO  to be non-zero but doesnt always set the zerov
> parameter...  Or maybe it some optimization ordering thing.

 Let me see...

$ g++ [...] .../gcc/gimple-range.cc -E -dD | grep CLZ_DEFINED_VALUE_AT_ZERO
#define CLZ_DEFINED_VALUE_AT_ZERO(MODE,VALUE) 0
$

I'm fairly sure this is what the default is.

> Anyway, the following patch has been pushed as an obvious fix to make the code
> match whats in vr-values.

 Thank you!

  Maciej

Reply via email to