This checks the storage conflict in arguments of elemental call. It is
dangerous to use in that way, so try to report one warning. The dynamic
analysis for pointers and non-compile time array indices is not covered.
Also, do not check the array indices since it is not easy to know if
the arguments use different slices.
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
program m integer :: x, y, z = 1 equivalence(x, y) call sub3(x, y, z) print *, x contains subroutine sub3(a, b, c) integer :: a, b, c a = c b = c + 1 end end
In the long term, there should be warnings for the scenarios such as the above test case. Although this is not one priority work, it seems that we should have one storage conflict static check finally. Is this right?
Comment Actions
You will probably have to wait till WARNINGs support is enabled in test_errors.py (https://reviews.llvm.org/D125804).
Comment Actions
Thanks for the notice. I didn't notice the warnings are not checked for the tests under /semantics.