------- Comment #7 from rguenther at suse dot de 2010-09-17 13:43 -------
Subject: Re: ICE with -fwhopr/-flto when using strlen and
strcat without previous declaration
On Fri, 17 Sep 2010, hubicka at ucw dot cz wrote:
> ------- Comment #6 from hubicka at ucw dot cz 2010-09-17 13:30 -------
> Subject: Re: ICE with -fwhopr/-flto when using strlen and
> strcat without previous declaration
> > > Richi: is that intended behaviour?
> > No, we shouldn't stream them at all. Why do we even bother? And yes,
> Because we need to get stuff in sync to be able to read them correctly :)
Hm? We explicitly don't stream built-in decls, did you remove that?
You simply get the available builtins from function-code from
> > same cgraph node is intended (one is an alias for the other). Maybe
> > that's what we get "wrong" even in non-LTO mode? Do we have two
> > different cgraph nodes for strlen vs. __builtin_strlen?
> Yes, we do. It is violation of one decl rule I would say.
> Probably could be declared frontend bug, why it produces two decls at first
Well, one is an alias for the other and we do have decls for aliases.
I'd say what probably happens is that at output time the decls
look different (after all they miss a prototype) and we fail to
carry over that state properly.