As reported to upstream <https://rt.perl.org/Public/Bug/Display.html?id=121505>, perl 5.18.2 exhibits undefined behavior with GCC 4.9 and some tests fail. There is an naive patch which is discussed more in <http://www.nntp.perl.org/group/perl.perl5.porters/2014/03/msg214109.html>.
This has been worked around by adding -fwrapv to ccflags with these two commits: commit 869747506fd0081f6c7eed149ec6f7adbcc4d5b1 Author: H.Merijn Brand <h.m.brand> Date: Wed Apr 9 11:16:55 2014 +0200 gcc 4.9 by default does some optimizations that break perl (#121505) Patch by Tony Cook commit 00051dd553979bd2a1dee100c324b59ee76a49e7 Author: H.Merijn Brand <h.m.brand> Date: Wed Apr 9 12:31:23 2014 +0200 -fwrapv is broken prior to gcc-4.3 (googled and patched by Zefram) The real code fix is demanded for perl-5.22.
These two tests fail (sometimes) without the patches: t/op/numconvert.t t/op/range.t
Created attachment 884999 [details] Upstream patches ported to 5.18.2
This patch will have to be revised after upstream develops real fix. Current patch has an impact on performance.