List of optimizations enabled by -O1 seems incorrect
Kevin P. Fleming
kpfleming@digium.com
Fri Aug 14 14:22:00 GMT 2009
Ian Lance Taylor wrote:
> Andrew's point was not that the program was non-conforming. His point
> was that a conforming program could not detect this optimization. And,
> indeed, it couldn't. The issue was reported by valgrind, not by the
> program itself.
OK, I get it now. This is the same sort of thing we see when strlen()
reads past the end of the string, but doesn't actually use the extra
bytes it read as part of its operation... valgrind complains, but the
program works as expected.
However, in this case, valgrind didn't say it was a read of an
uninitialized variable, it said the conditional jump depended on the
value of an uninitialized variable; either that's a valgrind bug, or the
jump may take different paths based on that content, or I'm not really
awake enough this morning yet :-)
--
Kevin P. Fleming
Digium, Inc. | Director of Software Technologies
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
skype: kpfleming | jabber: kpfleming@digium.com
Check us out at www.digium.com & www.asterisk.org
More information about the Gcc-help
mailing list