groff-commit
[Top][All Lists]
Advanced

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

[groff] 08/16: [troff]: Regression-test Savannah #64421.


From: G. Branden Robinson
Subject: [groff] 08/16: [troff]: Regression-test Savannah #64421.
Date: Sun, 10 Sep 2023 15:09:33 -0400 (EDT)

gbranden pushed a commit to branch master
in repository groff.

commit b5406c9a7195e539601f86aca84a6bbdb8d5142a
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Tue Sep 5 18:37:36 2023 -0500

    [troff]: Regression-test Savannah #64421.
    
    * src/roff/groff/tests/detect-evil-link-time-optimizer.sh: Do it.
    * src/roff/groff/groff.am (groff_TESTS): Run test.
    
    Test fails at this commit if groff is built with `-flto=auto` and
    certain GCC tool chains.  The behavior of other tool chains is unknown.
---
 ChangeLog                                          |  8 +++++
 src/roff/groff/groff.am                            |  1 +
 .../groff/tests/detect-evil-link-time-optimizer.sh | 40 ++++++++++++++++++++++
 3 files changed, 49 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index c677519c4..9eb87278f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2023-09-05  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+       [troff]: Regression-test Savannah #64421.
+
+       * src/roff/groff/tests/detect-evil-link-time-optimizer.sh: Do
+       it.
+       * src/roff/groff/groff.am (groff_TESTS): Run test.
+
 2023-09-05  G. Branden Robinson <g.branden.robinson@gmail.com>
 
        * tmac/e.tmac (np, bu): Throw diagnostic if given arguments; we
diff --git a/src/roff/groff/groff.am b/src/roff/groff/groff.am
index d33f86d51..61c9451bd 100644
--- a/src/roff/groff/groff.am
+++ b/src/roff/groff/groff.am
@@ -39,6 +39,7 @@ groff_TESTS = \
   src/roff/groff/tests/ab_works.sh \
   src/roff/groff/tests/adjustment_works.sh \
   src/roff/groff/tests/break_zero-length_output_line_sanely.sh \
+  src/roff/groff/tests/detect-evil-link-time-optimizer.sh \
   src/roff/groff/tests/device_control_escapes_express_basic_latin.sh \
   src/roff/groff/tests/do_not_loop_infinitely_when_breaking_cjk.sh \
   src/roff/groff/tests/dot-cp_register_works.sh \
diff --git a/src/roff/groff/tests/detect-evil-link-time-optimizer.sh 
b/src/roff/groff/tests/detect-evil-link-time-optimizer.sh
new file mode 100755
index 000000000..20dd18b83
--- /dev/null
+++ b/src/roff/groff/tests/detect-evil-link-time-optimizer.sh
@@ -0,0 +1,40 @@
+#!/bin/sh
+#
+# Copyright (C) 2023 Free Software Foundation, Inc.
+#
+# This file is part of groff.
+#
+# groff is free software; you can redistribute it and/or modify it under
+# the terms of the GNU General Public License as published by the Free
+# Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# groff is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+
+groff="${abs_top_builddir:-.}/test-groff"
+
+# Regression-test Savannah #64421.
+#
+# Building with `-flto=auto` on multiple (GNU) toolchains causes
+# shenangians in the formatter, provoked by an uninitialized global in
+# libgroff.  Reproducer courtesy of Günther Noack.
+
+input=".TITLE Example
+.DOCTYPE    LETTER
+.PRINTSTYLE TYPESET
+.PAPER      A4
+.START
+.DRH"
+
+output=$(printf "%s\n" "$input" | "$groff" -m om -T pdf -Z)
+echo "$output"
+! echo "$output" | grep -qx 'tblack'
+
+# vim:set autoindent expandtab shiftwidth=2 tabstop=2 textwidth=72:



reply via email to

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