diff options
author | Angelos Mouzakitis <a.mouzakitis@virtualopensystems.com> | 2023-10-10 14:33:42 +0000 |
---|---|---|
committer | Angelos Mouzakitis <a.mouzakitis@virtualopensystems.com> | 2023-10-10 14:33:42 +0000 |
commit | af1a266670d040d2f4083ff309d732d648afba2a (patch) | |
tree | 2fc46203448ddcc6f81546d379abfaeb323575e9 /meson/test cases/fortran/2 modules | |
parent | e02cda008591317b1625707ff8e115a4841aa889 (diff) |
Change-Id: Iaf8d18082d3991dec7c0ebbea540f092188eb4ec
Diffstat (limited to 'meson/test cases/fortran/2 modules')
-rw-r--r-- | meson/test cases/fortran/2 modules/comment_mod.f90 | 6 | ||||
-rw-r--r-- | meson/test cases/fortran/2 modules/meson.build | 9 | ||||
-rw-r--r-- | meson/test cases/fortran/2 modules/mymod.F90 | 8 | ||||
-rw-r--r-- | meson/test cases/fortran/2 modules/prog.f90 | 12 |
4 files changed, 35 insertions, 0 deletions
diff --git a/meson/test cases/fortran/2 modules/comment_mod.f90 b/meson/test cases/fortran/2 modules/comment_mod.f90 new file mode 100644 index 000000000..917f6be9a --- /dev/null +++ b/meson/test cases/fortran/2 modules/comment_mod.f90 @@ -0,0 +1,6 @@ +module line ! inline comment +implicit none + +real :: length + +end module line diff --git a/meson/test cases/fortran/2 modules/meson.build b/meson/test cases/fortran/2 modules/meson.build new file mode 100644 index 000000000..c9bfd8dae --- /dev/null +++ b/meson/test cases/fortran/2 modules/meson.build @@ -0,0 +1,9 @@ +project('modules', 'fortran', + default_options : ['default_library=static']) + +commented = library('commented', 'comment_mod.f90') + +# Have one file with an upper case file extension. +e = executable('modprog', 'mymod.F90', 'prog.f90', + link_with: commented) +test('moduletest', e) diff --git a/meson/test cases/fortran/2 modules/mymod.F90 b/meson/test cases/fortran/2 modules/mymod.F90 new file mode 100644 index 000000000..a45f5c982 --- /dev/null +++ b/meson/test cases/fortran/2 modules/mymod.F90 @@ -0,0 +1,8 @@ +! module circle to be sure module regex doesn't allow commented modules + +module circle +implicit none + +real, parameter :: pi = 4.*atan(1.) +real :: radius +end module circle diff --git a/meson/test cases/fortran/2 modules/prog.f90 b/meson/test cases/fortran/2 modules/prog.f90 new file mode 100644 index 000000000..ffdff0506 --- /dev/null +++ b/meson/test cases/fortran/2 modules/prog.f90 @@ -0,0 +1,12 @@ +program main +use circle, only: pi +use line, only: length +implicit none + +print *,'pi=',pi + +length = pi +print *, length + +end program + |