Fortran: Pass only the block for bounds check generation.
Refactors the array bounds check generation to pass only the code block, simplifying the function signature.
This commit simplifies the array bounds check generation in the Fortran compiler by modifying functions to only accept the code block as an argument, instead of the full scalarized expression. Since only the PRE block field of the scalarized expression was being used, this change cleans up the code base by directly passing the block.
In Details
The trans_array_bound_check function and its related callers in the Fortran compiler previously accepted the entire scalarized expression (SE) as an argument, but only the PRE block field was actually used for populating bounds checking code. This commit refactors the code to pass only the block as an argument, streamlining the function signature and improving code clarity.
For Context
In Fortran, array bounds checking ensures that programs don't access memory outside the allocated bounds of arrays. This commit simplifies the internal implementation of how the compiler generates this bounds checking code. Specifically, it changes the arguments passed to certain functions to only include the relevant code block, rather than a larger data structure that contained the code block. This makes the code easier to understand and maintain.