-2017-08-10 Fritz Reese <Reese-Fritz@zai.com>
+2017-08-10 Fritz Reese <fritzoreese@gmail.com>
+
+ * options.c (set_dec_flags, gfc_post_options): Only set flag_d_lines
+ with -fdec when not set by user.
+
+2017-08-10 Fritz Reese <fritzoreese@gmail.com>
* decl.c (attr_seen): New static variable.
* decl.c (variable_decl): Match %FILL in STRUCTURE body.
| 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;
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)
-2017-08-10 Fritz Reese <Reese-Fritz@zai.com>
+2017-08-10 Fritz Reese <fritzoreese@gmail.com>
+
+ * gfortran.dg/dec_d_lines_1.f: New test.
+ * gfortran.dg/dec_d_lines_2.f: New test.
+
+2017-08-10 Fritz Reese <fritzoreese@gmail.com>
* gfortran.dg/dec_structure_18.f90: New test.
* gfortran.dg/dec_structure_19.f90: New test.