Skip to content

Commit 7cd0c20

Browse files
authored
[Fortran/gfortran] Use -O0 for cshift_bounds_[34]. (#191)
* [Fortran/gfortran] Use -O0 for cshift_bounds_[34]. There is no support for `-fbounds-check` in Flang yet. There is a related feature request at https://github.com/orgs/llvm/projects/12?pane=issue&itemId=29048733 Until then, the optimizations may replace the Fortran runtime calls (which usually provide all the error checking) with inline sequences that do not check for errors to provide the fast code (e.g. llvm/llvm-project#119480). For the time being I would like to explicitly pass `-O0` to these tests. * Disabled tests. * Reverted tests.cmake
1 parent 4f14adb commit 7cd0c20

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Fortran/gfortran/regression/DisabledFiles.cmake

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1642,6 +1642,12 @@ file(GLOB FAILING_FILES CONFIGURE_DEPENDS
16421642
maxloc_bounds_5.f90
16431643
ptr_func_assign_1.f08
16441644

1645+
# Tests looking for runtime errors (e.g., bound checks). Correctly
1646+
# caught by flang runtime, but not caught with Flang optimizations,
1647+
# e.g. due to intrinsics inlining. These can pass with -O0:
1648+
cshift_bounds_3.f90
1649+
cshift_bounds_4.f90
1650+
16451651
# Bad test, assigning an 11 elements array to a 12 elements array.
16461652
transfer_array_intrinsic_4.f90
16471653

0 commit comments

Comments
 (0)