re PR libfortran/69651 ([6 Regession] Usage of unitialized pointer io/list_read.c)
authorJerry DeLisle <jvdelisle@gcc.gnu.org>
Mon, 15 Feb 2016 22:31:13 +0000 (22:31 +0000)
committerJerry DeLisle <jvdelisle@gcc.gnu.org>
Mon, 15 Feb 2016 22:31:13 +0000 (22:31 +0000)
commitfc12098dbe6144bf04ebec95adb0968a1d04da58
tree1d6efbd55b7f05ed50951724c9cfbc8a635f439f
parentf0516ca404ec64ddf9ab465b73077d672ee52fd4
re PR libfortran/69651 ([6 Regession] Usage of unitialized pointer io/list_read.c)

2016-02-15  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

PR libgfortran/69651
* io/list_read.c: Entire file trailing spaces removed.
(CASE_SEPARATORS): Remove '!'.
(is_separator): Add namelist mode as condition with '!'.
(push_char): Remove un-needed memset. (push_char4): Likewise and remove
'new' pointer. (eat_separator): Remove un-needed use of notify_std.
(read_logical): If '!' bang encountered when not in namelist mode got
bad_logical to give an error. (read_integer): Likewise reject '!'.
(read_character): Remove condition testing c = '!' which is now inside
the is_separator macro. (parse_real): Reject '!' unless in namelist mode.
(read_complex): Reject '!' unless in namelist mode. (read_real): Likewise
reject '!'.

PR libgfortran/69651
* gfortran.dg/read_bang.f90: New test.
* gfortran.dg/read_bang4.f90: New test.

From-SVN: r233436
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/read_bang.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/read_bang4.f90 [new file with mode: 0644]
libgfortran/ChangeLog
libgfortran/io/list_read.c