aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/trans-expr.c
diff options
context:
space:
mode:
authorTobias Burnus <burnus@net-b.de>2014-12-16 21:44:45 +0100
committerTobias Burnus <burnus@gcc.gnu.org>2014-12-16 21:44:45 +0100
commitc61819ff0f851ca343362f742f819bb459880eb6 (patch)
treed102a0fa85741b2b8e259078e943f9ba1f72a927 /gcc/fortran/trans-expr.c
parent931977d9191b542c356d2dfa3258c8d09a6b8498 (diff)
downloadgcc-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/trans-expr.c')
-rw-r--r--gcc/fortran/trans-expr.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/fortran/trans-expr.c b/gcc/fortran/trans-expr.c
index 143decc..39cfb2f 100644
--- a/gcc/fortran/trans-expr.c
+++ b/gcc/fortran/trans-expr.c
@@ -2056,7 +2056,7 @@ gfc_conv_variable (gfc_se * se, gfc_expr * expr)
se->expr);
/* Dereference scalar hidden result. */
- if (gfc_option.flag_f2c && sym->ts.type == BT_COMPLEX
+ if (flag_f2c && sym->ts.type == BT_COMPLEX
&& (sym->attr.function || sym->attr.result)
&& !sym->attr.dimension && !sym->attr.pointer
&& !sym->attr.always_explicit)
@@ -5301,7 +5301,7 @@ gfc_conv_procedure_call (gfc_se * se, gfc_symbol * sym,
}
else
{
- gcc_assert (gfc_option.flag_f2c && ts.type == BT_COMPLEX);
+ gcc_assert (flag_f2c && ts.type == BT_COMPLEX);
type = gfc_get_complex_type (ts.kind);
var = gfc_build_addr_expr (NULL_TREE, gfc_create_var (type, "cmplx"));
@@ -5382,7 +5382,7 @@ gfc_conv_procedure_call (gfc_se * se, gfc_symbol * sym,
return a double precision result. Convert this back to default
real. We only care about the cases that can happen in Fortran 77.
*/
- if (gfc_option.flag_f2c && sym->ts.type == BT_REAL
+ if (flag_f2c && sym->ts.type == BT_REAL
&& sym->ts.kind == gfc_default_real_kind
&& !sym->attr.always_explicit)
se->expr = fold_convert (gfc_get_real_type (sym->ts.kind), se->expr);
@@ -5433,7 +5433,7 @@ gfc_conv_procedure_call (gfc_se * se, gfc_symbol * sym,
}
else
{
- gcc_assert (ts.type == BT_COMPLEX && gfc_option.flag_f2c);
+ gcc_assert (ts.type == BT_COMPLEX && flag_f2c);
se->expr = build_fold_indirect_ref_loc (input_location, var);
}
}