diff options
Diffstat (limited to 'test cases/fortran/15 include/include_tests.f90')
| -rw-r--r-- | test cases/fortran/15 include/include_tests.f90 | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/test cases/fortran/15 include/include_tests.f90 b/test cases/fortran/15 include/include_tests.f90 new file mode 100644 index 000000000..56e461977 --- /dev/null +++ b/test cases/fortran/15 include/include_tests.f90 @@ -0,0 +1,24 @@ +implicit none + +integer :: x, y + +x = 1 +y = 0 + +! include "timestwo.f90" + +! double quote and inline comment check +include "timestwo.f90" ! inline comment check +if (x/=2) error stop 'failed on first include' + +! leading space and single quote check + include 'timestwo.f90' +if (x/=4) error stop 'failed on second include' + +! Most Fortran compilers can't handle the non-standard #include, +! including (ha!) Flang, Gfortran, Ifort and PGI. +! #include "timestwo.f90" + +print *, 'OK: Fortran include tests: x=',x + +end program
\ No newline at end of file |
