Thanks for the update. Tejas Belagod <tbela...@arm.com> writes: > +/* Implementations of the iterator_group callbacks for ints. */ > + > +/* Since GCC does not construct a table of valid constants, > + we have to accept any int as valid. No cross-checking can > + be done. */ > + > +static int > +find_int (const char *name) > +{ > + char *endptr; > + int ret; > + > + if (ISDIGIT (*name)) > + { > + ret = strtol (name, &endptr, 0); > + gcc_assert (*endptr == '\0');
As I mentioned before, I think this should be an error rather than an assert. An assert would only be appropriate if this is something that should already have been checked, but AFAICT nothing does. In fact I think this ought to be: validate_const_int (name); return atoi (name); And unless I'm missing something, this: > + /* Can be an iterator or an integer constant. */ > read_name (&name); > - validate_const_int (name.string); > - tmp_int = atoi (name.string); > - XINT (return_rtx, i) = tmp_int; > + if (!ISDIGIT (name.string[0])) > + { > + struct mapping *iterator; > + /* An iterator. */ > + iterator = (struct mapping *) htab_find (ints.iterators, > + &name.string); > + if (iterator) > + record_iterator_use (iterator, &XINT (return_rtx, i)); > + else > + fatal_with_file_and_line ("unknown iterator `%s'",name.string); > + } > + else > + { > + validate_const_int (name.string); > + tmp_int = atoi (name.string); > + XINT (return_rtx, i) = tmp_int; > + } should simply be: /* Can be an iterator or an integer constant. */ read_name (&name); record_potential_iterator_use (&ints, &XINT (return_rtx, i), name.string); break; Richard