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

--- Comment #23 from Iain Sandoe <iains at gcc dot gnu.org> ---
(In reply to Paul Thomas from comment #19)
> Created attachment 40286 [details]
> Failing testcases with -flto under Darwin
> 
> The PR is fixed under Linux but gives a link error under Darwin with -flto.
> From Dominique's message to the list on 7th December:
> The tests gfortran.dg/char_result_16.f90 and gfortran.dg/char_result_17.f90
> fail with
> 
> lto1: error: two or more sections for
> .gnu.lto___get_PROC_names.3e3ee55b08747e7c
> lto1: internal compiler error: cannot read LTO decls from
> /var/folders/8q/sh_swgz96r7f5vnn08f7fxr00000gn/T//ccEJosbA.o
> 
> This may be darwin specific as the linker is more picky than the linux one.

It might be Darwin-specific for a number of reasons:
 (a) Darwin doesn't use the linker plugin so there's a different code-path, 
 (b) we have to wrap the LTO sections to accommodate the limitation of 255
sections on darwin 
 (c) Something to do with missing symbol aliases 
 (d) something else ;-)

However, in this case it does not appear to be a Darwin linker issue;
the ICE is in lto1 - the only external Darwin tool involved at that point is
the assembler, and AFAICT the assembler is correctly rendering that there are
two instances in the input assembly (as posted by Dominique and as per the
complaint in the ICE).  Next thing is to figure out how/why we have those two
instances.

Reply via email to