diff options
author | Fritz Reese <fritzoreese@gmail.com> | 2017-08-10 12:36:44 +0000 |
---|---|---|
committer | Fritz Reese <foreese@gcc.gnu.org> | 2017-08-10 12:36:44 +0000 |
commit | 57e1270f58ad000b55282ae12b3c641f940bc923 (patch) | |
tree | ec223d9e9ea6f23e81c0be67fa969f3431c28183 /gcc/fortran/options.c | |
parent | 6f855a26ab2d30bc7f3b0cfec456e2b27e63b9a7 (diff) | |
download | gcc-57e1270f58ad000b55282ae12b3c641f940bc923.zip gcc-57e1270f58ad000b55282ae12b3c641f940bc923.tar.gz gcc-57e1270f58ad000b55282ae12b3c641f940bc923.tar.bz2 |
options.c (set_dec_flags, [...]): Only set flag_d_lines with -fdec when not set by user.
2017-08-10 Fritz Reese <Reese-Fritz@zai.com>
gcc/fortran/ChangeLog:
* options.c (set_dec_flags, gfc_post_options): Only set flag_d_lines
with -fdec when not set by user.
gcc/testsuite/ChangeLog:
gfortran.dg/
* dec_d_lines_1.f, dec_d_lines_2.f: New.
From-SVN: r251024
Diffstat (limited to 'gcc/fortran/options.c')
-rw-r--r-- | gcc/fortran/options.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/gcc/fortran/options.c b/gcc/fortran/options.c index 283c835..cd254e9 100644 --- a/gcc/fortran/options.c +++ b/gcc/fortran/options.c @@ -57,9 +57,6 @@ set_dec_flags (int value) | GFC_STD_GNU | GFC_STD_LEGACY; gfc_option.warn_std &= ~(GFC_STD_LEGACY | GFC_STD_F95_DEL); - /* Set -fd-lines-as-comments by default. */ - if (value && gfc_current_form != FORM_FREE && gfc_option.flag_d_lines == -1) - gfc_option.flag_d_lines = 0; /* Set other DEC compatibility extensions. */ flag_dollar_ok |= value; @@ -339,8 +336,15 @@ gfc_post_options (const char **pfilename) diagnostic_classify_diagnostic (global_dc, OPT_Wline_truncation, DK_ERROR, UNKNOWN_LOCATION); } - else if (warn_line_truncation == -1) - warn_line_truncation = 0; + else + { + /* With -fdec, set -fd-lines-as-comments by default in fixed form. */ + if (flag_dec && gfc_option.flag_d_lines == -1) + gfc_option.flag_d_lines = 0; + + if (warn_line_truncation == -1) + warn_line_truncation = 0; + } /* If -pedantic, warn about the use of GNU extensions. */ if (pedantic && (gfc_option.allow_std & GFC_STD_GNU) != 0) |