<div dir="ltr">On 8 January 2013 16:53, David Blaikie <span dir="ltr"><<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">I'm not sure what you mean by "fix user's stupidity" here - could you clarify?<br></div></blockquote><div><br></div><div style>Buffer overrun on foo[20] and relying on it for bar[20].</div>
<div style><br></div><div style>It might not even be an error to access foo[50] even though foo only has 20 elements (via pointer indirection rules), but it's user error to do so, and if the standard allows that (I'm yet to find the paragraph), then the compiler has no right to "fix" it. If it's undefined, than LTO is completely right and nothing should be done.</div>
<div style><br></div><div style>The "stupidity" part is to rely on undefined behaviour. Mind you, the stupidity in this case was mine. I removed functions from Livermore that I though were harmless, and added a few arrays to be initialized by others and haven't checked that the ranges were dynamic.</div>
<div style><br></div><div style>cheers,<br></div><div style>--renato</div></div></div></div>