aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/trans-expr.c
diff options
context:
space:
mode:
authorFrancois-Xavier Coudert <fxcoudert@gcc.gnu.org>2009-03-28 12:52:08 +0000
committerTobias Burnus <burnus@gcc.gnu.org>2009-03-28 13:52:08 +0100
commitd3d3011f933aaeb59829db58cc44d19e47e32e22 (patch)
treea09667a5c8ec70fa85fff4377dcf431f1430afdc /gcc/fortran/trans-expr.c
parent257eb6e3ef00aa111907c4b9411aaa81cdc80396 (diff)
downloadgcc-d3d3011f933aaeb59829db58cc44d19e47e32e22.zip
gcc-d3d3011f933aaeb59829db58cc44d19e47e32e22.tar.gz
gcc-d3d3011f933aaeb59829db58cc44d19e47e32e22.tar.bz2
gfortran.h (gfc_option_t): Add rtcheck.
2009-03-28 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> Paul Thomas <pault@gcc.gnu.org> Tobias Burnus <burnus@net-b.de> * gfortran.h (gfc_option_t): Add rtcheck. * lang.opt: New option -fruntime-check. * libgfortran.h: Add GFC_RTCHECK_* constants. * invoke.texi: Document -fruntime-check. * options.c (gfc_handle_runtime_check_option): New function. (gfc_init_options,gfc_post_options,gfc_handle_option): Add -fruntime-check option. Co-Authored-By: Paul Thomas <pault@gcc.gnu.org> Co-Authored-By: Tobias Burnus <burnus@net-b.de> From-SVN: r145183
Diffstat (limited to 'gcc/fortran/trans-expr.c')
-rw-r--r--gcc/fortran/trans-expr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/fortran/trans-expr.c b/gcc/fortran/trans-expr.c
index 89fcadf..91485d1 100644
--- a/gcc/fortran/trans-expr.c
+++ b/gcc/fortran/trans-expr.c
@@ -398,7 +398,7 @@ gfc_conv_substring (gfc_se * se, gfc_ref * ref, int kind,
if (!CONSTANT_CLASS_P (end.expr) && !DECL_P (end.expr))
end.expr = gfc_evaluate_now (end.expr, &se->pre);
- if (flag_bounds_check)
+ if (gfc_option.rtcheck & GFC_RTCHECK_BOUNDS)
{
tree nonempty = fold_build2 (LE_EXPR, boolean_type_node,
start.expr, end.expr);
@@ -2988,7 +2988,7 @@ gfc_conv_function_call (gfc_se * se, gfc_symbol * sym,
{
if (sym->attr.dimension)
{
- if (flag_bounds_check)
+ if (gfc_option.rtcheck & GFC_RTCHECK_BOUNDS)
{
/* Check the data pointer hasn't been modified. This would
happen in a function returning a pointer. */