[Bug middle-end/83463] [8 Regression] ICE: tree check: expected integer_type or enumeral_type or boolean_type or real_type or fixed_point_type, have pointer_type in builtin_memr ef, at gimple-ssa-warn-restrict.c:297

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Dec 19 07:27:00 GMT 2017


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83463

--- Comment #12 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Martin Sebor from comment #11)
> (In reply to Jakub Jelinek from comment #9)
> > Another bug:
> >
> > %lli isn't portable and casts to long long aren't needed.  You should remove
> > those, and use " HOST_WIDE_INT_PRINT_DEC " instead of %lli in the format
> > strings.
> 
> I'll address this nit along with the other uses of %lli in the compiler in a
> separate change:
> 
> $ find . -name "*.c" ! -path "*/testsuite/*" | xargs grep -l %lli)
> ./pretty-print.c

No, this is fine.  There is a big difference between pp* stuff, which we define
ourselves and can do there whatever we want, and

> ./gimple-ssa-warn-restrict.c
> ./gimple-ssa-sprintf.c

sprintf/fprintf/printf etc. provided by the host OS, where the rules are of the
host OS.

> ./ipa-devirt.c

This one is fine too, it uses warning_n which uses the pp* stuff.

> > What happens if offrange[0] is > HOST_WIDE_INT_MAX or either offrange[0] or
> > offrange[1] < HOST_WIDE_INT_MIN ?  Is that something guaranteed not to
> > happen by the callers?
> 
> I think what happens is truncation/wraparound.  GCC should have a directive
> for formatting offset_int to avoid these issues.

How can it have a directive for the system sprintf?


More information about the Gcc-bugs mailing list