<div dir="ltr">It's pretty hard to conclude whether it's a bug in your code or in the compiler, or both, without narrowing down a test case.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Oct 25, 2019 at 2:01 PM Hans Åberg <<a href="mailto:haberg-1@telia.com">haberg-1@telia.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">So then there probably is an issue with the optimization.<br>
<br>
Just run 'gmp-6.1.2’ with MacPorts clang 9.0.0; I got:<br>
../../../gmp-6.1.2/test-driver: line 107: 70037 Abort trap: 6           "$@" > $log_file 2>&1<br>
FAIL: t-sqrlo<br>
<br>
With Apple clang 11.0.0 (clang-1100.0.33.8), I got another ‘make check’ error, also only when using optimization:<br>
../../../gmp-6.1.2/test-driver: line 107: 30266 Segmentation fault: 11  "$@" > $log_file 2>&1<br>
FAIL: t-toom53<br>
<br>
<br>
> On 25 Oct 2019, at 22:53, David Blaikie <<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>> wrote:<br>
> <br>
> UBSan adds code to check things, it necessarily changes optimizations by having those checks in. It shouldn't affect the behavior of programs that don't exhibit UB (but I imagine it could affect the behavior of programs relying on specific IB  (Implementation Defined Behavior)).<br>
> <br>
> Reducing a test case to better understand your code & be able to portably demonstrate the issue would help to get traction on understanding the behavior, seeing if it's a clang bug, etc.<br>
<br>
</blockquote></div>