https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116254

Paul Thomas <pault at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |pault at gcc dot gnu.org

--- Comment #13 from Paul Thomas <pault at gcc dot gnu.org> ---
(In reply to Richard Sandiford from comment #10)
> A bit more info: valgrind succeeds for -O0.  But with optimisation enabled
> (-O is enough), it flags:
> 
> ==12989== Conditional jump or move depends on uninitialised value(s)
> ==12989==    at 0x49B47A0: _gfortran_spread (spread_generic.c:278)
> ==12989==    by 0x401227: check_spread (class_transformational_2.f90:56)
> ==12989==    by 0x401227: MAIN__ (class_transformational_2.f90:20)
> ==12989==    by 0x4035C3: main (class_transformational_2.f90:24)
> 
> It seems that the _data._desc field of the spread results are being copied
> from uninitialised memory.  .gimple has:
> 
> __attribute__((fn spec (". ")))
> void check_spread ()
> {
>   …
>   {
>     …
>     struct array02_character(kind=1) atmp.98;
>     struct __class_MAIN___T_2_0a ctmp.99;
>     …
>     try
>       {
>         …
>         ctmp.99 = b;
>         ctmp.99._data = atmp.98;
>         ctmp.99._data.span = D.3687;
>         ctmp.99._data.data = 0B;
>         ctmp.99._data.offset = 0;
>         _gfortran_spread (&ctmp.99._data, D.3682, D.3684, D.3686);
> 
> where nothing has initialised atmp.98 before the copy.

Hi Richard, Thanks for tracking that down. I'm on to it. Paul

Reply via email to