This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/52370] Spurious "may be used uninitialized" warning for check of optional argument
- From: "burnus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 24 Feb 2012 14:05:32 +0000
- Subject: [Bug fortran/52370] Spurious "may be used uninitialized" warning for check of optional argument
- Auto-submitted: auto-generated
- References: <bug-52370-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52370
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |diagnostic
--- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-02-24 14:05:32 UTC ---
(In reply to comment #1)
> The warning is not printed for the last line where one dereferences a pointer
> (line 8), but for the "b.0 =" assignment.
I have the impression that problem is rather line 8 - i.e. related to the
pointer dereference. The warning vanishes if one comments/moves the "a =" line
- unless "b" is volatile - or if one makes "a" a VALUE or a function result. I
assume that's because it is then simpler to merge the implicitly and the
explicitly created "if (present(b))" lines.