[prev in list] [next in list] [prev in thread] [next in thread] 

List:       autoconf-bug
Subject:    Re: [sr #110267] Testsuite regressions from 2.69 on Solaris 10 (SPARC)
From:       Paul Eggert <eggert () cs ! ucla ! edu>
Date:       2020-07-17 22:09:27
Message-ID: 61135d4a-bc97-7c3d-7a87-40114374fe13 () cs ! ucla ! edu
[Download RAW message or body]

On 7/17/20 4:08 AM, Dagobert Michelsen wrote:

> The machines gcc210 and gcc211 also happen to be mine and I installed
> Sun Studio 12 and 12u1 now on gcc210 for completeness.

I see that /opt/developerstudio12.6/bin/cc on that machine is Oracle Studio 12.6 
Sun C 5.15 patched to 152881-04 2019/03/08, whereas my copy (the free one) is 
the unpatched Oracle Studio 12.6 Sun C 5.15 2017/05/30. I did try the latest 
Autoconf with my free copy, and it reported a single unexpected failure:

330: AC_FC_LINE_LENGTH                               FAILED (fortran.at:1055)

This problem is that whereas the older Sun Fortran 95 8.3 Patch 127000-13 
2010/01/26 (which I used earlier) does not support lines longer than 132 
columns, the newer Oracle Studio 12.6 Fortran 95 8.8 2017/05/30 (which I just 
now used) supports lines as long as 250 columns. Unfortunately the 
Autoconf-generated 'configure' uses a test program with a line of 138 (which 
succeeds on the newer Oracle Studio 12.6), and 'configure' then concludes that 
the line lengths are "unlimited" (i.e., as long as 254 columns), so the test 
suite eventually tests a line with 253 columns and that test fails.

I installed the attached patch to fix this test glitch. The basic idea is to 
test 250 columns not 253, and to document the limit as 250 not 254.

["0001-Test-AC_FC_LINE_LENGTH-only-to-250-columns.patch" (text/x-patch)]

From 79e8cc6a259d9af185356a9e56be6989f6185c64 Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
Date: Fri, 17 Jul 2020 15:06:49 -0700
Subject: [PATCH] Test AC_FC_LINE_LENGTH only to 250 columns

* NEWS, doc/autoconf.texi, lib/autoconf/fortran.m4:
Document 250, not 254.
* tests/fortran.at (AC_FC_LINE_LENGTH): Test lines with 250
columns not 253, since Oracle Studio 12.6 Fortran 95 8.8
2017/05/30 goes up only to 250.
---
 NEWS                    |  3 +++
 doc/autoconf.texi       |  2 +-
 lib/autoconf/fortran.m4 |  2 +-
 tests/fortran.at        | 15 ++++++++++-----
 4 files changed, 15 insertions(+), 7 deletions(-)

diff --git a/NEWS b/NEWS
index 438f074b..000570e0 100644
--- a/NEWS
+++ b/NEWS
@@ -191,6 +191,9 @@ GNU Autoconf NEWS - User visible changes.
   diagnosed as obsolete, and replaced with AC_CONFIG_HEADERS by
   autoupdate.
 
+- AC_FC_LINE_LENGTH now documents the maximum portable length of
+  "unlimited" Fortran source code lines to be 250 columns, not 254.
+
 * Noteworthy changes in release 2.69 (2012-04-24) [stable]
 
 ** Autoconf now requires perl 5.6 or better (but generated configure
diff --git a/doc/autoconf.texi b/doc/autoconf.texi
index f178b385..8497f46f 100644
--- a/doc/autoconf.texi
+++ b/doc/autoconf.texi
@@ -8341,7 +8341,7 @@ the @code{ac_cv_fc_fixedform} variable.
 
 Try to ensure that the Fortran compiler (@code{$FC}) accepts long source
 code lines.  The @var{length} argument may be given as 80, 132, or
-unlimited, and defaults to 132.  Note that line lengths above 254
+unlimited, and defaults to 132.  Note that line lengths above 250
 columns are not portable, and some compilers do not accept more than 132
 columns at least for fixed format source.  If necessary, it may add some
 additional flags to @code{FCFLAGS}.
diff --git a/lib/autoconf/fortran.m4 b/lib/autoconf/fortran.m4
index 5654f60e..0a0c4168 100644
--- a/lib/autoconf/fortran.m4
+++ b/lib/autoconf/fortran.m4
@@ -1455,7 +1455,7 @@ AC_LANG_POP([Fortran])dnl
 # Look for a compiler flag to make the Fortran (FC) compiler accept long lines
 # in the current (free- or fixed-format) source code, and adds it to FCFLAGS.
 # The optional LENGTH may be 80, 132 (default), or `unlimited' for longer
-# lines.  Note that line lengths above 254 columns are not portable, and some
+# lines.  Note that line lengths above 250 columns are not portable, and some
 # compilers (hello ifort) do not accept more than 132 columns at least for
 # fixed format.  Call ACTION-IF-SUCCESS (defaults to nothing) if successful
 # (i.e. can compile code using new extension) and ACTION-IF-FAILURE (defaults
diff --git a/tests/fortran.at b/tests/fortran.at
index 46ffadd8..241d9b0d 100644
--- a/tests/fortran.at
+++ b/tests/fortran.at
@@ -1012,20 +1012,25 @@ clean:
 	rm -f *.@OBJEXT@ prog@EEXEXT@
 ]])
 
+# When preceded by 7 spaces and followed by newline, line_80 generates
+# a line of exactly 79 columns, line_132 generates a line of exactly 131
+# coluns, and line_250 generates a line of exactly 250 columns.
+# FIXME: Shouldn't line_80 and line_132 generate lines that are one column
+# longer, so that their contents match the variable names?
 line_80=\
 'subroutine foo(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11)'
 line_132=\
 'subroutine foo(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,'\
 'arg12,arg13,arg14,arg15,arg16,arg17,arg18,arg19)'
-line_254=\
-'subroutine foo(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,'\
+line_250=\
+'subroutine foofoo(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,'\
 'arg12,arg13,arg14,arg15,arg16,arg17,arg18,arg19,arg20,arg21,arg22,arg23,'\
 'arg24,arg25,arg26,arg27,arg28,arg29,arg30,arg31,arg32,arg33,arg34,arg35,'\
-'arg36,arg37,arg38,arg39,arg40)'
+'arg36,arg37,arg38,arg39)'
 
-for len in 80 132 254
+for len in 80 132 250
 do
-  if test $len -eq 254; then arg=unlimited; else arg=$len; fi
+  if test $len -eq 250; then arg=unlimited; else arg=$len; fi
   eval long_line=\$line_$len
 
   # Try free-form first, it has a bigger chance of succeeding.
-- 
2.17.1



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic