[Rd] Optimization bug when byte compiling with gcc 5.2.0 on windows

Jeroen Ooms jeroen.ooms at stat.ucla.edu
Mon Sep 14 20:49:37 CEST 2015

On Mon, Sep 14, 2015 at 4:16 PM, Duncan Murdoch
<murdoch.duncan at gmail.com> wrote:
> I think the reason for the earlier restriction is the assumption that
> eventually gcc will be fixed and this workaround won't be necessary, but
> apparently 5.2.0 still has the same problem.

I tested this hypothesis by replacing '__GNUC__ <= 4' with '__GNUC__
<= 5' and rebuilding R, but this introduces a whole lot of problems
that were not there before. In particular R crashes when using the
graphics device, which it did not without this fix.

I first thought this was an unrelated random crash, but 'make check'
consistently fails in base-Ex.R at the first invocation of boxplot().
Same for 'check recommended', each package fails when making a plot.
None of this happens with the original source code, where everything
works fine, besides the optimized version of sqrt(NA) giving NaN. Did
something perhaps change in gcc 5 for the ISNAN macro that makes it
unsuitable to be used in this way?

FWIW it looks like the original fix was introduced by Luke about a
year ago in r66652:

More information about the R-devel mailing list