Ah, apologies -- you're right. I'd already committed the patch this morning, so I'll update it with the obvious fix.
Thanks for the catch, Matthew On 09/12/2019 12:48, Martin Liška wrote: > Hello. > > The patch triggers the following warning: > > In file included from /home/marxin/Programming/gcc/gcc/regstat.c:23: > /home/marxin/Programming/gcc/gcc/regstat.c: In function ‘void > regstat_bb_compute_calls_crossed(unsigned int, bitmap)’: > /home/marxin/Programming/gcc/gcc/regstat.c:327:35: warning: comparison > of integer expressions of different signedness: ‘int’ and ‘unsigned int’ > [-Wsign-compare] > 327 | gcc_assert (INSN_UID (insn) < DF_INSN_SIZE ()); > /home/marxin/Programming/gcc/gcc/system.h:748:14: note: in definition of > macro ‘gcc_assert’ > 748 | ((void)(!(EXPR) ? fancy_abort (__FILE__, __LINE__, > __FUNCTION__), 0 : 0)) > | ^~~~ > > What about something like: > > gcc/regstat.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/gcc/regstat.c b/gcc/regstat.c > index c6cefb117d7..035d48c28ab 100644 > --- a/gcc/regstat.c > +++ b/gcc/regstat.c > @@ -324,7 +324,7 @@ regstat_bb_compute_calls_crossed (unsigned int > bb_index, bitmap live) > > FOR_BB_INSNS_REVERSE (bb, insn) > { > - gcc_assert (INSN_UID (insn) < DF_INSN_SIZE ()); > + gcc_assert (INSN_UID (insn) < (int)DF_INSN_SIZE ()); > struct df_insn_info *insn_info = DF_INSN_INFO_GET (insn); > unsigned int regno; > > Martin