https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69651
--- Comment #13 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> --- Author: jvdelisle Date: Tue Feb 16 00:38:18 2016 New Revision: 233442 URL: https://gcc.gnu.org/viewcvs?rev=233442&root=gcc&view=rev Log: 2016-02-15 Jerry DeLisle <jvdeli...@gcc.gnu.org> Backport from trunk PR libgfortran/69651 PR libgfortran/69668 * 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. Remove code related to DELIM_NONE. (parse_real): Reject '!' unless in namelist mode. (read_complex): Reject '!' unless in namelist mode. (read_real): Likewise reject '!'. * gfortran.dg/read_bang.f90: New test. * gfortran.dg/read_bang4.f90: New test. * gfortran.dg/namelist_87.f90: New test. * gfortran.dg/namelist_88.f90: New test. Added: branches/gcc-5-branch/gcc/testsuite/gfortran.dg/namelist_87.f90 branches/gcc-5-branch/gcc/testsuite/gfortran.dg/namelist_88.f90 branches/gcc-5-branch/gcc/testsuite/gfortran.dg/read_bang.f90 branches/gcc-5-branch/gcc/testsuite/gfortran.dg/read_bang4.f90 Modified: branches/gcc-5-branch/gcc/testsuite/ChangeLog branches/gcc-5-branch/libgfortran/ChangeLog branches/gcc-5-branch/libgfortran/io/list_read.c