From c5d97f6e5dd6ec31cceccc5c516bf70c85948669 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Fri, 11 Feb 2005 15:09:53 +0000 Subject: 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 --- gcc/ChangeLog | 3 +++ gcc/read-rtl.c | 3 +++ 2 files changed, 6 insertions(+) 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 + * 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 */ -- cgit v1.1