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

--- Comment #4 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> ---
(In reply to Dominique d'Humieres from comment #3)
> > Can you try this and report:
> > ...
> 
> It does not work without the patch
> 
> --- ../_clean/libgfortran/io/unit.c   2017-12-14 10:02:30.000000000 +0100
> +++ libgfortran/io/unit.c     2017-12-29 00:28:42.000000000 +0100
> @@ -706,8 +706,8 @@ init_units (void)
>        __gthread_mutex_unlock (&u->lock);
>      }
>    /* The default internal units.  */
> -  u = insert_unit (GFC_INTERNAL_UNIT);
> -  u = insert_unit (GFC_INTERNAL_UNIT4);
> +/*  u = insert_unit (GFC_INTERNAL_UNIT);
> +  u = insert_unit (GFC_INTERNAL_UNIT4); */
>  }
>  
>  
> What is "fixed" by the lines
> 
>   u = insert_unit (GFC_INTERNAL_UNIT);
>   u = insert_unit (GFC_INTERNAL_UNIT4);
> 
> ?

We are creating two preconnected units for use exclusively for internal unit
I/O. The unit structures are added to the treap. Later during an inquire that
unit (its pointer is found) If a Unit is not found in the treap, it does not
exist. The two units identified by GFC_INTERNAL_UNIT and GFC_INTERNAL_UNIT4 are
exceptions, special reserved IDs.

I dont understand why you did not have those two lines in your source tree.
These were part of my previous patch committed.

Reply via email to