>From 79e8cc6a259d9af185356a9e56be6989f6185c64 Mon Sep 17 00:00:00 2001 From: Paul Eggert 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