------- Comment #5 from rguenther at suse dot de  2009-02-17 18:01 -------
Subject: Re:  LTO and -fwhole-program do not
 play along well

On Tue, 17 Feb 2009, dnovillo at google dot com wrote:

> > ------- Comment #2 from hubicka at ucw dot cz  2009-02-17 17:43 -------
> > Subject: Re:  LTO and -fwhole-program do not play along well
> >
> > Hi,
> > functions are brought local in function_and_variable_visibility that
> > needs to be scheduled after LTO is read in.
> > The pas computes externaly_visible flags that should be up-to-date for
> > early IPA passes before LTO is written out, so I guess we need early
> > function_and_vairable_visibility pass and late one where the first one
> > is not bringing functions local at -fwhole-program -lto
> 
> OK, but I think there is a bigger issue here.  Even if -flto is *not*
> used, we get link errors.  Just by compiling each file with
> -fwhole-program is enough to reproduce the failure:
> 
> $ gcc -fwhole-program -c f1.c
> $ gcc -fwhole-program -c f2.c
> $ gcc -fwhole-program -o f f1.o f2.o
> 
> This is just a natural side-effect of using -fwhole-program.  It was
> not intended to be used like this.

Well, of course.  Just the idea that -flto can be used easily without
too much makefile adjustment doesn't play well here.  If I specify
-fwhole-program only at link time, will it still do the
necessary privatization?

Richard.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39203

Reply via email to