Skip to content

Commit

Permalink
[Fortran/gfortran] Use -O0 for cshift_bounds_[34]. (#191)
Browse files Browse the repository at this point in the history
* [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
  • Loading branch information
vzakhari authored Dec 12, 2024
1 parent 4f14adb commit 7cd0c20
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Fortran/gfortran/regression/DisabledFiles.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -1642,6 +1642,12 @@ file(GLOB FAILING_FILES CONFIGURE_DEPENDS
maxloc_bounds_5.f90
ptr_func_assign_1.f08

# Tests looking for runtime errors (e.g., bound checks). Correctly
# caught by flang runtime, but not caught with Flang optimizations,
# e.g. due to intrinsics inlining. These can pass with -O0:
cshift_bounds_3.f90
cshift_bounds_4.f90

# Bad test, assigning an 11 elements array to a 12 elements array.
transfer_array_intrinsic_4.f90

Expand Down

0 comments on commit 7cd0c20

Please sign in to comment.