Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(97)

Unified Diff: gcc/gcc/genextract.c

Issue 3050029: [gcc] GCC 4.5.0=>4.5.1 (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/nacl-toolchain.git
Patch Set: Created 10 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gcc/gcc/genemit.c ('k') | gcc/gcc/genflags.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gcc/gcc/genextract.c
diff --git a/gcc/gcc/genextract.c b/gcc/gcc/genextract.c
index c9831105c36546226e5ea5e14f215189a26bc45f..c414891bb6bfa6788696cd5c97488e89c85fa1c4 100644
--- a/gcc/gcc/genextract.c
+++ b/gcc/gcc/genextract.c
@@ -80,6 +80,8 @@ struct accum_extract
VEC(char,heap) *pathstr;
};
+int line_no;
+
/* Forward declarations. */
static void walk_rtx (rtx, struct accum_extract *);
@@ -187,8 +189,13 @@ VEC_safe_set_locstr (VEC(locstr,heap) **vp, unsigned int ix, char *str)
{
if (ix < VEC_length (locstr, *vp))
{
- gcc_assert (VEC_index (locstr, *vp, ix) == 0);
- VEC_replace (locstr, *vp, ix, str);
+ if (VEC_index (locstr, *vp, ix))
+ {
+ message_with_line (line_no, "repeated operand number %d", ix);
+ have_error = 1;
+ }
+ else
+ VEC_replace (locstr, *vp, ix, str);
}
else
{
@@ -399,7 +406,6 @@ main (int argc, char **argv)
struct code_ptr *link;
const char *name;
int insn_code_number;
- int line_no;
progname = "genextract";
@@ -423,6 +429,9 @@ main (int argc, char **argv)
}
}
+ if (have_error)
+ return FATAL_EXIT_CODE;
+
print_header ();
/* Write out code to handle peepholes and the insn_codes that it should
« no previous file with comments | « gcc/gcc/genemit.c ('k') | gcc/gcc/genflags.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698