View Single Post
Posts: 1,808 | Thanked: 4,272 times | Joined on Feb 2011 @ Germany
#9
Originally Posted by freemangordon View Post
Incorrect, gcc 4.2.1 for ARM has bugs which are resolved in newer versions.
Still, what I wrote is strictly correct. A compiler is only a compiler

If a new version of a compiler provides better optimization, etc. then a new recompilation of a program will perhaps work faster, but not differently. If a new version of a compiler generates code that is *not* compatible with other programs compiled with other versions of the compiler or even with other compilers (who says everything has to be gcc?), then something's fckd up with the compiler.

Obviously, I know you're talking about thumb2 and neon. But these are just optimization options which should work regardless of the underlying system (as long as the processor supports those instruction sets).

Look at the case with CSSU, Qt 4.7.4 and raster engine - it ended that it is -O3 flag that breaks it.
Using aggresive optimization options is something that has to be done VERY carefully. Of course a compiler should alwayws produce correct code, but in the real world this is not the case.

I think -O3 enables the -fstrict-aliasing option (or at least it used to do that), and enabling that option implies that *you* (developer) make *damn* sure that your program is OK with that.

I can bet a year's a salary (OK, make it a month) that the combination of CSSU, QT 4.7.4 and whatever raster engine you were compiler DOES NOT fulfill that (very strict) restriction, meaning that using strict aliasing is an unsafe option.
 

The Following 4 Users Say Thank You to reinob For This Useful Post: