+2014-05-12 Mike Stump <mikestump@comcast.net>
+
+ PR other/31778
+ * genattrtab.c (filename): Add.
+ (convert_set_attr_alternative): Improve error message.
+ (check_defs): Restore read_md_filename for error messages.
+ (gen_insn): Save filename.
+
2014-05-12 Dimitris Papavasiliou <dpapavas@gmail.com>
* doc/invoke.texi: Document new switches -Wno-shadow-ivar,
rtx def; /* The DEFINE_... */
int insn_code; /* Instruction number. */
int insn_index; /* Expression number in file, for errors. */
+ const char *filename; /* Filename. */
int lineno; /* Line number. */
int num_alternatives; /* Number of alternatives. */
int vec_idx; /* Index of attribute vector in `def'. */
if (XVECLEN (exp, 1) != num_alt)
{
error_with_line (id->lineno,
- "bad number of entries in SET_ATTR_ALTERNATIVE");
+ "bad number of entries in SET_ATTR_ALTERNATIVE, was %d expected %d",
+ XVECLEN (exp, 1), num_alt);
return NULL_RTX;
}
if (XVEC (id->def, id->vec_idx) == NULL)
continue;
+ read_md_filename = id->filename;
for (i = 0; i < XVECLEN (id->def, id->vec_idx); i++)
{
value = XVECEXP (id->def, id->vec_idx, i);
id->next = defs;
defs = id;
id->def = exp;
+ id->filename = read_md_filename;
id->lineno = lineno;
switch (GET_CODE (exp))