This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug other/59648] -O2 -flto compilation of xorg-server-1.15.0 fails
- From: "pinskia at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 07 Jan 2014 06:01:34 +0000
- Subject: [Bug other/59648] -O2 -flto compilation of xorg-server-1.15.0 fails
- Auto-submitted: auto-generated
- References: <bug-59648-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59648
--- Comment #11 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to David Kredba from comment #10)
> (In reply to Markus Trippelsdorf from comment #9)
> > So, invalid.
>
> Xorg not agrees:
>
> No, it's clearly valid, since PanoramiXNumScreens will always be set > 1
> in PanoramiXExtensionInit() if noPanoramiXExtension is not set. There
> is no way that gcc can know this from compiling events.c alone, it would
> have to do static analysis across dozens of source files, which it can't
> do with the information passed to it during the compilation steps.
>
> > Setting PanoramiXNumScreens = 1 in Xext/panoramiX.c fixes the issue.
>
> How would gcc know that when you are compiling a completely unrelated
> source file?
It knows due -flto.