aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>2005-02-11 15:09:53 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2005-02-11 15:09:53 +0000
commitc5d97f6e5dd6ec31cceccc5c516bf70c85948669 (patch)
tree5fb965182f3c4a98a305b3e83552e71214696219
parentf6254da44552dfc0c2b98dcfbd9f3b846976d235 (diff)
downloadgcc-c5d97f6e5dd6ec31cceccc5c516bf70c85948669.zip
gcc-c5d97f6e5dd6ec31cceccc5c516bf70c85948669.tar.gz
gcc-c5d97f6e5dd6ec31cceccc5c516bf70c85948669.tar.bz2
read-rtl.c (read_rtx_1): Give fatal error if we see a vector with no elements.
* read-rtl.c (read_rtx_1): Give fatal error if we see a vector with no elements. From-SVN: r94879
-rw-r--r--gcc/ChangeLog3
-rw-r--r--gcc/read-rtl.c3
2 files changed, 6 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index b5a284a..8740f2b 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,8 @@
2005-02-11 Ian Lance Taylor <ian@airs.com>
+ * read-rtl.c (read_rtx_1): Give fatal error if we see a vector
+ with no elements.
+
* tree.c (build_function_type_list): Work correctly if there are
no arguments.
diff --git a/gcc/read-rtl.c b/gcc/read-rtl.c
index c9a3fee..874dd3b 100644
--- a/gcc/read-rtl.c
+++ b/gcc/read-rtl.c
@@ -1253,6 +1253,9 @@ read_rtx_1 (FILE *infile)
memcpy (&return_vec->elem[0], obstack_finish (&vector_stack),
list_counter * sizeof (rtx));
}
+ else if (format_ptr[i] == 'E')
+ fatal_with_file_and_line (infile,
+ "vector must have at least one element");
XVEC (return_rtx, i) = return_vec;
obstack_free (&vector_stack, NULL);
/* close bracket gotten */