Mercurial > hg > CbC > CbC_gcc
diff gcc/fortran/options.c @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children | 1830386684a0 |
line wrap: on
line diff
--- a/gcc/fortran/options.c Fri Oct 27 22:46:09 2017 +0900 +++ b/gcc/fortran/options.c Thu Oct 25 07:37:49 2018 +0900 @@ -1,5 +1,5 @@ /* Parse and display command line options. - Copyright (C) 2000-2017 Free Software Foundation, Inc. + Copyright (C) 2000-2018 Free Software Foundation, Inc. Contributed by Andy Vaught This file is part of GCC. @@ -42,8 +42,9 @@ { gfc_option.allow_std = GFC_STD_F95_OBS | GFC_STD_F95_DEL | GFC_STD_F2003 | GFC_STD_F2008 | GFC_STD_F95 | GFC_STD_F77 - | GFC_STD_F2008_OBS | GFC_STD_F2008_TS | GFC_STD_GNU | GFC_STD_LEGACY; - gfc_option.warn_std = GFC_STD_F95_DEL | GFC_STD_LEGACY; + | GFC_STD_F2008_OBS | GFC_STD_GNU | GFC_STD_LEGACY + | GFC_STD_F2018 | GFC_STD_F2018_DEL | GFC_STD_F2018_OBS; + gfc_option.warn_std = GFC_STD_F2018_DEL | GFC_STD_F95_DEL | GFC_STD_LEGACY; } @@ -312,6 +313,7 @@ if (gfc_current_form == FORM_UNKNOWN) { gfc_current_form = FORM_FREE; + main_input_filename = filename; gfc_warning_now (0, "Reading file %qs as free form", (filename[0] == '\0') ? "<stdin>" : filename); } @@ -415,7 +417,12 @@ specified it directly. */ if (flag_frontend_optimize == -1) - flag_frontend_optimize = optimize; + flag_frontend_optimize = optimize && !optimize_debug; + + /* Same for front end loop interchange. */ + + if (flag_frontend_loop_interchange == -1) + flag_frontend_loop_interchange = optimize; if (flag_max_array_constructor < 65535) flag_max_array_constructor = 65535; @@ -558,7 +565,7 @@ result = 1; break; } - else if (optname[n] && pos > 3 && strncmp ("no-", arg, 3) == 0 + else if (optname[n] && pos > 3 && gfc_str_startswith (arg, "no-") && strncmp (optname[n], arg+3, pos-3) == 0) { gfc_option.rtcheck &= ~optmask[n]; @@ -578,7 +585,7 @@ recognized and handled. */ bool -gfc_handle_option (size_t scode, const char *arg, int value, +gfc_handle_option (size_t scode, const char *arg, HOST_WIDE_INT value, int kind ATTRIBUTE_UNUSED, location_t loc ATTRIBUTE_UNUSED, const struct cl_option_handlers *handlers ATTRIBUTE_UNUSED) { @@ -698,8 +705,7 @@ break; case OPT_std_f95: - gfc_option.allow_std = GFC_STD_F95_OBS | GFC_STD_F95 | GFC_STD_F77 - | GFC_STD_F2008_OBS; + gfc_option.allow_std = GFC_STD_OPT_F95; gfc_option.warn_std = GFC_STD_F95_OBS; gfc_option.max_continue_fixed = 19; gfc_option.max_continue_free = 39; @@ -709,8 +715,7 @@ break; case OPT_std_f2003: - gfc_option.allow_std = GFC_STD_F95_OBS | GFC_STD_F77 - | GFC_STD_F2003 | GFC_STD_F95 | GFC_STD_F2008_OBS; + gfc_option.allow_std = GFC_STD_OPT_F03; gfc_option.warn_std = GFC_STD_F95_OBS; gfc_option.max_identifier_length = 63; warn_ampersand = 1; @@ -718,8 +723,7 @@ break; case OPT_std_f2008: - gfc_option.allow_std = GFC_STD_F95_OBS | GFC_STD_F77 - | GFC_STD_F2003 | GFC_STD_F95 | GFC_STD_F2008 | GFC_STD_F2008_OBS; + gfc_option.allow_std = GFC_STD_OPT_F08; gfc_option.warn_std = GFC_STD_F95_OBS | GFC_STD_F2008_OBS; gfc_option.max_identifier_length = 63; warn_ampersand = 1; @@ -727,10 +731,10 @@ break; case OPT_std_f2008ts: - gfc_option.allow_std = GFC_STD_F95_OBS | GFC_STD_F77 - | GFC_STD_F2003 | GFC_STD_F95 | GFC_STD_F2008 | GFC_STD_F2008_OBS - | GFC_STD_F2008_TS; - gfc_option.warn_std = GFC_STD_F95_OBS | GFC_STD_F2008_OBS; + case OPT_std_f2018: + gfc_option.allow_std = GFC_STD_OPT_F18; + gfc_option.warn_std = GFC_STD_F95_OBS | GFC_STD_F2008_OBS + | GFC_STD_F2018_OBS; gfc_option.max_identifier_length = 63; warn_ampersand = 1; warn_tabs = 1;