This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Avoid optimized out references to appear in lto symbol table


> Jan Hubicka <hubicka@ucw.cz> writes:
> 
> > Hi,
> > GNU LD has bug about reporting references to hidden symbol sthat has been optimized out.
> > This however made me notice that we do output into LTO symbol tables things that do
> > not belong there. In partiuclar we often output extern inline functions that has been
> > fully inlined by early opts.
> 
> 
> > This patch solves the problem by running cgraph unreachable function rmeoval before
> > IPA (currently it is done only before early opts, not after).
> 
> Will this solve the case of
> 
>      if (expression known at compile time)      (but not constant expression)
>         this_is_a_static_assert_that_failed()
> 
> ?

Only if the expression is known at compile time early enough (i.e. known to the early optimizers).
I would say that most of such expressions should be. I would be interested in seeing testcases
where we still have problems.

Honza

> I had a lot of problems with that and had to add various dummy stubs
> just work around this problem.
> 
> -Andi
> -- 
> ak@linux.intel.com -- Speaking for myself only


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]