aboutsummaryrefslogtreecommitdiffstats
path: root/meson/test cases/fortran/15 include/include_syntax.f90
blob: 5f7eb9f2e15824a7e61a822598ed93d6767ef1a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
program test_include_syntax

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