summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pp.c28
-rwxr-xr-xt/op/repeat.t17
2 files changed, 32 insertions, 13 deletions
diff --git a/pp.c b/pp.c
index d837d4b9d1..8c48574493 100644
--- a/pp.c
+++ b/pp.c
@@ -3677,7 +3677,25 @@ PP(pp_unpack)
#ifdef __osf__
/* Without the dummy below unpack("i", pack("i",-1))
* return 0xFFffFFff instead of -1 for Digital Unix V4.0
- * cc with optimization turned on */
+ * cc with optimization turned on.
+ *
+ * The bug was detected in
+ * DEC C V5.8-009 on Digital UNIX V4.0 (Rev. 1091) (V4.0E)
+ * with optimization (-O4) turned on.
+ * DEC C V5.2-040 on Digital UNIX V4.0 (Rev. 564) (V4.0B)
+ * does not have this problem even with -O4.
+ *
+ * This bug was reported as DECC_BUGS 1431
+ * and tracked internally as GEM_BUGS 7775.
+ *
+ * The bug is fixed in
+ * Tru64 UNIX V5.0: Compaq C V6.1-006 or later
+ * UNIX V4.0F support: DEC C V5.9-006 or later
+ * UNIX V4.0E support: DEC C V5.8-011 or later
+ * and also in DTK.
+ *
+ * See also few lines later for the same bug.
+ */
(aint) ?
sv_setiv(sv, (IV)aint) :
#endif
@@ -3709,12 +3727,8 @@ PP(pp_unpack)
sv = NEWSV(41, 0);
#ifdef __osf__
/* Without the dummy below unpack("I", pack("I",0xFFFFFFFF))
- * returns 1.84467440737096e+19 instead of 0xFFFFFFFF for
- * DEC C V5.8-009 on Digital UNIX V4.0 (Rev. 1091) (aka V4.0D)
- * with optimization turned on.
- * (DEC C V5.2-040 on Digital UNIX V4.0 (Rev. 564) (aka V4.0B)
- * does not have this problem even with -O4)
- */
+ * returns 1.84467440737096e+19 instead of 0xFFFFFFFF.
+ * See details few lines earlier. */
(auint) ?
sv_setuv(sv, (UV)auint) :
#endif
diff --git a/t/op/repeat.t b/t/op/repeat.t
index f935bf106f..c030ba9a12 100755
--- a/t/op/repeat.t
+++ b/t/op/repeat.t
@@ -42,10 +42,15 @@ print join(':', (9,9) x 4) eq '9:9:9:9:9:9:9:9' ? "ok 18\n" : "not ok 18\n";
print join('', (split(//,"123")) x 2) eq '123123' ? "ok 19\n" : "not ok 19\n";
#
-# The test #20 is actually testing for Digital C compiler optimizer bug.
+# The test #20 is actually testing for Digital C compiler optimizer bug,
+# present in Dec C versions 5.* and 6.0 (used in Digital UNIX and VMS),
+# found in December 1998. The bug was reported to Digital^WCompaq as
+# DECC 2745 (21-Dec-1998)
+# GEM_BUGS 7619 (23-Dec-1998)
+# As of April 1999 the bug has been fixed in Tru64 UNIX 5.0 and is planned
+# to be fixed also in 4.0G.
#
-# Dec C versions 5.* and 6.0 (used in Digital UNIX and VMS) used
-# to produce (as of December 1998) broken code for util.c:repeatcpy()
+# The bug was as follows: broken code was produced for util.c:repeatcpy()
# (a utility function for the 'x' operator) in the case *all* these
# four conditions held:
#
@@ -68,9 +73,6 @@ print join('', (split(//,"123")) x 2) eq '123123' ? "ok 19\n" : "not ok 19\n";
# 24 .........???????.???????
# 25 .........???????.???????.
#
-# The bug could be (obscurely) avoided by changing "from" to
-# be an unsigned char pointer.
-#
# The bug was triggered in the "if (len == 1)" branch. The fix
# was to introduce a new temporary variable. In diff -u format:
#
@@ -85,6 +87,9 @@ print join('', (split(//,"123")) x 2) eq '123123' ? "ok 19\n" : "not ok 19\n";
# return;
# }
#
+# The bug could also be (obscurely) avoided by changing "from" to
+# be an unsigned char pointer.
+#
# This obscure bug was not found by the then test suite but instead
# by Mark.Martinec@nsc.ijs.si while trying to install Digest-MD5-2.00.
#