-
Notifications
You must be signed in to change notification settings - Fork 184
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
optval
issue in stdlib_random
module
#592
Comments
The reason I modified the |
@zoziha For what it's worth I've previously run into compiler problems at this part of the code (when using inter-procedural optimization). Although it would be good to hear from @Jim-215-Fisher, to my knowledge the line |
To give a bit more context - if I compile stdlib with:
then I get a segfault on the test program in But if I remove the link-time-optimization then it works OK, i.e. using
the same test passes. |
This removes the use of the option `-flto` in the instructions to compile with a Makefile. The reason for doing that is that currently, `-flto` can cause some tests to break - see [discussion here](fortran-lang#592 (comment)).
The following may be relevant. concerning linkage time optimization causing segmentation fault |
Link time optimization causing segmentation faults from a scholars context. |
Undefined behaviours in computer programming, a scholarly reading list and bibliography, because undefined behaviors lead to segmentation faults. |
Detecting undefined behavious in computer programming a scholarly bibliography and reading list, because undefined behaviours can lead to segmentation faults. |
Description
During a development, I found an unexpected situation: swapping
optval(s, si)
in thestdlib_random
forif (present(s)) then ..
form, and unit tests ofmacos
andubuntu
systems failed.(see https://github.com/zoziha/stdlib/commits/update_random)
Possible Problem
stdlib/src/stdlib_random.fypp
Line 123 in 100f760
Maybe:
cc @Jim-215-Fisher
Expected Behaviour
CI failed: https://github.com/zoziha/stdlib/actions/runs/1554566528
Expected behaviour:
optval
==if (present(..)) then ..
Version of stdlib
100f760
Platform and Architecture
MacOS, GFortran 9 10 11; Ubuntu, GFortran 10
Additional Information
No response
The text was updated successfully, but these errors were encountered: