Re: [RFC] Fix for pr64706 testcase faulre

2020-03-30 Thread Michael Matz
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

Re: [RFC] Fix for pr64706 testcase faulre

2020-03-26 Thread Jan Hubicka
> > 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.

Re: [RFC] Fix for pr64706 testcase faulre

2020-03-26 Thread Jan Hubicka
> > 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 >

Re: [RFC] Fix for pr64706 testcase faulre

2020-03-26 Thread Michael Matz
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

Re: [RFC] Fix for pr64706 testcase faulre

2020-03-26 Thread Richard Biener
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 >

[RFC] Fix for pr64706 testcase faulre

2020-03-26 Thread Jan Hubicka
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 crashes on some). The testcase has ODR violation