re PR fortran/31645 (Error on reading Byte Order Mark)
authorFrancois-Xavier Coudert <fxcoudert@gcc.gnu.org>
Sun, 29 Apr 2007 10:45:57 +0000 (10:45 +0000)
committerFrançois-Xavier Coudert <fxcoudert@gcc.gnu.org>
Sun, 29 Apr 2007 10:45:57 +0000 (10:45 +0000)
commitcaef7872f0dc4a62dfc449785974eaa179b0a449
treeebf5c3a3515c694847d6fb1e9ca78d6d75adcd53
parent70ec16f7c29de16e0ec824de9a8979ff0a902488
re PR fortran/31645 (Error on reading Byte Order Mark)

PR fortran/31645

* scanner.c (load_file): Discard the byte order mark if one is
found on the first non-preprocessor line of a file.

* testsuite/gfortran.dg/bom_error.f90: New test.
* testsuite/gfortran.dg/bom_include.f90: New test.
* testsuite/gfortran.dg/bom_UTF16-LE.f90: New test.
* testsuite/gfortran.dg/bom_UTF16-BE.f90: New test.
* testsuite/gfortran.dg/bom_UTF-8.f90: New test.
* testsuite/gfortran.dg/bom_UTF-32.f90: New test.
* testsuite/gfortran.dg/bom_UTF-8.F90: New test.
* testsuite/gfortran.dg/bom_include.inc: New file.

From-SVN: r124274
gcc/fortran/ChangeLog
gcc/fortran/scanner.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/bom_UTF-32.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/bom_UTF-8.F90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/bom_UTF-8.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/bom_UTF16-BE.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/bom_UTF16-LE.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/bom_error.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/bom_include.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/bom_include.inc [new file with mode: 0644]