Ian Lance Taylor <i...@google.com> writes:

> On Wed, Jun 11, 2014 at 6:57 AM, Rainer Orth
> <r...@cebitec.uni-bielefeld.de> wrote:
>>
>> Ok, I'll have a look unless some other solution can be found.
>
> There are other, less efficient, ways that this could be compiled, but
> a common symbol seems like the right solution.
>
> Basically, every type descriptor now points to a zero value for the
> type.  The zero value in Go is always the all-bytes-zero value.  So
> we can have every type descriptor point to the same block of memory,
> as long as we can ensure that that memory is large enough.  Using a
> common symbol does exactly what we want: the linker sees all the
> go$zerovalue symbols, and sets the final one to the largest
> go$zerovalue that it sees.
>
> I can't think of any other solution that doesn't involve some sort of
> runtime initialization.
>
> I do wonder what gfortran does on Solaris.

This case only occurs in a few LTO testcases, where they are pruned by
lto.exp (lto_prune_warns).

Apart from that, the only testcase I could find is
gfortran.dg/bind_c_coms.f90 with gfortran.dg/bind_c_coms_driver.c, and
there all common symbols are the same size in the C and F90 cases.

        Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

Reply via email to