Hello,
On Thu, 26 Mar 2020, Jan Hubicka wrote:
> > I think we should continue to try to model ELF semantics re weak and
> > aliases. If so, then yes, LTO gets it wrong and the above testcase should
> > not abort. Weak doesn't enter the picture for creating aliases (the
> > aliases is created
>
> Why don't we represent the alias at the cgraph level? That is,
> why do decls come into play at all here? b prevails and it has a
> reference to a.c:a so we need to keep (and emit) that. The only issue
> would be that we'd end up with two 'a's so we have to notice that
> and fixup somehow.
> > Is it? What does a non-weak local alias to a weak function mean?
>
> I think we should continue to try to model ELF semantics re weak and
> aliases. If so, then yes, LTO gets it wrong and the above testcase should
> not abort. Weak doesn't enter the picture for creating aliases (the
> al
Hello,
On Thu, 26 Mar 2020, Richard Biener wrote:
> > = b.c:
> >
> > __attribute__((weak))
> > __attribute__((noinline))
> >
> > int a()
> > {
> > return 1;
> > }
> >
> > __attribute__((noinline))
> > static int b() __attribute__((alias("a")));
> > void
> > test()
> > {
> > if (b()!=1)
On Thu, 26 Mar 2020, Jan Hubicka wrote:
> Hi,
> this patch started as an attempt to fix pr64706 that kept me walking in loops
> for some time (I failed to make a hack that would make the testcase work in
> all
> basic settings of -O0/2 -flto set on the both files independently. All GCC
> releases