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: [Patch, libgfortran] PR 41219 Silence uninitialized variable warning


>
>>>>> the patch below fixes the "use of uninitialized variable" warning in
>>>>> unix.c. It's a spurious warning as the fstat() call will initialize
>>>>> the stat struct, but gcc can't see it.
>>>>>           
>>>> Huh, that looks odd.  I bet this is SRA at work.
>>>>
>>>>         
>>>       
> Moreover, I have now actually looked at the dumps and both SRA and
> early SRA do nothing in that function.
>   

The error was due to a bug in the header file for MinGW-win64 which
contained some inline fstat() work, but did not intialize the struct if
a failure occured. This is said to be fixed in SVN and said to produce
no warning. See last comment in the PR for details.

Tobias


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