[Bug other/59648] -O2 -flto compilation of xorg-server-1.15.0 fails
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Jan 7 06:01:00 GMT 2014
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.
More information about the Gcc-bugs
mailing list