diff options
author | jvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-11-30 23:19:34 +0000 |
---|---|---|
committer | jvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-11-30 23:19:34 +0000 |
commit | 509db01a9bfed7f0c6123097ff360b039370be6f (patch) | |
tree | a6a4eca855c2c6509f4ac5945ab99dc7ff2c51e7 /libgfortran | |
parent | 9ee752ceff470afe58c2aed840daa4a3e1faa0d2 (diff) | |
download | gcc-509db01a9bfed7f0c6123097ff360b039370be6f.tar.gz |
2007-11-30 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libfortran/34291
* io/list_read.c (read_character): When reading an unquoted string,
return if special characters that could signify the end of the namelist
read are encountered.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@130548 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgfortran')
-rw-r--r-- | libgfortran/ChangeLog | 7 | ||||
-rw-r--r-- | libgfortran/io/list_read.c | 7 |
2 files changed, 12 insertions, 2 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index 69fca512c97..def1ef1c2ad 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,10 @@ +2007-11-30 Jerry DeLisle <jvdelisle@gcc.gnu.org> + + PR libfortran/34291 + * io/list_read.c (read_character): When reading an unquoted string, + return if special characters that could signify the end of the namelist + read are encountered. + 2007-11-29 Steven G. Kargl <kargls@comcast.net> PR libfortran/33583 diff --git a/libgfortran/io/list_read.c b/libgfortran/io/list_read.c index 96cef54e7af..586e356d105 100644 --- a/libgfortran/io/list_read.c +++ b/libgfortran/io/list_read.c @@ -896,7 +896,8 @@ read_character (st_parameter_dt *dtp, int length __attribute__ ((unused))) if (dtp->u.p.namelist_mode) { if (dtp->u.p.current_unit->flags.delim == DELIM_APOSTROPHE - || dtp->u.p.current_unit->flags.delim == DELIM_QUOTE) + || dtp->u.p.current_unit->flags.delim == DELIM_QUOTE + || c == '&' || c == '$' || c == '/') { unget_char (dtp, c); return; @@ -923,8 +924,9 @@ read_character (st_parameter_dt *dtp, int length __attribute__ ((unused))) goto get_string; } } - + l_push_char (dtp, c); + if (c == '=' || c == '(') { dtp->u.p.item_count = 0; @@ -936,6 +938,7 @@ read_character (st_parameter_dt *dtp, int length __attribute__ ((unused))) /* The string is too long to be a valid object name so assume that it is a string to be read in as a value. */ + dtp->u.p.item_count = 0; dtp->u.p.line_buffer_enabled = 1; goto get_string; } |