From ed99630c871368f8151f4de0a7bd0843fada4615 Mon Sep 17 00:00:00 2001 From: jsm28 Date: Fri, 2 Apr 2010 15:51:01 +0000 Subject: [PATCH] * read-rtl.c (read_rtx_1): Give an error for EOF while looking for ']'. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@157943 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 5 +++++ gcc/read-rtl.c | 2 ++ 2 files changed, 7 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c9e4a39a900..a1e3c97f76f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2010-04-02 Joseph Myers + + * read-rtl.c (read_rtx_1): Give an error for EOF while looking for + ']'. + 2010-04-02 Richard Earnshaw PR target/43469 diff --git a/gcc/read-rtl.c b/gcc/read-rtl.c index 9f922ae8cd9..1a0160d3589 100644 --- a/gcc/read-rtl.c +++ b/gcc/read-rtl.c @@ -1595,6 +1595,8 @@ read_rtx_1 (FILE *infile, struct map_value **mode_maps) obstack_init (&vector_stack); while ((c = read_skip_spaces (infile)) && c != ']') { + if (c == EOF) + fatal_expected_char (infile, ']', c); ungetc (c, infile); list_counter++; obstack_ptr_grow (&vector_stack, read_rtx_1 (infile, mode_maps)); -- 2.11.0