Commit c5d97f6e by Ian Lance Taylor Committed by Ian Lance Taylor

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
parent f6254da4
2005-02-11 Ian Lance Taylor <ian@airs.com> 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 * tree.c (build_function_type_list): Work correctly if there are
no arguments. no arguments.
......
...@@ -1253,6 +1253,9 @@ read_rtx_1 (FILE *infile) ...@@ -1253,6 +1253,9 @@ read_rtx_1 (FILE *infile)
memcpy (&return_vec->elem[0], obstack_finish (&vector_stack), memcpy (&return_vec->elem[0], obstack_finish (&vector_stack),
list_counter * sizeof (rtx)); 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; XVEC (return_rtx, i) = return_vec;
obstack_free (&vector_stack, NULL); obstack_free (&vector_stack, NULL);
/* close bracket gotten */ /* close bracket gotten */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment