Add module graph fixtures
- SHA
ad2a96d1c953986a729fd29ca31dfce6c023a004- Parents
-
b9364ba - Tree
f29c10f
ad2a96d
ad2a96d1c953986a729fd29ca31dfce6c023a004b9364ba
f29c10ffixtures/README.mdmodified@@ -23,3 +23,6 @@ The `runtime-completion`, `runtime-control-flow`, and `runtime-stateful` | ||
| 23 | 23 | families now live there as bench-owned inputs, along with the |
| 24 | 24 | `runtime-behavior` slice (`mixed_types`, `where_construct`, |
| 25 | 25 | `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 | |