diff options
author | Tobias Burnus <tobias@codesourcery.com> | 2023-11-17 13:34:55 +0100 |
---|---|---|
committer | Tobias Burnus <tobias@codesourcery.com> | 2023-11-17 13:34:55 +0100 |
commit | b9eba3baf54b4fc25c3006768bb945058622658b (patch) | |
tree | 0c48ceb04bf97204b1701352be80059cc4c1f831 /gcc/fortran/libgfortran.h | |
parent | 68221c54a9752dbf131c231413edfd21046f8dad (diff) | |
download | gcc-b9eba3baf54b4fc25c3006768bb945058622658b.zip gcc-b9eba3baf54b4fc25c3006768bb945058622658b.tar.gz gcc-b9eba3baf54b4fc25c3006768bb945058622658b.tar.bz2 |
Fortran: Accept -std=f2023, 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_17.f90: New test.
* gfortran.dg/continuation_18.f90: New test.
* gfortran.dg/continuation_19.f: New test.
* gfortran.dg/line_length_12.f90: New test.
* gfortran.dg/line_length_13.f90: New test.
Diffstat (limited to 'gcc/fortran/libgfortran.h')
-rw-r--r-- | gcc/fortran/libgfortran.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/fortran/libgfortran.h b/gcc/fortran/libgfortran.h index cb84b59..bdddb31 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. */ |