parent
40a3a6c3d0
commit
c8d144b064
4 changed files with 32 additions and 3 deletions
@ -0,0 +1,23 @@ |
||||
implicit none |
||||
|
||||
integer :: x, y |
||||
|
||||
x = 1 |
||||
y = 0 |
||||
|
||||
! include "timestwo.f90" |
||||
|
||||
include "timestwo.f90" ! inline comment check |
||||
if (x/=2) error stop 'failed on first include' |
||||
|
||||
! leading space 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 |
@ -1,4 +1,8 @@ |
||||
project('Inclusive', 'fortran') |
||||
project('Inclusive', 'fortran', |
||||
meson_version: '>= 0.51.1') |
||||
|
||||
exe = executable('incexe', 'main.f90') |
||||
test('Fortran include files', exe) |
||||
hier_exe = executable('include_hierarchy', 'include_hierarchy.f90') |
||||
test('Fortran include file hierarchy', hier_exe) |
||||
|
||||
syntax_exe = executable('include_syntax', 'include_syntax.f90') |
||||
test('Fortran include file syntax', syntax_exe) |
@ -0,0 +1,2 @@ |
||||
x = 2*x |
||||
y = y+1 |
Loading…
Reference in new issue