This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran 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]

Re: Question about -Wuninitialized


On Tue, Jul 25, 2006 at 02:41:12PM +0200, Salvatore Filippone wrote:
> Hi there, 
> First let me say that -Wuninitialized and -Wunused are really great
> tools. 
> 
> However (you guessed there was  an issue, didn't you?) I would be
> grateful to anybody who can illuminate me on the following. 
> 
> I have a small sample attached, and it generates the output shown below.
> Two questions:
> 
> 1. Why is the compiler warning about "ia.0" potentially uninitialized?
> At first sight, this seems to be related to the IA(:) variable, which is
> declared INOUT, so I don't understand why it should be initialized. Or
> is it about something else? Moreover, it looks like a case simple enough
> to figure out that IA is only used if present, so no need for "May be"
> (but maybe I am wrong?)
> 
> 2. Why does the compiler complain about stride.1 and ubound.0 which are
> not visible to the user? I figure they are variables internal to the
> descriptors for allocatable arrays, they should be reported under the
> array variable name...

These options are common to the gcc middle and/or backend.
The checks are done after after gfortran has generated 
GIMPLE.  It may be possible to mark these symbols with
something like the gccism of ATTRIBUTE_UNUSED, but I haven't
investigates the problem.

-- 
steve



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