It would be nice having a compile-time option to initialize local scalar variables, to zero (.false. for logical, 0 for integer and 0.0 for real) and to NaN (for floating-point types). g77 had -finit-local-zero, Intel has -zero, we could have -finit-local-zero and -finit-local-nan.
Isn't this is a dup of bug 20441?
Yes, it's a duplicate of 20441 (which I didn't know about). Although I don't understand your comment in PR20441 about -finit-local-zero being only useful for old codes. *** This bug has been marked as a duplicate of 20441 ***
(In reply to comment #2) > Although I don't understand your comment in PR20441 about -finit-local-zero > being only useful for old codes. Because From what I remember whne I filed the bug, it was mentioned that it should be used only with old code (then again it was a while back).