bug-m4
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

test failure on FreeBSD 12.0


From: Bruno Haible
Subject: test failure on FreeBSD 12.0
Date: Sun, 03 May 2020 03:06:47 +0200
User-agent: KMail/5.1.3 (Linux/4.4.0-177-generic; KDE/5.18.0; x86_64; ; )

Hi,

On FreeBSD 12.0/x86, the newest release m4-1.4.18 and the newest snapshot
from https://gitlab.com/gnu-m4/ci-distcheck/ both exhibit a "make check"
failure:

Checking ../../checks/189.eval
@ ../doc/m4.texi:6405: Origin of test
../../checks/189.eval: stdout mismatch
--- m4-tmp.17036/m4-xout        2020-05-03 02:14:13.289357000 +0200
+++ m4-tmp.17036/m4-out 2020-05-03 02:14:13.279345000 +0200
@@ -2,8 +2,8 @@
 
 1
 1
-overflow occurred
--2147483648
+
+2147483648
 0
 -2
 -2

...

Failed checks were:
  ../../checks/189.eval:out
*** Error code 1

Simplified test case:
$ cat > in <<EOF
define(`max_int', eval(`0x7fffffff'))
define(`min_int', incr(max_int))
min_int
EOF
$ m4 < in

Expected output:


-2147483648

Actual output on FreeBSD:


2147483648

The bug occurs if and only if the source file builtin.c is compiled with
optimization -O2 or higher.

The attached patch (for the 'branch-1.4' branch) fixes the issue.

Bruno

Attachment: 0001-Work-around-a-compiler-optimization-bug-on-FreeBSD-1.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]