This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/52370] Spurious "may be used uninitialized" warning for check of optional argument


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]