read-rtl.c (read_rtx_1): Give an error for EOF while looking for ']'.
authorJoseph Myers <joseph@codesourcery.com>
Fri, 2 Apr 2010 15:51:01 +0000 (16:51 +0100)
committerJoseph Myers <jsm28@gcc.gnu.org>
Fri, 2 Apr 2010 15:51:01 +0000 (16:51 +0100)
* read-rtl.c (read_rtx_1): Give an error for EOF while looking for
']'.

From-SVN: r157943

gcc/ChangeLog
gcc/read-rtl.c

index c9e4a39..a1e3c97 100644 (file)
@@ -1,3 +1,8 @@
+2010-04-02  Joseph Myers  <joseph@codesourcery.com>
+
+       * read-rtl.c (read_rtx_1): Give an error for EOF while looking for
+       ']'.
+
 2010-04-02  Richard Earnshaw  <rearnsha@arm.com>
 
        PR target/43469
index 9f922ae..1a0160d 100644 (file)
@@ -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));