false -Wmaybe-uninitialized?
Steve Kargl
sgk@troutmask.apl.washington.edu
Fri Nov 27 17:04:00 GMT 2015
On Fri, Nov 27, 2015 at 01:53:06AM -0800, Anton Shterenlikht wrote:
> $ cat z.f90
> character(:), allocatable :: z
> z = "mumu"
> end
>
> $ gfortran -Wall z.f90
> z.f90:2:0:
>
> z = "mumu"
> ^
> Warning: '.z' may be used uninitialized in this function [-Wmaybe-uninitialized]
> $
>
> Is this warning appropriate here?
Of course not.
> Is this statement not initialisation?
Of course it is. You'll note that warning has '.z'
not 'z'. '.z' is is part of its internal representation.
Use -Wno-maybe-unitialized.
--
Steve
More information about the Fortran
mailing list