Follow Slashdot blog updates by subscribing to our blog RSS feed


Forgot your password?

Examining the User-Reported Issues With Upgrading From GCC 4.7 To 4.8 148

Nerval's Lobster writes "Developer and editor Jeff Cogswell writes: 'When I set out to review how different compilers generate possibly different assembly code (specifically for vectorized and multicore code), I noticed a possible anomaly when comparing two recent versions of the g++ compiler, 4.7 and 4.8. When I mentioned my concerns, at least one user commented that he also had a codebase that ran fine after compiling with 4.6 and 4.7, but not with 4.8.' So he decided to explore the difference and see if there was a problem between 4.7 and 4.8.1, and found a number of issues, most related to optimization. Does this mean 4.8 is flawed, or that you shouldn't use it? 'Not at all,' he concluded. 'You can certainly use 4.8,' provided you keep in mind the occasional bug in the system."
This discussion has been archived. No new comments can be posted.

Examining the User-Reported Issues With Upgrading From GCC 4.7 To 4.8

Comments Filter:
  • by NoNonAlphaCharsHere ( 2201864 ) on Monday January 20, 2014 @01:02PM (#46014933)
    99.2% of the people who use the phrase "mission critical" don't have anything "mission critical".
  • Re:Duh? (Score:5, Insightful)

    by Fwipp ( 1473271 ) on Monday January 20, 2014 @02:17PM (#46015757)

    On the surface, this code appears quite different. Due to space (and my unwillingness to bore readers any more than necessary), I won’t reproduce the resulting assembly code here. But I will say the 4.8 version, for just the loops, is about ten lines shorter. In both cases the code is vectorized. The vectorized portion, which is basically this line of C++ code—
      x[i + j * SIZE] += y[i + j * SIZE];
    —is almost the same, except for a minor difference in how the data is moved in and out of the registers. (The 4.7 version uses two registers; the 4.8 version uses only 1.)
    The rest of the difference centers on how the loop is optimized. Now remember: The code runs in both cases. It doesn’t have a bug. What we’re dealing with here, then, is a matter of the developers revising the assembly code generation and optimizing algorithms. Nevertheless, the code is different.

    This is the entirety of his comparison.
    "this code appears quite different ... the 4.8 version is about ten lines shorter ... [vectorization] is almost the same ... The [rest is] how the loop is optimized... it doesn't have a bug ... Nevertheless, the code is different."

    Reading the summary, in which he claims he "found a number of issues," it seems like he might have, y'know, taken the time to mention some of those issues. I guess zero is a number.

The party adjourned to a hot tub, yes. Fully clothed, I might add. -- IBM employee, testifying in California State Supreme Court