Comments (7)
Thank you, @PierUgit, for comment on argument aliasing. I asked for help in Fortran Discourse because the issue was beyond my knowledge and may provide important insights for other Fortran users.
from stdlib.
Thank you.
I can reproduce the error on my Linux machine.
I will open a PR to replicate this issue and to test different compiler versions.
The error may be due to the deallocation of the component blocks of set2 caused by the intent(out) attribute for set1 >since set1 and set2 are the same variable.
It seems to be indeed the case.
Intel ifort compilers do not seem to have this issue (see #727 ). Therefore, is it a compiler issue or a code issue?
@milancurcic @awvwgk any idea?
Note: since the derived type bitset_large
does not contain pointer
s, I would suggest to remove the user-defined assignment procedure in favor of the intrinsic assignment operation
from stdlib.
Thank you for working on reproducing this issue on your Linux machine.
I don't know why the intel compiler does not reproduce the issue, but I suspect it is the compiler implementation.
The gfortran's behavior may be compiler-dependent, but the code does not seem to violate the Fortran standard, so I would like to fix the assignment procedure for bitset_large
to solve the issue.
from stdlib.
the code does not seem to violate the Fortran standard
I'm not sure... When assigning an object to itself, the routine assign_large
is called with the same actual object in the two arguments. Argument aliasing is normally not authorized... unless there are some exceptions?
from stdlib.
bitsetl(0) = bitsetl(0)
To make the program conform, my read is you can change the assignment to explicitly reference an expression on the right-hand side:
bitsetl(0) = ( bitsetl(0) )
And then file another report with GCC Bugzilla
for that processor.
This might satisfy the principle of least change for stdlib while enhancing that one processor if the support request gets worked on promptly.
from stdlib.
Thank you, @FortranFan, for the information from a different perspective from what we have been considering.
The modification you suggested would require changes in several places in the sorting procedures for fixing the issue occurring only with the bitset_large
type. We will also need to investigate the impact of the changes on the already supported types.
As @jvdp1 and @PierUgit said, the bitset_large
type has no pointer component, so removing the user-defined assignment operator for bitset_large
type is the easiest way to fix the issue.
from stdlib.
The modification you suggested would require changes in several places in the sorting procedures for fixing the issue occurring only with the
bitset_large
type. We will also need to investigate the impact of the changes on the already supported types.
As the sorting procedures are most likely used for sorting arrays of integers or reals, I am not in favour of such a solution, as it could impact the performances of these procedures. But it questions the versatility of the sorting procedures too.
from stdlib.
Related Issues (20)
- Nonstandard forward reference to 'lk' is not allowed in the same specification part causes compilation errors HOT 4
- Issue/Question about the output of `lstsq` HOT 3
- Building and testing stdlib on WSL1 with two fails HOT 5
- Adding matrix norms to the `stdlib_linalg` module. HOT 11
- Extend `sort_index` interface to allow `int32` index argument HOT 1
- Bug in the complex least-squares solver HOT 6
- Conflict between the pure function `stdlib_iparam2stage` and `openmp` HOT 1
- macos-12 builds failing again HOT 1
- `svd` not working for matrices with a single column HOT 6
- Elemental conversion functions from degrees to radians and vice versa. HOT 2
- Invalid author picture in API documentation web page
- Should installation set include paths specifying GCC (gfortran) version? HOT 5
- Build failure in test-drive with Windows/Intel compiler HOT 1
- Proposal: File handling procedures (goto, touch, grep) HOT 3
- Proposal: procedure to count number of words in a string HOT 4
- CI fails trying to install `pip` package on `msys2` HOT 2
- Use `main` as default branch HOT 1
- CI running twice, doesn't `on: [push]` suffice? HOT 1
- Internal stream I/O
- Neural network activation functions HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stdlib.