All, This is a simple patch. The original intent was for -fdec to set -fd-lines-as-comments by default if flag_d_lines was unspecified by the user. However, currently flag_d_lines is interrogated in set_dec_flags(), usually before its final value is determined. The attached patch fixes this behavior to work as intended. Any objections for trunk? If not I think it is safe to commit. --- Fritz Reese From e2761d73e818a5095bcc130ddbafe27022e25ba6 Mon Sep 17 00:00:00 2001 From: Fritz Reese Date: Mon, 31 Jul 2017 12:46:10 -0400 Subject: [PATCH] Correctly set -fd-lines-as-comments with -fdec gcc/fortran/ * options.c (set_dec_flags, gfc_post_options): Set flag_d_lines with -fdec when not set by user. gcc/testsuite/gfortran.dg/ * dec_d_lines_1.f, dec_d_lines_2.f: New.