This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/27589] Add compiler flag to check for uninitalized values at runtime
- From: "burnus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 22 Jun 2007 13:15:42 -0000
- Subject: [Bug fortran/27589] Add compiler flag to check for uninitalized values at runtime
- References: <bug-27589-1719@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #4 from burnus at gcc dot gnu dot org 2007-06-22 13:15 -------
(In reply to comment #3)
> Dump a valid program which contains equivalence to show a harder case for the
> checks (NAG f95 chokes on it).
Actually this is wrong according to the Section 16.5.6 of the F2003 standard:
"When a variable of a given type becomes defined, all associated
variables of different type become undefined." There then follows an
exception that allows REAL and COMPLEX to be equivalenced and not
be undefined in this circumstance.
Thus one should check for this as well (but having a note in the documentation
for this case would make sense too.)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27589