- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is there a way to force memory to be preset to zero using IVF? We have some legacy Fortran code that was being built with CVF; it relies on memory being preset to zero (many variables are not explicitly initialized). When we build it using IVF, which apparently doesn't preset memory to zero, we get a slew of runtime errors, as you would expect. Ultimately the code should be corrected so that all variables are initialized, but in the meantime, is there something we can do?
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
/Qzero[-] enable/disable(DEFAULT) implicit initialization to zero of local
scalar variables of intrinsic type INTEGER, REAL, COMPLEX,
or LOGICAL that are not saved or initialized
/Qnobss-init disable placement of zero-initialized vars in BSS (use DATA)
This will not handle wipe of allocated memory
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
/Qzero /Qsave should help. You need to use /Qsave. CVF did not initialize to zero but it did apply SAVE semantics by default which might make it look as if it zero-initialized.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jim and Steve -
Thanks for the help.
- Steve

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page