summaryrefslogtreecommitdiff
path: root/gcc/fortran/options.c
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2017-05-02 14:43:35 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2017-05-02 14:43:35 +0000
commit34efdaf078b01a7387007c4e6bde6db86384c4b7 (patch)
treed503eaf41d085669d1481bb46ec038bc866fece6 /gcc/fortran/options.c
parentf733cf303bcdc952c92b81dd62199a40a1f555ec (diff)
downloadgcc-tarball-master.tar.gz
gcc-7.1.0gcc-7.1.0
Diffstat (limited to 'gcc/fortran/options.c')
-rw-r--r--gcc/fortran/options.c38
1 files changed, 29 insertions, 9 deletions
diff --git a/gcc/fortran/options.c b/gcc/fortran/options.c
index 5a91ec1b20..1af76aa81e 100644
--- a/gcc/fortran/options.c
+++ b/gcc/fortran/options.c
@@ -1,5 +1,5 @@
/* Parse and display command line options.
- Copyright (C) 2000-2016 Free Software Foundation, Inc.
+ Copyright (C) 2000-2017 Free Software Foundation, Inc.
Contributed by Andy Vaught
This file is part of GCC.
@@ -47,12 +47,27 @@ set_default_std_flags (void)
}
-/* Set all the DEC extension flags. */
+/* Set all the DEC extension flags. */
static void
set_dec_flags (int value)
{
- gfc_option.flag_dec_structure = value;
+ /* Allow legacy code without warnings. */
+ gfc_option.allow_std |= GFC_STD_F95_OBS | GFC_STD_F95_DEL
+ | 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;
+ flag_cray_pointer |= value;
+ flag_dec_structure |= value;
+ flag_dec_intrinsic_ints |= value;
+ flag_dec_static |= value;
+ flag_dec_math |= value;
}
@@ -208,8 +223,7 @@ gfc_post_options (const char **pfilename)
/* Excess precision other than "fast" requires front-end
support. */
- if (flag_excess_precision_cmdline == EXCESS_PRECISION_STANDARD
- && TARGET_FLT_EVAL_METHOD_NON_DEFAULT)
+ if (flag_excess_precision_cmdline == EXCESS_PRECISION_STANDARD)
sorry ("-fexcess-precision=standard for Fortran");
flag_excess_precision_cmdline = EXCESS_PRECISION_FAST;
@@ -374,10 +388,16 @@ gfc_post_options (const char **pfilename)
if (!flag_automatic)
flag_max_stack_var_size = 0;
- /* If we call BLAS directly, only inline up to the BLAS limit. */
+ /* If the user did not specify an inline matmul limit, inline up to the BLAS
+ limit or up to 30 if no external BLAS is specified. */
- if (flag_external_blas && flag_inline_matmul_limit < 0)
- flag_inline_matmul_limit = flag_blas_matmul_limit;
+ if (flag_inline_matmul_limit < 0)
+ {
+ if (flag_external_blas)
+ flag_inline_matmul_limit = flag_blas_matmul_limit;
+ else
+ flag_inline_matmul_limit = 30;
+ }
/* Optimization implies front end optimization, unless the user
specified it directly. */
@@ -727,7 +747,7 @@ gfc_handle_option (size_t scode, const char *arg, int value,
break;
case OPT_fdec_structure:
- gfc_option.flag_dec_structure = 1;
+ flag_dec_structure = 1;
break;
}