lang.opt (fdec-include): New option.
authorJakub Jelinek <jakub@redhat.com>
Wed, 21 Nov 2018 08:07:51 +0000 (09:07 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Wed, 21 Nov 2018 08:07:51 +0000 (09:07 +0100)
commit7c74e813c9de0562b447f20fb51de8d36ea396bb
tree87bd54b85e5e380e98822908a61c166c499c6438
parentb8923037ef1b229326b7f238580d91bbbb76b8ff
lang.opt (fdec-include): New option.

* lang.opt (fdec-include): New option.
* options.c (set_dec_flags): Set also flag_dec_include.
* scanner.c (include_line): Change return type from bool to int.
In fixed form allow spaces in between include keyword letters.
For -fdec-include, allow in fixed form 0 in column 6.  With
-fdec-include return -1 if the parsed line is not full include
statement and it could be successfully completed on continuation
lines.
(include_stmt): New function.
(load_file): Adjust include_line caller.  If it returns -1, keep
trying include_stmt until it stops returning -1 whenever adding
further line of input.

* gfortran.dg/include_10.f: New test.
* gfortran.dg/include_10.inc: New file.
* gfortran.dg/include_11.f: New test.
* gfortran.dg/include_12.f: New test.
* gfortran.dg/include_13.f90: New test.
* gfortran.dg/gomp/include_1.f: New test.
* gfortran.dg/gomp/include_1.inc: New file.
* gfortran.dg/gomp/include_2.f90: New test.

Co-Authored-By: Mark Eggleston <mark.eggleston@codethink.com>
From-SVN: r266337
13 files changed:
gcc/fortran/ChangeLog
gcc/fortran/lang.opt
gcc/fortran/options.c
gcc/fortran/scanner.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/gomp/include_1.f [new file with mode: 0644]
gcc/testsuite/gfortran.dg/gomp/include_1.inc [new file with mode: 0644]
gcc/testsuite/gfortran.dg/gomp/include_2.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/include_10.f [new file with mode: 0644]
gcc/testsuite/gfortran.dg/include_10.inc [new file with mode: 0644]
gcc/testsuite/gfortran.dg/include_11.f [new file with mode: 0644]
gcc/testsuite/gfortran.dg/include_12.f [new file with mode: 0644]
gcc/testsuite/gfortran.dg/include_13.f90 [new file with mode: 0644]