Bug 26150 - Initialize local scalar variables
Summary: Initialize local scalar variables
Status: RESOLVED DUPLICATE of bug 20441
Alias: None
Product: gcc
Classification: Unclassified
Component: fortran (show other bugs)
Version: 4.2.0
: P3 enhancement
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-02-07 09:04 UTC by Francois-Xavier Coudert
Modified: 2006-02-07 14:18 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2006-02-07 09:06:13


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Francois-Xavier Coudert 2006-02-07 09:04:15 UTC
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.
Comment 1 Andrew Pinski 2006-02-07 12:37:06 UTC
Isn't this is a dup of bug 20441?
Comment 2 Francois-Xavier Coudert 2006-02-07 12:48:10 UTC
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 ***
Comment 3 Andrew Pinski 2006-02-07 14:18:27 UTC
(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).