Skip to content

[Fortran/gfortran] Use -O0 for cshift_bounds_[34]. #191

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Dec 12, 2024

Conversation

vzakhari
Copy link
Contributor

@vzakhari vzakhari commented Dec 12, 2024

There is no support for -fbounds-check in Flang yet.
There is a related feature request at Flang features to be implemented
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 disable these tests.

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.
@vzakhari vzakhari requested a review from tarunprabhu December 12, 2024 16:44
@tarunprabhu
Copy link
Contributor

The tests.cmake file is auto-generated and not meant to be edited by hand. Support to override some gfortran attributes was recently added. The first PR to make use of this is under review. This could be used to do what you want. Right now, there is no support to override command-line options as you have requested, but it is next on my list of things to do.

For now, if these are causing failures, you could disable the tests by adding them to Fortran/gfortran/regression/DisabledFiles.cmake. If you could leave a comment indicating that they can be enabled by passing -O0, I will know to enable them when I add support for overriding command-line options.

@vzakhari
Copy link
Contributor Author

Thank you, Tarun! I will disable the tests with a comment.

Copy link
Contributor

@tarunprabhu tarunprabhu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the change, Slava.

@vzakhari vzakhari merged commit 7cd0c20 into llvm:main Dec 12, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants