<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body smarttemplateinserted="true">
<div id="smartTemplate4-template">Hi,<br>
<br>
<blockquote type="cite"
cite="mid:2a5f9650-73c7-1a58-118a-fb22def7cef3@pblackman.plus.com"><a class="moz-txt-link-freetext" href="https://gitlab.com/freepascal.org/fpc/source/-/issues/38703">https://gitlab.com/freepascal.org/fpc/source/-/issues/38703</a>
</blockquote>
<p>
<blockquote type="cite">
<p dir="auto" data-sourcepos="7:1-8:79">I'm afraid that with
-O4 it is by design.<br>
-O4 enables -OoUNCERTAIN, and the documentation about
-OoUNCERTAIN notes that:</p>
<p dir="auto" data-sourcepos="10:1-12:177">“If uncertain
optimizations are enabled, the CSE algorithm assumes that<br>
— If something is written to a local/global register or a
procedure/function parameter, this value doesn’t overwrite
the value to which a pointer points.<br>
— If something is written to memory pointed to by a pointer
variable, this value doesn’t overwrite the value of a
local/global variable or a procedure/function parameter.”</p>
</blockquote>
<br>
</p>
</div>
<div>is it doing that? did it ever do that? It might break a lot of
my code<br>
</div>
<div><br>
</div>
<div>But I cannot find any place in FPC where it is doing any
OoUNCERTAIN optimizations<br>
</div>
<div><br>
Best,<br>
Benito </div>
<div class="moz-cite-prefix">On 07.09.22 13:51, Peter B via
fpc-pascal wrote:<br>
</div>
<blockquote type="cite"
cite="mid:2a5f9650-73c7-1a58-118a-fb22def7cef3@pblackman.plus.com">I'm
wondering if this is related to
<br>
<a class="moz-txt-link-freetext" href="https://gitlab.com/freepascal.org/fpc/source/-/issues/38703">https://gitlab.com/freepascal.org/fpc/source/-/issues/38703</a>
<br>
<br>
That caused a parameter corruption in a standard function.
<br>
<a class="moz-txt-link-freetext" href="https://lists.freepascal.org/pipermail/fpc-pascal/2022-March/060361.html">https://lists.freepascal.org/pipermail/fpc-pascal/2022-March/060361.html</a>
<br>
<br>
Should be easy to check. Just try compiling with -O1
<br>
<br>
<br>
Cheers,
<br>
Peter
<br>
_______________________________________________
<br>
fpc-pascal maillist - <a class="moz-txt-link-abbreviated" href="mailto:fpc-pascal@lists.freepascal.org">fpc-pascal@lists.freepascal.org</a>
<br>
<a class="moz-txt-link-freetext" href="https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal">https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal</a>
<br>
</blockquote>
</body>
</html>