From patchwork Thu Nov 16 13:01:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tobias Burnus X-Patchwork-Id: 165794 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b909:0:b0:403:3b70:6f57 with SMTP id t9csp3192947vqg; Thu, 16 Nov 2023 05:03:35 -0800 (PST) X-Google-Smtp-Source: AGHT+IHVyoZW++KHSSL8UbERbF0hATdARtLcuGKCFFpDrFYgbR4lANry8V4X3tqvZlch39SpzeTe X-Received: by 2002:ad4:48c2:0:b0:65b:7a2:eecd with SMTP id v2-20020ad448c2000000b0065b07a2eecdmr7771221qvx.61.1700139814153; Thu, 16 Nov 2023 05:03:34 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1700139814; cv=pass; d=google.com; s=arc-20160816; b=uud9pdTJGzhX7b1pLgaGuccR0BEsl66fWhgbURHuYEztiFAeD9gITPpCESlPxKeYWY VbQXRjaIARmUaAp5nbdOrBZDxu860ym0axXVca/ZINqBV582j/JcRAWdb884xHHUrKEo HOnusF8nybIUDLlL590FmkqwbnBFnzLyZNv60CJij+W1T54YGxO9YnNMXBCKAJOulXY+ dOO/FU9UPRAD5brcSOPaK+QIWEzGNZhHCPgV2I2T3w7PxOfEH/q6U+6M3Sj6PYMFe4rL 5Eyjm3Ulqktn05sanz6KyrYszBPVFXdzqU8hIab8pdZhLOtwgUzB/vSN+vqdCmfxe42U vQXA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:from:to :content-language:user-agent:mime-version:date:message-id :ironport-sdr:arc-filter:dmarc-filter:delivered-to; bh=xzLwWzMPUBApNLYGyfbki3O27CC5ZuR4p/pteyZMlWg=; fh=ARF5Mvhgv4mOzEi1LJHgn82UOzar4LOruqM9inFDcVw=; b=z6NfRfTYIS8O7s72fLwODNdXJ2m/KKp0501b3aaSRBr7SbNFMa8jane1XsiNaGMVWv MWxRJOVqORS5snHEZpOBW6WF7tvZyvod+Rtfj9tHP6rhZIK2ZlFEUnNXAEaS5TI/bo+C FiGUV+pL0ZWfC0j80axUgcAQs/Q/hpO+Kp3TG43lgiC4n/8kEoxTjEBHJDD5J3qh+aVg LSTQEkgBVuNj7Sq9WZ4uRwD8jXt30yqQbXYjECuZN+QjW4LuEPJKxf7NZlLPS3uH/0FB TxdMKz6e7d12PS2kHu95UQE1Koi9d2EKiZbgB9ArnK9GEBXrbuag/4PGzYcHlioEK+D6 D4+g== ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id dm14-20020ad44e2e000000b006561f4b120asi11357617qvb.52.2023.11.16.05.03.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Nov 2023 05:03:34 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 9753A3857B94 for ; Thu, 16 Nov 2023 13:02:34 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from esa2.mentor.iphmx.com (esa2.mentor.iphmx.com [68.232.141.98]) by sourceware.org (Postfix) with ESMTPS id 939963858D20; Thu, 16 Nov 2023 13:01:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 939963858D20 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 939963858D20 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=68.232.141.98 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700139711; cv=none; b=iB7PoDVLAdmAuHNIvaE4+MDNEf/7xVR0/FZtEMs8QG22exn2GpKRD6GjBNjoKsyH/ED8zGpp7zHRHd6WQT9nx0cIxQgJAKdLorp2NVjgZF+31mD3GwIA1Tn6a5QurbzAD4X0HTG2401csDTR2ng/S1fuuI2CDmywqxieMR7rSIo= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700139711; c=relaxed/simple; bh=xzLwWzMPUBApNLYGyfbki3O27CC5ZuR4p/pteyZMlWg=; h=Message-ID:Date:MIME-Version:To:From:Subject; b=Who+t3iuPME+4Al2OJF0ccQq4WbqjlHy+e9k9cb1hdesiNrDB/+IvpjifK5bXiGzaxMq6CAyBPg7v69HEwH5mk6ZUvAXAXfaNcEqaM1aHU3bL10FpgeDEV9zH1zNtE68agC6cQEYIu6mrsiebpdowT0cJ0vUsk7BZvia1Vz1rd0= ARC-Authentication-Results: i=1; server2.sourceware.org X-CSE-ConnectionGUID: Y5unUDhPT6qJc739GXxLcQ== X-CSE-MsgGUID: nMkuUckNRJWah4xAfEkgtQ== X-IronPort-AV: E=Sophos;i="6.04,308,1695715200"; d="diff'?scan'208";a="25676870" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa2.mentor.iphmx.com with ESMTP; 16 Nov 2023 05:01:43 -0800 IronPort-SDR: V7hPInCKYgsGlEmy9Sndh0idAOPqsfDtP0CIeEyqnMJZ1QvTpd9/LCeCe4GbG0KXh9O7UrH6KW VYSsIrPvA/dFi/xqEXYAYS0vI9sB9XD5AU5phK5vnuCFF5C/FqIxwA17ZxaY5FO108r+PXQtff spTSifgEr6OvcniM/hztocgt7LTPrlEDYPAKI9qs3FqP65IGNO9IkwOOBp4+BXi+r+9fEpQsFl neC1YUlAJ6yht8GdIKJNZTWwg/84bMe6fcWGZh/0X8/JqSdZCpfB474DxIRt0DTWxLIqh2bwj+ H/A= Message-ID: Date: Thu, 16 Nov 2023 14:01:38 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: gcc-patches , fortran From: Tobias Burnus Subject: [Patch] Fortran: Accept -std=f2023 support, update line-length for Fortran 2023 X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-13.mgc.mentorg.com (139.181.222.13) To svr-ies-mbx-12.mgc.mentorg.com (139.181.222.12) X-Spam-Status: No, score=-9.3 required=5.0 tests=BAYES_00, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, SCC_10_SHORT_WORD_LINES, SCC_20_SHORT_WORD_LINES, SCC_35_SHORT_WORD_LINES, SCC_5_SHORT_WORD_LINES, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1782725805831758354 X-GMAIL-MSGID: 1782725805831758354 This adds -std=f2023, which is mostly a prep patch for future changes. However, Fortran 2023, https://j3-fortran.org/doc/year/23/23-007r1.pdf changes two things which is taken care in this patch: (A) In "6.3.2.1 Free form line length": Fortran 2018: "If a line consists entirely of characters of default kind (7.4.4), it shall contain at most 132 characters" Fortran 2023: "A line shall contain at most ten thousand characters." (B) In "6.3.2.6 Free form statements": Fortran 2018: "A statement shall not have more than 255 continuation lines." Fortran 2023: "A statement shall not have more than one million characters." I have not added a testcase for exceeding the latter but otherwise there are new tests and I had to add a couple of -std=f2018 to existing tests. Comments, suggestions, approval? Tobias PS: I find it funny that -std=c23, -std=c++23 and -std=f2023 will get added in the same GCC release. PPS: I did not bother adding .f23 as file extension; I believe that also .f18 is unsupported. ----------------- Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955 Fortran: Accept -std=f2023 support, update line-length for Fortran 2023 This patch accepts -std=f2023, uses it by default and bumps for the free-source form the line length to 10,000 and the statement length alias number of continuation lines to unlimited. gcc/fortran/ChangeLog: * gfortran.texi (_gfortran_set_options): Document GFC_STD_F2023. * invoke.texi (std,pedantic,Wampersand,Wtabs): Add -std=2023. * lang.opt (std=f2023): Add. * libgfortran.h (GFC_STD_F2023, GFC_STD_OPT_F23): Add. * options.cc (set_default_std_flags): Add GFC_STD_F2023. (gfc_init_options): Set max_continue_free to 1,000,000. (gfc_post_options): Set flag_free_line_length if unset. (gfc_handle_option): Add OPT_std_f2023, set max_continue_free = 255 for -std=f2003, f2008 and f2018. gcc/testsuite/ChangeLog: * gfortran.dg/goacc/warn_truncated.f90: Add -std=f2018 option. * gfortran.dg/gomp/warn_truncated.f90: Likewise. * gfortran.dg/line_length_10.f90: Likewise. * gfortran.dg/line_length_11.f90: Likewise. * gfortran.dg/line_length_2.f90: Likewise. * gfortran.dg/line_length_5.f90: Likewise. * gfortran.dg/line_length_6.f90: Likewise. * gfortran.dg/line_length_7.f90: Likewise. * gfortran.dg/line_length_8.f90: Likewise. * gfortran.dg/line_length_9.f90: Likewise. * gfortran.dg/continuation_5.f90: New test. * gfortran.dg/continuation_6.f90: New test. * gfortran.dg/line_length_12.f90: New test. * gfortran.dg/line_length_13.f90: New test. * gfortran.dg/line_length_14.f90: New test. gcc/fortran/gfortran.texi | 11 +- gcc/fortran/invoke.texi | 21 +- gcc/fortran/lang.opt | 4 + gcc/fortran/libgfortran.h | 4 +- gcc/fortran/options.cc | 20 +- gcc/testsuite/gfortran.dg/continuation_5.f90 | 267 +++++++++++++++++++++ gcc/testsuite/gfortran.dg/continuation_6.f90 | 267 +++++++++++++++++++++ gcc/testsuite/gfortran.dg/goacc/warn_truncated.f90 | 1 + gcc/testsuite/gfortran.dg/gomp/warn_truncated.f90 | 1 + gcc/testsuite/gfortran.dg/line_length_10.f90 | 2 +- gcc/testsuite/gfortran.dg/line_length_11.f90 | 2 +- gcc/testsuite/gfortran.dg/line_length_12.f90 | 31 +++ gcc/testsuite/gfortran.dg/line_length_13.f90 | 27 +++ gcc/testsuite/gfortran.dg/line_length_14.f90 | 28 +++ gcc/testsuite/gfortran.dg/line_length_2.f90 | 2 +- gcc/testsuite/gfortran.dg/line_length_5.f90 | 2 +- gcc/testsuite/gfortran.dg/line_length_6.f90 | 2 +- gcc/testsuite/gfortran.dg/line_length_7.f90 | 2 +- gcc/testsuite/gfortran.dg/line_length_8.f90 | 2 +- gcc/testsuite/gfortran.dg/line_length_9.f90 | 2 +- 20 files changed, 672 insertions(+), 26 deletions(-) diff --git a/gcc/fortran/gfortran.texi b/gcc/fortran/gfortran.texi index e7ffc294dc8..41857cc9038 100644 --- a/gcc/fortran/gfortran.texi +++ b/gcc/fortran/gfortran.texi @@ -3477,11 +3477,12 @@ standard. Possible values are (bitwise or-ed) @code{GFC_STD_F77} (1), @code{GFC_STD_F95} (8), @code{GFC_STD_F2003} (16), @code{GFC_STD_GNU} (32), @code{GFC_STD_LEGACY} (64), @code{GFC_STD_F2008} (128), @code{GFC_STD_F2008_OBS} (256), @code{GFC_STD_F2008_TS} (512), -@code{GFC_STD_F2018} (1024), @code{GFC_STD_F2018_OBS} (2048), and -@code{GFC_STD=F2018_DEL} (4096). Default: @code{GFC_STD_F95_OBS | -GFC_STD_F95_DEL | GFC_STD_F95 | GFC_STD_F2003 | GFC_STD_F2008 | -GFC_STD_F2008_TS | GFC_STD_F2008_OBS | GFC_STD_F77 | GFC_STD_F2018 | -GFC_STD_F2018_OBS | GFC_STD_F2018_DEL | GFC_STD_GNU | GFC_STD_LEGACY}. +@code{GFC_STD_F2018} (1024), @code{GFC_STD_F2018_OBS} (2048), +@code{GFC_STD=F2018_DEL} (4096), and @code{GFC_STD=F2023} (8192). +Default: @code{GFC_STD_F95_OBS | GFC_STD_F95_DEL | GFC_STD_F95 | +GFC_STD_F2003 | GFC_STD_F2008 | GFC_STD_F2008_TS | GFC_STD_F2008_OBS +| GFC_STD_F77 | GFC_STD_F2018 | GFC_STD_F2018_OBS | GFC_STD_F2018_DEL +| GFC_STD_F2023 | GFC_STD_GNU | GFC_STD_LEGACY}. @item @var{option}[1] @tab Standard-warning flag; prints a warning to standard error. Default: @code{GFC_STD_F95_DEL | GFC_STD_LEGACY}. @item @var{option}[2] @tab If non zero, enable pedantic checking. diff --git a/gcc/fortran/invoke.texi b/gcc/fortran/invoke.texi index 10387e39501..5f87b330a22 100644 --- a/gcc/fortran/invoke.texi +++ b/gcc/fortran/invoke.texi @@ -542,17 +542,17 @@ intermediate representation of the translated Fortran code, produced by @opindex @code{std=}@var{std} option @item -std=@var{std} Specify the standard to which the program is expected to conform, -which may be one of @samp{f95}, @samp{f2003}, @samp{f2008}, -@samp{f2018}, @samp{gnu}, or @samp{legacy}. The default value for +which may be one of @samp{f95}, @samp{f2003}, @samp{f2008}, @samp{f2018}, +@samp{f2023}, @samp{gnu}, or @samp{legacy}. The default value for @var{std} is @samp{gnu}, which specifies a superset of the latest Fortran standard that includes all of the extensions supported by GNU Fortran, although warnings will be given for obsolete extensions not recommended for use in new code. The @samp{legacy} value is equivalent but without the warnings for obsolete extensions, and may -be useful for old non-standard programs. The @samp{f95}, -@samp{f2003}, @samp{f2008}, and @samp{f2018} values specify strict -conformance to the Fortran 95, Fortran 2003, Fortran 2008 and Fortran -2018 standards, respectively; errors are given for all extensions +be useful for old non-standard programs. The @samp{f95}, @samp{f2003}, +@samp{f2008}, @samp{f2018}, and @samp{f2023} values specify strict +conformance to the Fortran 95, Fortran 2003, Fortran 2008, Fortran 2018 +and Fortran 2023 standards, respectively; errors are given for all extensions beyond the relevant language standard, and warnings are given for the Fortran 77 features that are permitted but obsolescent in later standards. The deprecated option @samp{-std=f2008ts} acts as an alias for @@ -910,7 +910,8 @@ nonstandard practices, but not all. However, improvements to GNU Fortran in this area are welcome. This should be used in conjunction with @option{-std=f95}, -@option{-std=f2003}, @option{-std=f2008} or @option{-std=f2018}. +@option{-std=f2003}, @option{-std=f2008}, @option{-std=f2018} +or @option{-std=f2023}. @opindex @code{pedantic-errors} @item -pedantic-errors @@ -958,8 +959,8 @@ The following example will trigger the warning. @item -Wampersand Warn about missing ampersand in continued character constants. The warning is given with @option{-Wampersand}, @option{-pedantic}, -@option{-std=f95}, @option{-std=f2003}, @option{-std=f2008} and -@option{-std=f2018}. Note: With no ampersand given in a continued +@option{-std=f95}, @option{-std=f2003}, @option{-std=f2008}, @option{-std=f2018} +and @option{-std=f203}. Note: With no ampersand given in a continued character constant, GNU Fortran assumes continuation at the first non-comment, non-whitespace character after the ampersand that initiated the continuation. @@ -1108,7 +1109,7 @@ of the Fortran Character Set. For continuation lines, a tab followed by a digit between 1 and 9 is supported. @option{-Wtabs} will cause a warning to be issued if a tab is encountered. Note, @option{-Wtabs} is active for @option{-pedantic}, @option{-std=f95}, @option{-std=f2003}, -@option{-std=f2008}, @option{-std=f2018} and +@option{-std=f2008}, @option{-std=f2018}, @option{-std=f2023} and @option{-Wall}. @opindex @code{Wundefined-do-loop} diff --git a/gcc/fortran/lang.opt b/gcc/fortran/lang.opt index 7236351a93c..08c75394aa0 100644 --- a/gcc/fortran/lang.opt +++ b/gcc/fortran/lang.opt @@ -883,6 +883,10 @@ std=f2018 Fortran Conform to the ISO Fortran 2018 standard. +std=f2023 +Fortran +Conform to the ISO Fortran 2023 standard. + std=f95 Fortran Conform to the ISO Fortran 95 standard. diff --git a/gcc/fortran/libgfortran.h b/gcc/fortran/libgfortran.h index cb84b59c99a..bdddb317ab0 100644 --- a/gcc/fortran/libgfortran.h +++ b/gcc/fortran/libgfortran.h @@ -19,9 +19,10 @@ along with GCC; see the file COPYING3. If not see /* Flags to specify which standard/extension contains a feature. - Note that no features were obsoleted nor deleted in F2003. + Note that no features were obsoleted nor deleted in F2003 nor in F2023. Please remember to keep those definitions in sync with gfortran.texi. */ +#define GFC_STD_F2023 (1<<12) /* New in F2023. */ #define GFC_STD_F2018_DEL (1<<11) /* Deleted in F2018. */ #define GFC_STD_F2018_OBS (1<<10) /* Obsolescent in F2018. */ #define GFC_STD_F2018 (1<<9) /* New in F2018. */ @@ -45,6 +46,7 @@ along with GCC; see the file COPYING3. If not see #define GFC_STD_OPT_F08 (GFC_STD_OPT_F03 | GFC_STD_F2008) #define GFC_STD_OPT_F18 ((GFC_STD_OPT_F08 | GFC_STD_F2018) \ & (~GFC_STD_F2018_DEL)) +#define GFC_STD_OPT_F23 (GFC_STD_OPT_F18 | GFC_STD_F2023) /* Bitmasks for the various FPE that can be enabled. These need to be straight integers e.g., 8 instead of (1<<3), because they will be included in Fortran source. */ diff --git a/gcc/fortran/options.cc b/gcc/fortran/options.cc index cfb195756a8..ffdc32769f1 100644 --- a/gcc/fortran/options.cc +++ b/gcc/fortran/options.cc @@ -57,7 +57,7 @@ set_default_std_flags (void) gfc_option.allow_std = GFC_STD_F95_OBS | GFC_STD_F95_DEL | GFC_STD_F2003 | GFC_STD_F2008 | GFC_STD_F95 | GFC_STD_F77 | GFC_STD_F2008_OBS | GFC_STD_GNU | GFC_STD_LEGACY - | GFC_STD_F2018 | GFC_STD_F2018_DEL | GFC_STD_F2018_OBS; + | GFC_STD_F2018 | GFC_STD_F2018_DEL | GFC_STD_F2018_OBS | GFC_STD_F2023; gfc_option.warn_std = GFC_STD_F2018_DEL | GFC_STD_F95_DEL | GFC_STD_LEGACY; } @@ -144,7 +144,7 @@ gfc_init_options (unsigned int decoded_options_count, gfc_option.module_dir = NULL; gfc_option.source_form = FORM_UNKNOWN; gfc_option.max_continue_fixed = 255; - gfc_option.max_continue_free = 255; + gfc_option.max_continue_free = 1000000; gfc_option.max_identifier_length = GFC_MAX_SYMBOL_LEN; gfc_option.max_errors = 25; @@ -266,6 +266,10 @@ gfc_post_options (const char **pfilename) cpp_warn_missing_include_dirs, 1); gfc_check_include_dirs (verbose_missing_dir_warn); + SET_OPTION_IF_UNSET (&global_options, &global_options_set, + flag_free_line_length, + (gfc_option.allow_std & GFC_STD_F2023) ? 10000 : 132); + /* Finalize DEC flags. */ post_dec_flags (flag_dec); @@ -769,6 +773,7 @@ gfc_handle_option (size_t scode, const char *arg, HOST_WIDE_INT value, case OPT_std_f2003: gfc_option.allow_std = GFC_STD_OPT_F03; gfc_option.warn_std = GFC_STD_F95_OBS; + gfc_option.max_continue_free = 255; gfc_option.max_identifier_length = 63; warn_ampersand = 1; warn_tabs = 1; @@ -777,6 +782,7 @@ gfc_handle_option (size_t scode, const char *arg, HOST_WIDE_INT value, case OPT_std_f2008: gfc_option.allow_std = GFC_STD_OPT_F08; gfc_option.warn_std = GFC_STD_F95_OBS | GFC_STD_F2008_OBS; + gfc_option.max_continue_free = 255; gfc_option.max_identifier_length = 63; warn_ampersand = 1; warn_tabs = 1; @@ -785,6 +791,16 @@ gfc_handle_option (size_t scode, const char *arg, HOST_WIDE_INT value, case OPT_std_f2008ts: case OPT_std_f2018: gfc_option.allow_std = GFC_STD_OPT_F18; + gfc_option.warn_std = GFC_STD_F95_OBS | GFC_STD_F2008_OBS + | GFC_STD_F2018_OBS; + gfc_option.max_continue_free = 255; + gfc_option.max_identifier_length = 63; + warn_ampersand = 1; + warn_tabs = 1; + break; + + case OPT_std_f2023: + gfc_option.allow_std = GFC_STD_OPT_F23; gfc_option.warn_std = GFC_STD_F95_OBS | GFC_STD_F2008_OBS | GFC_STD_F2018_OBS; gfc_option.max_identifier_length = 63; diff --git a/gcc/testsuite/gfortran.dg/continuation_5.f90 b/gcc/testsuite/gfortran.dg/continuation_5.f90 new file mode 100644 index 00000000000..646c27c6dc6 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/continuation_5.f90 @@ -0,0 +1,267 @@ +! { dg-do compile } +! { dg-options -std=f2018 } +! +! copied from continuation_4.f90 - but use -std=f2018 +! Fortran 2018: Limit is 255 <<< TESTED +! Fortran 2023: No limit +! +! PR 19262 Test limit on line continuations. Test case derived form case in PR +! by Steve Kargl. Submitted by Jerry DeLisle +print *, & + "1" // & ! 1 Counting in groups of 40. + "2" // & ! 2 + "3" // & ! 3 + "4" // & ! 4 + "5" // & ! 5 + "6" // & ! 6 + "7" // & ! 7 + "8" // & ! 8 + "9" // & ! 9 + "0" // & ! 10 + "1" // & ! 11 + "2" // & ! 12 + "3" // & ! 13 + "4" // & ! 14 + "5" // & ! 15 + "6" // & ! 16 + "7" // & ! 17 + "8" // & ! 18 + "9" // & ! 19 + "0" // & ! 20 + "1" // & ! 21 + "2" // & ! 22 + "3" // & ! 23 + "4" // & ! 24 + "5" // & ! 25 + "6" // & ! 26 + "7" // & ! 27 + "8" // & ! 28 + "9" // & ! 29 + "0" // & ! 30 + "1" // & ! 31 + "2" // & ! 32 + "3" // & ! 33 + "4" // & ! 34 + "5" // & ! 35 + "6" // & ! 36 + "7" // & ! 37 + "8" // & ! 38 + "9" // & ! 39 + "0" // & ! 40 + "1" // & ! 1 + "2" // & ! 2 + "3" // & ! 3 + "4" // & ! 4 + "5" // & ! 5 + "6" // & ! 6 + "7" // & ! 7 + "8" // & ! 8 + "9" // & ! 9 + "0" // & ! 10 + "1" // & ! 11 + "2" // & ! 12 + "3" // & ! 13 + "4" // & ! 14 + "5" // & ! 15 + "6" // & ! 16 + "7" // & ! 17 + "8" // & ! 18 + "9" // & ! 19 + "0" // & ! 20 + "1" // & ! 21 + "2" // & ! 22 + "3" // & ! 23 + "4" // & ! 24 + "5" // & ! 25 + "6" // & ! 26 + "7" // & ! 27 + "8" // & ! 28 + "9" // & ! 29 + "0" // & ! 30 + "1" // & ! 31 + "2" // & ! 32 + "3" // & ! 33 + "4" // & ! 34 + "5" // & ! 35 + "6" // & ! 36 + "7" // & ! 37 + "8" // & ! 38 + "9" // & ! 39 + "0" // & ! 80 + "1" // & ! 1 + "2" // & ! 2 + "3" // & ! 3 + "4" // & ! 4 + "5" // & ! 5 + "6" // & ! 6 + "7" // & ! 7 + "8" // & ! 8 + "9" // & ! 9 + "0" // & ! 10 + "1" // & ! 11 + "2" // & ! 12 + "3" // & ! 13 + "4" // & ! 14 + "5" // & ! 15 + "6" // & ! 16 + "7" // & ! 17 + "8" // & ! 18 + "9" // & ! 19 + "0" // & ! 20 + "1" // & ! 21 + "2" // & ! 22 + "3" // & ! 23 + "4" // & ! 24 + "5" // & ! 25 + "6" // & ! 26 + "7" // & ! 27 + "8" // & ! 28 + "9" // & ! 29 + "0" // & ! 30 + "1" // & ! 31 + "2" // & ! 32 + "3" // & ! 33 + "4" // & ! 34 + "5" // & ! 35 + "6" // & ! 36 + "7" // & ! 37 + "8" // & ! 38 + "9" // & ! 39 + "0" // & ! 120 + "1" // & ! 1 + "2" // & ! 2 + "3" // & ! 3 + "4" // & ! 4 + "5" // & ! 5 + "6" // & ! 6 + "7" // & ! 7 + "8" // & ! 8 + "9" // & ! 9 + "0" // & ! 10 + "1" // & ! 11 + "2" // & ! 12 + "3" // & ! 13 + "4" // & ! 14 + "5" // & ! 15 + "6" // & ! 16 + "7" // & ! 17 + "8" // & ! 18 + "9" // & ! 19 + "0" // & ! 20 + "1" // & ! 21 + "2" // & ! 22 + "3" // & ! 23 + "4" // & ! 24 + "5" // & ! 25 + "6" // & ! 26 + "7" // & ! 27 + "8" // & ! 28 + "9" // & ! 29 + "0" // & ! 30 + "1" // & ! 31 + "2" // & ! 32 + "3" // & ! 33 + "4" // & ! 34 + "5" // & ! 35 + "6" // & ! 36 + "7" // & ! 37 + "8" // & ! 38 + "9" // & ! 39 + "0" // & ! 160 + "1" // & ! 1 + "2" // & ! 2 + "3" // & ! 3 + "4" // & ! 4 + "5" // & ! 5 + "6" // & ! 6 + "7" // & ! 7 + "8" // & ! 8 + "9" // & ! 9 + "0" // & ! 10 + "1" // & ! 11 + "2" // & ! 12 + "3" // & ! 13 + "4" // & ! 14 + "5" // & ! 15 + "6" // & ! 16 + "7" // & ! 17 + "8" // & ! 18 + "9" // & ! 19 + "0" // & ! 20 + "1" // & ! 21 + "2" // & ! 22 + "3" // & ! 23 + "4" // & ! 24 + "5" // & ! 25 + "6" // & ! 26 + "7" // & ! 27 + "8" // & ! 28 + "9" // & ! 29 + "0" // & ! 30 + "1" // & ! 31 + "2" // & ! 32 + "3" // & ! 33 + "4" // & ! 34 + "5" // & ! 35 + "6" // & ! 36 + "7" // & ! 37 + "8" // & ! 38 + "9" // & ! 39 + "0" // & ! 200 + "1" // & ! 1 + "2" // & ! 2 + "3" // & ! 3 + "4" // & ! 4 + "5" // & ! 5 + "6" // & ! 6 + "7" // & ! 7 + "8" // & ! 8 + "9" // & ! 9 + "0" // & ! 10 + "1" // & ! 11 + "2" // & ! 12 + "3" // & ! 13 + "4" // & ! 14 + "5" // & ! 15 + "6" // & ! 16 + "7" // & ! 17 + "8" // & ! 18 + "9" // & ! 19 + "0" // & ! 20 + "1" // & ! 21 + "2" // & ! 22 + "3" // & ! 23 + "4" // & ! 24 + "5" // & ! 25 + "6" // & ! 26 + "7" // & ! 27 + "8" // & ! 28 + "9" // & ! 29 + "0" // & ! 30 + "1" // & ! 31 + "2" // & ! 32 + "3" // & ! 33 + "4" // & ! 34 + "5" // & ! 35 + "6" // & ! 36 + "7" // & ! 37 + "8" // & ! 38 + "9" // & ! 39 + "0" // & ! 240 + "1" // & ! 1 + "2" // & ! 2 + "3" // & ! 3 + "4" // & ! 4 + "5" // & ! 5 + "6" // & ! 6 + "7" // & ! 7 + "8" // & ! 8 + "9" // & ! 9 + "0" // & ! 10 + "1" // & ! 11 + "2" // & ! 12 + "3" // & ! 13 + "4" // & ! 14 + "5" // & ! 255 + "0" ! { dg-warning "Limit of 255 continuations exceeded" } +end diff --git a/gcc/testsuite/gfortran.dg/continuation_6.f90 b/gcc/testsuite/gfortran.dg/continuation_6.f90 new file mode 100644 index 00000000000..28c90613523 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/continuation_6.f90 @@ -0,0 +1,267 @@ +! { dg-do compile } +! { dg-options -std=f2023 } +! +! copied from continuation_4.f90 - but use -std=f2023 +! Fortran 2018: Limit is 255 +! Fortran 2023: No limit <<< TESTED +! +! PR 19262 Test limit on line continuations. Test case derived form case in PR +! by Steve Kargl. Submitted by Jerry DeLisle +print *, & + "1" // & ! 1 Counting in groups of 40. + "2" // & ! 2 + "3" // & ! 3 + "4" // & ! 4 + "5" // & ! 5 + "6" // & ! 6 + "7" // & ! 7 + "8" // & ! 8 + "9" // & ! 9 + "0" // & ! 10 + "1" // & ! 11 + "2" // & ! 12 + "3" // & ! 13 + "4" // & ! 14 + "5" // & ! 15 + "6" // & ! 16 + "7" // & ! 17 + "8" // & ! 18 + "9" // & ! 19 + "0" // & ! 20 + "1" // & ! 21 + "2" // & ! 22 + "3" // & ! 23 + "4" // & ! 24 + "5" // & ! 25 + "6" // & ! 26 + "7" // & ! 27 + "8" // & ! 28 + "9" // & ! 29 + "0" // & ! 30 + "1" // & ! 31 + "2" // & ! 32 + "3" // & ! 33 + "4" // & ! 34 + "5" // & ! 35 + "6" // & ! 36 + "7" // & ! 37 + "8" // & ! 38 + "9" // & ! 39 + "0" // & ! 40 + "1" // & ! 1 + "2" // & ! 2 + "3" // & ! 3 + "4" // & ! 4 + "5" // & ! 5 + "6" // & ! 6 + "7" // & ! 7 + "8" // & ! 8 + "9" // & ! 9 + "0" // & ! 10 + "1" // & ! 11 + "2" // & ! 12 + "3" // & ! 13 + "4" // & ! 14 + "5" // & ! 15 + "6" // & ! 16 + "7" // & ! 17 + "8" // & ! 18 + "9" // & ! 19 + "0" // & ! 20 + "1" // & ! 21 + "2" // & ! 22 + "3" // & ! 23 + "4" // & ! 24 + "5" // & ! 25 + "6" // & ! 26 + "7" // & ! 27 + "8" // & ! 28 + "9" // & ! 29 + "0" // & ! 30 + "1" // & ! 31 + "2" // & ! 32 + "3" // & ! 33 + "4" // & ! 34 + "5" // & ! 35 + "6" // & ! 36 + "7" // & ! 37 + "8" // & ! 38 + "9" // & ! 39 + "0" // & ! 80 + "1" // & ! 1 + "2" // & ! 2 + "3" // & ! 3 + "4" // & ! 4 + "5" // & ! 5 + "6" // & ! 6 + "7" // & ! 7 + "8" // & ! 8 + "9" // & ! 9 + "0" // & ! 10 + "1" // & ! 11 + "2" // & ! 12 + "3" // & ! 13 + "4" // & ! 14 + "5" // & ! 15 + "6" // & ! 16 + "7" // & ! 17 + "8" // & ! 18 + "9" // & ! 19 + "0" // & ! 20 + "1" // & ! 21 + "2" // & ! 22 + "3" // & ! 23 + "4" // & ! 24 + "5" // & ! 25 + "6" // & ! 26 + "7" // & ! 27 + "8" // & ! 28 + "9" // & ! 29 + "0" // & ! 30 + "1" // & ! 31 + "2" // & ! 32 + "3" // & ! 33 + "4" // & ! 34 + "5" // & ! 35 + "6" // & ! 36 + "7" // & ! 37 + "8" // & ! 38 + "9" // & ! 39 + "0" // & ! 120 + "1" // & ! 1 + "2" // & ! 2 + "3" // & ! 3 + "4" // & ! 4 + "5" // & ! 5 + "6" // & ! 6 + "7" // & ! 7 + "8" // & ! 8 + "9" // & ! 9 + "0" // & ! 10 + "1" // & ! 11 + "2" // & ! 12 + "3" // & ! 13 + "4" // & ! 14 + "5" // & ! 15 + "6" // & ! 16 + "7" // & ! 17 + "8" // & ! 18 + "9" // & ! 19 + "0" // & ! 20 + "1" // & ! 21 + "2" // & ! 22 + "3" // & ! 23 + "4" // & ! 24 + "5" // & ! 25 + "6" // & ! 26 + "7" // & ! 27 + "8" // & ! 28 + "9" // & ! 29 + "0" // & ! 30 + "1" // & ! 31 + "2" // & ! 32 + "3" // & ! 33 + "4" // & ! 34 + "5" // & ! 35 + "6" // & ! 36 + "7" // & ! 37 + "8" // & ! 38 + "9" // & ! 39 + "0" // & ! 160 + "1" // & ! 1 + "2" // & ! 2 + "3" // & ! 3 + "4" // & ! 4 + "5" // & ! 5 + "6" // & ! 6 + "7" // & ! 7 + "8" // & ! 8 + "9" // & ! 9 + "0" // & ! 10 + "1" // & ! 11 + "2" // & ! 12 + "3" // & ! 13 + "4" // & ! 14 + "5" // & ! 15 + "6" // & ! 16 + "7" // & ! 17 + "8" // & ! 18 + "9" // & ! 19 + "0" // & ! 20 + "1" // & ! 21 + "2" // & ! 22 + "3" // & ! 23 + "4" // & ! 24 + "5" // & ! 25 + "6" // & ! 26 + "7" // & ! 27 + "8" // & ! 28 + "9" // & ! 29 + "0" // & ! 30 + "1" // & ! 31 + "2" // & ! 32 + "3" // & ! 33 + "4" // & ! 34 + "5" // & ! 35 + "6" // & ! 36 + "7" // & ! 37 + "8" // & ! 38 + "9" // & ! 39 + "0" // & ! 200 + "1" // & ! 1 + "2" // & ! 2 + "3" // & ! 3 + "4" // & ! 4 + "5" // & ! 5 + "6" // & ! 6 + "7" // & ! 7 + "8" // & ! 8 + "9" // & ! 9 + "0" // & ! 10 + "1" // & ! 11 + "2" // & ! 12 + "3" // & ! 13 + "4" // & ! 14 + "5" // & ! 15 + "6" // & ! 16 + "7" // & ! 17 + "8" // & ! 18 + "9" // & ! 19 + "0" // & ! 20 + "1" // & ! 21 + "2" // & ! 22 + "3" // & ! 23 + "4" // & ! 24 + "5" // & ! 25 + "6" // & ! 26 + "7" // & ! 27 + "8" // & ! 28 + "9" // & ! 29 + "0" // & ! 30 + "1" // & ! 31 + "2" // & ! 32 + "3" // & ! 33 + "4" // & ! 34 + "5" // & ! 35 + "6" // & ! 36 + "7" // & ! 37 + "8" // & ! 38 + "9" // & ! 39 + "0" // & ! 240 + "1" // & ! 1 + "2" // & ! 2 + "3" // & ! 3 + "4" // & ! 4 + "5" // & ! 5 + "6" // & ! 6 + "7" // & ! 7 + "8" // & ! 8 + "9" // & ! 9 + "0" // & ! 10 + "1" // & ! 11 + "2" // & ! 12 + "3" // & ! 13 + "4" // & ! 14 + "5" // & ! 255 + "0" ! No warning with -std=f2023 +end diff --git a/gcc/testsuite/gfortran.dg/goacc/warn_truncated.f90 b/gcc/testsuite/gfortran.dg/goacc/warn_truncated.f90 index 15ef3f513ae..101e026701d 100644 --- a/gcc/testsuite/gfortran.dg/goacc/warn_truncated.f90 +++ b/gcc/testsuite/gfortran.dg/goacc/warn_truncated.f90 @@ -1,4 +1,5 @@ ! { dg-do compile } +! { dg-additional-options "-std=f2018" } ! PR fortran/97390 ! integer :: tempRbuffer, array, compactHaloInfo, dimsizes, nHaloLayers, gpu_nList_send, gpu_idx_send, gpu_bufferOffset_send, counter diff --git a/gcc/testsuite/gfortran.dg/gomp/warn_truncated.f90 b/gcc/testsuite/gfortran.dg/gomp/warn_truncated.f90 index 86d7eb27b30..20cd0449b9a 100644 --- a/gcc/testsuite/gfortran.dg/gomp/warn_truncated.f90 +++ b/gcc/testsuite/gfortran.dg/gomp/warn_truncated.f90 @@ -1,4 +1,5 @@ ! { dg-do compile } +! { dg-additional-options "-std=f2018" } ! ! PR fortran/94709 ! diff --git a/gcc/testsuite/gfortran.dg/line_length_10.f90 b/gcc/testsuite/gfortran.dg/line_length_10.f90 index 390e9a16358..c244172e162 100644 --- a/gcc/testsuite/gfortran.dg/line_length_10.f90 +++ b/gcc/testsuite/gfortran.dg/line_length_10.f90 @@ -1,5 +1,5 @@ ! { dg-do compile } -! { dg-options "-Wno-line-truncation" } +! { dg-options "-std=f2018 -Wno-line-truncation" } ! ! By default, for free-form source code: Error out ! But due to the explicit -Wno-line-truncation, compile w/o warning diff --git a/gcc/testsuite/gfortran.dg/line_length_11.f90 b/gcc/testsuite/gfortran.dg/line_length_11.f90 index 67f1e29a0eb..2125f5458ea 100644 --- a/gcc/testsuite/gfortran.dg/line_length_11.f90 +++ b/gcc/testsuite/gfortran.dg/line_length_11.f90 @@ -1,5 +1,5 @@ ! { dg-do compile } -! { dg-options "-Wno-all" } +! { dg-options "-Wno-all -std=f2018" } ! ! By default, for free-form source code: Error out ! But due to the explicit -Wno-all, compile w/o warning diff --git a/gcc/testsuite/gfortran.dg/line_length_12.f90 b/gcc/testsuite/gfortran.dg/line_length_12.f90 new file mode 100644 index 00000000000..c8a935a027b --- /dev/null +++ b/gcc/testsuite/gfortran.dg/line_length_12.f90 @@ -0,0 +1,31 @@ +! { dg-do compile } +! { dg-additional-options "-std=f2018" } +! { dg-prune-output "some warnings being treated as errors" } +! +! In Fortran 2018, the linelength is 132 characters. <<< Test this. +! In Fortran 2023, the linelength is 10,000 characters. + +implicit none +integer :: a, b, c, d + +a = & ! The next line has 9,999 characters -> OK + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 +4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 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 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 42 + +! { dg-error "Line truncated at .1. \\\[-Werror=line-truncation\\\]" "" { target *-*-* } .-2 } + +c = & ! The next line has 10,001 characters -> TOO LONG + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 +4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 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8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 4242 + +! { dg-error "Line truncated at .1. \\\[-Werror=line-truncation\\\]" "" { target *-*-* } .-2 } + +d = & ! The next line has 10,002 characters -> TOO LONG + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 +4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 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+ 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 42424 + +! { dg-error "Line truncated at .1. \\\[-Werror=line-truncation\\\]" "" { target *-*-* } .-2 } + +end diff --git a/gcc/testsuite/gfortran.dg/line_length_13.f90 b/gcc/testsuite/gfortran.dg/line_length_13.f90 new file mode 100644 index 00000000000..861eeb9c9be --- /dev/null +++ b/gcc/testsuite/gfortran.dg/line_length_13.f90 @@ -0,0 +1,27 @@ +! { dg-do compile } +! { dg-additional-options "-std=f2023" } +! { dg-prune-output "some warnings being treated as errors" } +! +! In Fortran 2018, the linelength is 132 characters. +! In Fortran 2023, the linelength is 10,000 characters. <<< Test this. + +implicit none +integer :: a, b, c, d + +a = & ! The next line has 9,999 characters -> OK + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 +4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 +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 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 4242 + +! { dg-error "Line truncated at .1. \\\[-Werror=line-truncation\\\]" "" { target *-*-* } .-2 } + +d = & ! The next line has 10,002 characters -> TOO LONG + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 +4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +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 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 42424 + +! { dg-error "Line truncated at .1. \\\[-Werror=line-truncation\\\]" "" { target *-*-* } .-2 } + +end diff --git a/gcc/testsuite/gfortran.dg/line_length_14.f90 b/gcc/testsuite/gfortran.dg/line_length_14.f90 new file mode 100644 index 00000000000..c4c66810d7a --- /dev/null +++ b/gcc/testsuite/gfortran.dg/line_length_14.f90 @@ -0,0 +1,28 @@ +! { dg-do compile } +! { dg-prune-output "some warnings being treated as errors" } +! +! Implied -std=gnu +! +! In Fortran 2018, the linelength is 132 characters. +! In Fortran 2023, the linelength is 10,000 characters. <<< Test this. + +implicit none +integer :: a, b, c, d + +a = & ! The next line has 9,999 characters -> OK + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 +4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 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2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 4242 + +! { dg-error "Line truncated at .1. \\\[-Werror=line-truncation\\\]" "" { target *-*-* } .-2 } + +d = & ! The next line has 10,002 characters -> TOO LONG + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 +4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 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+ 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 42424 + +! { dg-error "Line truncated at .1. \\\[-Werror=line-truncation\\\]" "" { target *-*-* } .-2 } + +end diff --git a/gcc/testsuite/gfortran.dg/line_length_2.f90 b/gcc/testsuite/gfortran.dg/line_length_2.f90 index e1ab7220d03..ff44d882257 100644 --- a/gcc/testsuite/gfortran.dg/line_length_2.f90 +++ b/gcc/testsuite/gfortran.dg/line_length_2.f90 @@ -1,7 +1,7 @@ ! Testcase for -ffree-line-length-none ! See PR fortran/21302 ! { dg-do compile } -! { dg-options "-ffree-line-length-none" } +! { dg-options "-ffree-line-length-none -std=f2018" } program two if (abs(aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa).gt.999.d0.or.abs(bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb).gt.999.d0.or.abs(cccccccccccccccccccc).gt.999.d0) THEN endif diff --git a/gcc/testsuite/gfortran.dg/line_length_5.f90 b/gcc/testsuite/gfortran.dg/line_length_5.f90 index 81832451ea2..ba9f2850b07 100644 --- a/gcc/testsuite/gfortran.dg/line_length_5.f90 +++ b/gcc/testsuite/gfortran.dg/line_length_5.f90 @@ -1,5 +1,5 @@ ! { dg-do compile } -! { dg-options "-Wline-truncation" } +! { dg-options "-std=f2018 -Wline-truncation" } print *, 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' end ! { dg-error "Line truncated" " " { target *-*-* } 3 } diff --git a/gcc/testsuite/gfortran.dg/line_length_6.f90 b/gcc/testsuite/gfortran.dg/line_length_6.f90 index 8cdb0209981..a88e2d247c0 100644 --- a/gcc/testsuite/gfortran.dg/line_length_6.f90 +++ b/gcc/testsuite/gfortran.dg/line_length_6.f90 @@ -1,5 +1,5 @@ ! { dg-do compile } -! { dg-options "" } +! { dg-options "-std=f2018" } ! ! By default, for free-form source code: Error out ! diff --git a/gcc/testsuite/gfortran.dg/line_length_7.f90 b/gcc/testsuite/gfortran.dg/line_length_7.f90 index b4ebf49c4bf..6c6d73b01c3 100644 --- a/gcc/testsuite/gfortran.dg/line_length_7.f90 +++ b/gcc/testsuite/gfortran.dg/line_length_7.f90 @@ -1,5 +1,5 @@ ! { dg-do compile } -! { dg-options "-Wno-error" } +! { dg-options "-std=f2018 -Wno-error" } ! ! By default, for free-form source code: Error out ! But due to -Wno-error, we only expect a warning diff --git a/gcc/testsuite/gfortran.dg/line_length_8.f90 b/gcc/testsuite/gfortran.dg/line_length_8.f90 index afd6cc2df46..822b09e803a 100644 --- a/gcc/testsuite/gfortran.dg/line_length_8.f90 +++ b/gcc/testsuite/gfortran.dg/line_length_8.f90 @@ -1,5 +1,5 @@ ! { dg-do compile } -! { dg-options "-Wline-truncation" } +! { dg-options "-std=f2018 -Wline-truncation" } ! ! By default, for free-form source code: Error out ! Even with -Wline-truncation, we still get an error diff --git a/gcc/testsuite/gfortran.dg/line_length_9.f90 b/gcc/testsuite/gfortran.dg/line_length_9.f90 index 6c156afc144..9f07d9a588e 100644 --- a/gcc/testsuite/gfortran.dg/line_length_9.f90 +++ b/gcc/testsuite/gfortran.dg/line_length_9.f90 @@ -1,5 +1,5 @@ ! { dg-do compile } -! { dg-options "-Wall" } +! { dg-options "-std=f2018 -Wall" } ! ! By default, for free-form source code: Error out ! Even with -Wall, we still get an error