Please check, because I have no idea if I have done it. It’s very complicated for me!
Thanks @FLNewbiee ! Did you submit it here: Pull requests · fortran-lang/fpm · GitHub, I can’t see it there yet.
@certik
Hm, I had no permission to make pull request to the main. I created a branch (don’t ask me where ) named FLNewbiee. I was asked to publish it (don’t ask me where). I did it. After I was asked to make my address published. I did it. After I made the PR. All of this through Github desktop in which I cloned the fortran-lang/fpm. DaVinci code, in short.
Finally, I managed to do it. Now, we can see the PR.
Great job, @FLNewbiee
Your moniker is a misnomer!
I can see the PR now: Set fcheck=all by GHNewbiee · Pull Request #793 · fortran-lang/fpm · GitHub, awesome, thanks! Congratulations on your first PR.
The downside for this is that a programmer might query an array like this, get reasonable looking results, and then go on to use that information assuming that x(:)
was allocated (or was otherwise a legitimate dummy array). That is, it gives the programmer a false sense of security because there is definitely an error in the code, and instead of somehow telling the programmer about the error, it overlooks it instead. I would not want to put language into the standard that requires a programming error to be overlooked, especially in cases like this where the compiler has enough information to recognize that an error has occurred. I would rather make changes to the languge in the other direction, that requires the error to be reported (at least as a warning).
That works within a program or a subroutine, but not within a module or within a derived type. It is those latter situations where currently allocation tests must be performed throughout the code. If it were possible in these cases to declare allocatable variables to be in an allocated state, then in many situations the variables would always remain in an allocated state and those allocation tests could be eliminated.