[Bug fortran/58009] Elements with same value in vector subscript in variable definition context
burnus at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sun Jul 28 11:25:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58009
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |burnus at gcc dot gnu.org
--- Comment #4 from Tobias Burnus <burnus at gcc dot gnu.org> ---
(In reply to Thomas Koenig from comment #3)
> a([i,j,i]) = ...
> for which I cannot think of an algorithm which is O(n),
> so I guess it will have to be O(n**2).
Given that most code has either no or only very few vector subscripts, it
shouldn't matter too much.
Additionally, I expect that one either has only very few elements - or one uses
A([array]) which is not compile-time checkable.
The only case where one might have a lot of elements in the vector is in
generated code - but that looks as a very, very special case for which one does
not need to performance optimize, I'd guess.
Side note: I tried your example with NAG f95 5.1 (of 2007) - and it does not
detect the issue - neither at compile nor at runtime (-C=all).
More information about the Gcc-bugs
mailing list