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

--- Comment #8 from paul.richard.thomas at gmail dot com <paul.richard.thomas 
at gmail dot com> ---
Hi Jakub,

Thanks for spotting that. For whatever reason,

* trans-decl.c (gfc_get_symbol_decl): Assumed shape and assumed
rank dummies of bind C procs require deferred initialization.

in the patch for PR89843 has just disappeared. I'll have to do a bit
of detective work to find out how or why and come up with a fix.

Regards

Paul

On Tue, 12 Nov 2019 at 10:37, jakub at gcc dot gnu.org
<gcc-bugzi...@gcc.gnu.org> wrote:
>
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92123
>
> --- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
> I don't see any conversion function to be called:
> fsub (struct array15_integer(kind=4) & restrict dat)
> {
>   {
>     integer(kind=4) * __tmp_INTEGER_4_rank_0;
>
>     {
>       signed char D.3928;
>       integer(kind=8) D.3929;
>       signed char D.3930;
>
>       D.3928 = dat->dtype.rank;
>       D.3929 = (integer(kind=8)) D.3928 + -1;
>       D.3930 = D.3928 != 0 ? dat->dim[D.3929].ubound != -1 ? D.3928 : -1 :
> D.3928;
>       if (D.3930 == 0)
>         {
>           try
>             {
>               __tmp_INTEGER_4_rank_0 = (integer(kind=4) *) dat->data;
>               if (__tmp_INTEGER_4_rank_0 != 0B)
>                 {
>                   _gfortran_runtime_error_at (&"At line 15 of file
> /home/jakub/src/gcc/gcc/testsuite/gfortran.dg/ISO_Fortran_binding_15.f90"[1]{lb:
> 1 sz: 1}, &"Attempting to allocate already allocated variable \'%s\'"[1]{lb: 1
> sz: 1}, &"__tmp_INTEGER_4_rank_0"[1]{lb: 1 sz: 1});
>                 }
>               else
>                 {
>                   __tmp_INTEGER_4_rank_0 = (integer(kind=4) *) 
> __builtin_malloc
> (4);
>                   if (__tmp_INTEGER_4_rank_0 == 0B)
>                     {
>                       _gfortran_os_error_at (&"In file
> \'/home/jakub/src/gcc/gcc/testsuite/gfortran.dg/ISO_Fortran_binding_15.f90\',
> around line 16"[1]{lb: 1 sz: 1}, &"Error allocating %lu bytes"[1]{lb: 1 sz: 
> 1},
> 4);
>                     }
>                 }
>               if (__tmp_INTEGER_4_rank_0 != 0B) goto L.4;
>               __tmp_INTEGER_4_rank_0 = (integer(kind=4) *) __builtin_malloc
> (4);
>               L.4:;
>               *__tmp_INTEGER_4_rank_0 = 42;
>               L.3:;
>             }
>           finally
>             {
>               dat->data = (void * restrict) __tmp_INTEGER_4_rank_0;
>             }
>           goto L.2;
>         }
>     }
>     L.2:;
>     L.1:;
>     return;
>   }
> }
>
> --
> You are receiving this mail because:
> You are on the CC list for the bug.
> You are the assignee for the bug.

Reply via email to