Add multi-hop module graph fixtures
- SHA
3e4c6f531b8f2e345688b5b294088f6bad070b2d- Parents
-
4c24f8f - Tree
ff209ce
3e4c6f5
3e4c6f531b8f2e345688b5b294088f6bad070b2d4c24f8f
ff209cefixtures/README.mdmodified@@ -27,4 +27,5 @@ families now live there as bench-owned inputs, along with the | |||
| 27 | Sprint 7 begins carving authored module graphs into `fixtures/modules/` so the | 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. | 28 | bench can model ordered multi-file inputs instead of only isolated sources. |
| 29 | That corpus now covers module-use chains, renaming, module procedures, and an | 29 | That corpus now covers module-use chains, renaming, module procedures, and an |
| 30 | -early submodule probe, plus visibility and fan-in graph families. | 30 | +early submodule probe, plus visibility, fan-in, re-export, and diamond-style |
| 31 | +dependency graph families. | ||
fixtures/modules/diamond_merge/left_branch.f90added@@ -0,0 +1,6 @@ | |||
| 1 | +module left_branch | ||
| 2 | + use shared_seed, only: seed | ||
| 3 | + implicit none | ||
| 4 | + | ||
| 5 | + integer, parameter :: left = seed - 3 | ||
| 6 | +end module left_branch | ||
fixtures/modules/diamond_merge/main.f90added@@ -0,0 +1,7 @@ | |||
| 1 | +! CHECK: 22 | ||
| 2 | +program main | ||
| 3 | + use merged_total, only: total | ||
| 4 | + implicit none | ||
| 5 | + | ||
| 6 | + print *, total | ||
| 7 | +end program main | ||
fixtures/modules/diamond_merge/merged_total.f90added@@ -0,0 +1,7 @@ | |||
| 1 | +module merged_total | ||
| 2 | + use left_branch, only: left | ||
| 3 | + use right_branch, only: right | ||
| 4 | + implicit none | ||
| 5 | + | ||
| 6 | + integer, parameter :: total = left + right | ||
| 7 | +end module merged_total | ||
fixtures/modules/diamond_merge/right_branch.f90added@@ -0,0 +1,6 @@ | |||
| 1 | +module right_branch | ||
| 2 | + use shared_seed, only: seed | ||
| 3 | + implicit none | ||
| 4 | + | ||
| 5 | + integer, parameter :: right = seed + 5 | ||
| 6 | +end module right_branch | ||
fixtures/modules/reexport_chain/consumer_values.f90added@@ -0,0 +1,6 @@ | |||
| 1 | +module consumer_values | ||
| 2 | + use relay_values, only: lifted | ||
| 3 | + implicit none | ||
| 4 | + | ||
| 5 | + integer, parameter :: final_value = lifted + lifted | ||
| 6 | +end module consumer_values | ||
fixtures/modules/reexport_chain/main.f90added@@ -0,0 +1,7 @@ | |||
| 1 | +! CHECK: 18 | ||
| 2 | +program main | ||
| 3 | + use consumer_values, only: final_value | ||
| 4 | + implicit none | ||
| 5 | + | ||
| 6 | + print *, final_value | ||
| 7 | +end program main | ||
fixtures/modules/reexport_chain/relay_values.f90added@@ -0,0 +1,6 @@ | |||
| 1 | +module relay_values | ||
| 2 | + use seed_values, only: seed | ||
| 3 | + implicit none | ||
| 4 | + | ||
| 5 | + integer, parameter :: lifted = seed + 4 | ||
| 6 | +end module relay_values | ||
fixtures/modules/reexport_chain/seed_values.f90added@@ -0,0 +1,4 @@ | |||
| 1 | +module seed_values | ||
| 2 | + implicit none | ||
| 3 | + integer, parameter :: seed = 5 | ||
| 4 | +end module seed_values | ||