possible miscompilation on macOS Catalina 10.15.6

Paul Koning paulkoning at comcast.net
Thu Oct 29 16:17:57 UTC 2020



> On Oct 29, 2020, at 11:17 AM, Niels Möller <nisse at lysator.liu.se> wrote:
> 
> tg at gmplib.org (Torbjörn Granlund) writes:
> 
>> Trevor Spiteri <tspiteri at ieee.org> writes:
>> 
>>  This is all the information I got; sorry if it is incomplete. (The
>>  user's issue was solved by using their already installed homebrew?
>>  libraries instead of compiling GMP anew.)
>> 
>> OK, so *some* compiler compiled GMP with and *some* GMP test program
>> reported a segfault.  I will right away start the natural deduction over
>> all possible instances of compilers and GMP test cases. Oh wait, I need
>> to consider all possible CPUs and relevant environment variables as
>> well.
> 
> And to be a bit less sarcastic: Fairly recent Apple compilers have had
> bugs making them miscompile GMP. Most likely explanation for the
> reported problem is that your user has a buggy version of the compiler
> installed. So try a different compiler. And if you suspect it's a
> genuine GMP bug, please follow bug reporting instructions in the fine
> manual.

There is another possibility: GMP might be doing something undefined, where previous compilers did "what we want" while some recent new ones do something different.  It isn't miscompilation if the source statement is undefined.

	paul



More information about the gmp-bugs mailing list