diff options
author | Tobias Burnus <burnus@net-b.de> | 2014-12-16 21:44:45 +0100 |
---|---|---|
committer | Tobias Burnus <burnus@gcc.gnu.org> | 2014-12-16 21:44:45 +0100 |
commit | c61819ff0f851ca343362f742f819bb459880eb6 (patch) | |
tree | d102a0fa85741b2b8e259078e943f9ba1f72a927 /gcc/fortran/parse.c | |
parent | 931977d9191b542c356d2dfa3258c8d09a6b8498 (diff) | |
download | gcc-c61819ff0f851ca343362f742f819bb459880eb6.zip gcc-c61819ff0f851ca343362f742f819bb459880eb6.tar.gz gcc-c61819ff0f851ca343362f742f819bb459880eb6.tar.bz2 |
re PR fortran/54687 (Use gcc option machinery for gfortran)
2014-12-16 Tobias Burnus <burnus@net-b.de>
PR fortran/54687
* gfortran.h (gfc_option_t): Remove flags which now
have a Var().
* lang.opt (flag-aggressive_function_elimination,
flag-align_commons, flag-all_intrinsics,
flag-allow_leading_underscore, flag-automatic, flag-backslash,
flag-backtrace, flag-blas_matmul_limit, flag-cray_pointer,
flag-dollar_ok, flag-dump_fortran_original,
flag-dump_fortran_optimized, flag-external_blas, flag-f2c,
flag-implicit_none, flag-max_array_constructor,
flag-module_private, flag-pack_derived, flag-range_check,
flag-recursive, flag-repack_arrays, flag-sign_zero,
flag-underscoring): Add Var() and, where applicable, Enum().
* options.c (gfc_init_options, gfc_post_options,
gfc_handle_option): Update for *.opt changes.
* arith.c: Update for flag-variable name changes.
* array.c: Ditto.
* cpp.c: Ditto.
* decl.c: Ditto.
* expr.c: Ditto.
* f95-lang.c: Ditto.
* frontend-passes.c: Ditto.
* intrinsic.c: Ditto.
* io.c: Ditto.
* match.c: Ditto.
* module.c: Ditto.
* parse.c: Ditto.
* primary.c: Ditto.
* resolve.c: Ditto.
* scanner.c: Ditto.
* simplify.c: Ditto.
* symbol.c: Ditto.
* trans-array.c: Ditto.
* trans-common.c: Ditto.
* trans-decl.c: Ditto.
* trans-expr.c: Ditto.
* trans-intrinsic.c: Ditto.
* trans-openmp.c: Ditto.
* trans-types.c: Ditto.
From-SVN: r218792
Diffstat (limited to 'gcc/fortran/parse.c')
-rw-r--r-- | gcc/fortran/parse.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/gcc/fortran/parse.c b/gcc/fortran/parse.c index 54c0cdc..b4fa61e 100644 --- a/gcc/fortran/parse.c +++ b/gcc/fortran/parse.c @@ -22,6 +22,7 @@ along with GCC; see the file COPYING3. If not see #include "system.h" #include <setjmp.h> #include "coretypes.h" +#include "flags.h" #include "gfortran.h" #include "match.h" #include "parse.h" @@ -574,7 +575,7 @@ decode_statement (void) /* Like match, but don't match anything if not -fopenmp. */ #define matcho(keyword, subr, st) \ do { \ - if (!gfc_option.gfc_flag_openmp) \ + if (!flag_openmp) \ ; \ else if (match_word (keyword, subr, &old_locus) \ == MATCH_YES) \ @@ -769,7 +770,7 @@ decode_omp_directive (void) not -fopenmp and simd_matched is false, i.e. if a directive other than one marked with match has been seen. */ - if (gfc_option.gfc_flag_openmp || simd_matched) + if (flag_openmp || simd_matched) { if (!gfc_error_check ()) gfc_error_now ("Unclassifiable OpenMP directive at %C"); @@ -896,9 +897,7 @@ next_free (void) return decode_gcc_attribute (); } - else if (c == '$' - && (gfc_option.gfc_flag_openmp - || gfc_option.gfc_flag_openmp_simd)) + else if (c == '$' && (flag_openmp || flag_openmp_simd)) { int i; @@ -988,8 +987,7 @@ next_fixed (void) return decode_gcc_attribute (); } else if (c == '$' - && (gfc_option.gfc_flag_openmp - || gfc_option.gfc_flag_openmp_simd)) + && (flag_openmp || flag_openmp_simd)) { for (i = 0; i < 4; i++, c = gfc_next_char_literal (NONSTRING)) gcc_assert ((char) gfc_wide_tolower (c) == "$omp"[i]); @@ -5085,7 +5083,7 @@ loop: gfc_resolve (gfc_current_ns); /* Dump the parse tree if requested. */ - if (gfc_option.dump_fortran_original) + if (flag_dump_fortran_original) gfc_dump_parse_tree (gfc_current_ns, stdout); gfc_get_errors (NULL, &errors); @@ -5132,7 +5130,7 @@ prog_units: /* Do the parse tree dump. */ gfc_current_ns - = gfc_option.dump_fortran_original ? gfc_global_ns_list : NULL; + = flag_dump_fortran_original ? gfc_global_ns_list : NULL; for (; gfc_current_ns; gfc_current_ns = gfc_current_ns->sibling) if (!gfc_current_ns->proc_name |