Subject: Re: bug#22065: core dumped during compilation (emacs-25 branch on FreeBSD 9)

From: Joseph Mingrone <[email-masked]>
Date: Mon, 15 Feb 2016 00:05:37 -0400

Paul Eggert <[email-masked]> writes:

> Wolfgang Jenkner wrote:
>> So, perhaps, the FreeBSD 9 default base cc (a patched gcc 4.2.1) has
>> some stack-related optimization bug, even on amd64?

> Thanks for the detective work. It inspired me to search GCC bug reports, where I
> found a couple that appear to be directly relevant. The corresponding bug was
> fixed in 2008 but GCC 4.2.1 predates the fix. I installed the attached patch
> into the emacs-25 branch, and I hope it works around the compiler bug with
> stack-allocated Lisp objects on FreeBSD 9. Please give it a try.

Thanks for taking a look at the problem, but unfortunately it persists.  A new log is attached.

While the ancient version of gcc is the default compiler in FreeBSD 9.3, clang is in the base system.  I tested using the base clang in 9.3 and the compiling finished without the error.  I'll submit a patch for the FreeBSD port to use clang.