tenseleyflow/bencch / ad2a96d

Browse files

Add module graph fixtures

Authored by espadonne
SHA
ad2a96d1c953986a729fd29ca31dfce6c023a004
Parents
b9364ba
Tree
f29c10f

9 changed files

StatusFile+-
M fixtures/README.md 3 0
A fixtures/modules/module_chain/main.f90 7 0
A fixtures/modules/module_chain/math_seed.f90 4 0
A fixtures/modules/module_chain/math_values.f90 5 0
A fixtures/modules/rename_only/main.f90 7 0
A fixtures/modules/rename_only/math_aliases.f90 5 0
A fixtures/modules/submodule_future/child_impl.f90 6 0
A fixtures/modules/submodule_future/main.f90 7 0
A fixtures/modules/submodule_future/parent_mod.f90 8 0
fixtures/README.mdmodified
@@ -23,3 +23,6 @@ The `runtime-completion`, `runtime-control-flow`, and `runtime-stateful`
2323
 families now live there as bench-owned inputs, along with the
2424
 `runtime-behavior` slice (`mixed_types`, `where_construct`,
2525
 `derived_type_basic`, and `string_fixed`).
26
+
27
+Sprint 7 begins carving authored module graphs into `fixtures/modules/` so the
28
+bench can model ordered multi-file inputs instead of only isolated sources.
fixtures/modules/module_chain/main.f90added
@@ -0,0 +1,7 @@
1
+! CHECK: 42
2
+program main
3
+    use math_values, only: doubled
4
+    implicit none
5
+
6
+    print *, doubled
7
+end program main
fixtures/modules/module_chain/math_seed.f90added
@@ -0,0 +1,4 @@
1
+module math_seed
2
+    implicit none
3
+    integer, parameter :: seed = 21
4
+end module math_seed
fixtures/modules/module_chain/math_values.f90added
@@ -0,0 +1,5 @@
1
+module math_values
2
+    use math_seed, only: seed
3
+    implicit none
4
+    integer, parameter :: doubled = seed + seed
5
+end module math_values
fixtures/modules/rename_only/main.f90added
@@ -0,0 +1,7 @@
1
+! CHECK: 17
2
+program main
3
+    use math_aliases, only: chosen => payload
4
+    implicit none
5
+
6
+    print *, chosen
7
+end program main
fixtures/modules/rename_only/math_aliases.f90added
@@ -0,0 +1,5 @@
1
+module math_aliases
2
+    implicit none
3
+    integer, parameter :: payload = 17
4
+    integer, parameter :: spare = 99
5
+end module math_aliases
fixtures/modules/submodule_future/child_impl.f90added
@@ -0,0 +1,6 @@
1
+submodule (parent_mod) child_impl
2
+contains
3
+    module procedure say_hi
4
+        print *, "hi"
5
+    end procedure say_hi
6
+end submodule child_impl
fixtures/modules/submodule_future/main.f90added
@@ -0,0 +1,7 @@
1
+! CHECK: hi
2
+program main
3
+    use parent_mod
4
+    implicit none
5
+
6
+    call say_hi()
7
+end program main
fixtures/modules/submodule_future/parent_mod.f90added
@@ -0,0 +1,8 @@
1
+module parent_mod
2
+    implicit none
3
+
4
+    interface
5
+        module subroutine say_hi()
6
+        end subroutine say_hi
7
+    end interface
8
+end module parent_mod