[Bug other/59648] -O2 -flto compilation of xorg-server-1.15.0 fails

nheghathivhistha at gmail dot com gcc-bugzilla@gcc.gnu.org
Tue Jan 7 05:26:00 GMT 2014


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

--- Comment #10 from David Kredba <nheghathivhistha at gmail dot com> ---
(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?



More information about the Gcc-bugs mailing list