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

trippels at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Jan 1 14:07:00 GMT 2014


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

--- Comment #4 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
Xext/panoramiX.c sets:
int PanoramiXNumScreens = 0; 

and events.i has:
extern __attribute__((visibility("default"))) int PanoramiXNumScreens;
...
typedef struct {
  int screens[16];
  int numScreens;
} ScreenInfo;
ScreenInfo screenInfo;
int fn1() {
  if (noPanoramiXExtension) {
    int i;
    i = PanoramiXNumScreens - 1;
    while (i--)
      CheckVirtualMotion_x = (long)screenInfo.screens[i];
  }
  return 0;
}

Which is clearly invalid. 
Setting PanoramiXNumScreens = 1 in Xext/panoramiX.c fixes the issue.



More information about the Gcc-bugs mailing list