From 02f06e649d274e60c4c26267ec82d917daddd15b Mon Sep 17 00:00:00 2001 From: Greg McGary Date: Sat, 16 Oct 1999 01:26:10 +0000 Subject: [PATCH] top.h (ffe_is_subscript_check_): Remove extern decl. * top.h (ffe_is_subscript_check_): Remove extern decl. (ffe_is_subscript_check, ffe_set_is_subscript_check): Remove macros. * top.c (ffe_is_subscript_check_): Remove global variable. (ffe_decode_option): Remove "(no-)bounds-check" flag handling. Set flag_bounds_check for "(no-)fortran-bounds-check". * com.c (ffecom_arrayref_): s/ffe_is_subscript_check ()/flag_bounds_check/ (ffecom_char_args_x_): Ditto. From-SVN: r30037 --- gcc/f/ChangeLog | 13 ++++++++++++- gcc/f/com.c | 12 ++++++------ gcc/f/top.c | 11 +++-------- gcc/f/top.h | 5 +---- 4 files changed, 22 insertions(+), 19 deletions(-) diff --git a/gcc/f/ChangeLog b/gcc/f/ChangeLog index 5f48879ffb1..91433a2192e 100644 --- a/gcc/f/ChangeLog +++ b/gcc/f/ChangeLog @@ -1,3 +1,14 @@ +Fri Oct 15 15:18:12 1999 Greg McGary + + * top.h (ffe_is_subscript_check_): Remove extern decl. + (ffe_is_subscript_check, ffe_set_is_subscript_check): Remove macros. + * top.c (ffe_is_subscript_check_): Remove global variable. + (ffe_decode_option): Remove "(no-)bounds-check" flag handling. + Set flag_bounds_check for "(no-)fortran-bounds-check". + * com.c + (ffecom_arrayref_): s/ffe_is_subscript_check ()/flag_bounds_check/ + (ffecom_char_args_x_): Ditto. + Sun Oct 10 08:40:18 1999 Kaveh R. Ghazi * proj.h: Use HAVE_GCC_VERSION instead of explicitly testing @@ -60,7 +71,7 @@ Sat Sep 4 13:46:27 1999 Mark Mitchell * Make-lang.in (f771): Depend on ggc-callbacks.o. * Makefile.in (OBJS): Add ggc-callbacks.o. (OBJDEPS): Likewise. - + Mon Aug 30 22:05:53 1999 Kaveh R. Ghazi * com.c (language_string): Constify. diff --git a/gcc/f/com.c b/gcc/f/com.c index 189515424ec..9420b38bd4d 100644 --- a/gcc/f/com.c +++ b/gcc/f/com.c @@ -1,5 +1,5 @@ /* com.c -- Implementation File (module.c template V1.0) - Copyright (C) 1995-1998 Free Software Foundation, Inc. + Copyright (C) 1995-1999 Free Software Foundation, Inc. Contributed by James Craig Burley. This file is part of GNU Fortran. @@ -952,7 +952,7 @@ ffecom_arrayref_ (tree item, ffebld expr, int want_ptr) { min = TYPE_MIN_VALUE (TYPE_DOMAIN (array)); element = ffecom_expr_ (dims[i], NULL, NULL, NULL, FALSE, TRUE); - if (ffe_is_subscript_check ()) + if (flag_bounds_check) element = ffecom_subscript_check_ (array, element, i, total_dims, array_name); if (element == error_mark_node) @@ -998,7 +998,7 @@ ffecom_arrayref_ (tree item, ffebld expr, int want_ptr) array = TYPE_MAIN_VARIANT (TREE_TYPE (item)); element = ffecom_expr_ (dims[i], NULL, NULL, NULL, FALSE, TRUE); - if (ffe_is_subscript_check ()) + if (flag_bounds_check) element = ffecom_subscript_check_ (array, element, i, total_dims, array_name); if (element == error_mark_node) @@ -2126,7 +2126,7 @@ ffecom_char_args_x_ (tree *xitem, tree *length, ffebld expr, bool with_null) else { end_tree = ffecom_expr (end); - if (ffe_is_subscript_check ()) + if (flag_bounds_check) end_tree = ffecom_subscript_check_ (array, end_tree, 1, 0, char_name); end_tree = convert (ffecom_f2c_ftnlen_type_node, @@ -2144,7 +2144,7 @@ ffecom_char_args_x_ (tree *xitem, tree *length, ffebld expr, bool with_null) else { start_tree = ffecom_expr (start); - if (ffe_is_subscript_check ()) + if (flag_bounds_check) start_tree = ffecom_subscript_check_ (array, start_tree, 0, 0, char_name); start_tree = convert (ffecom_f2c_ftnlen_type_node, @@ -2177,7 +2177,7 @@ ffecom_char_args_x_ (tree *xitem, tree *length, ffebld expr, bool with_null) else { end_tree = ffecom_expr (end); - if (ffe_is_subscript_check ()) + if (flag_bounds_check) end_tree = ffecom_subscript_check_ (array, end_tree, 1, 0, char_name); end_tree = convert (ffecom_f2c_ftnlen_type_node, diff --git a/gcc/f/top.c b/gcc/f/top.c index 07ddd83740c..6b199881282 100644 --- a/gcc/f/top.c +++ b/gcc/f/top.c @@ -1,5 +1,5 @@ /* top.c -- Implementation File (module.c template V1.0) - Copyright (C) 1995-1997 Free Software Foundation, Inc. + Copyright (C) 1995-1997, 1999 Free Software Foundation, Inc. Contributed by James Craig Burley. This file is part of GNU Fortran. @@ -83,7 +83,6 @@ bool ffe_is_mainprog_; /* TRUE if current prog unit known to be bool ffe_is_null_version_ = FALSE; bool ffe_is_onetrip_ = FALSE; bool ffe_is_silent_ = TRUE; -bool ffe_is_subscript_check_ = FALSE; bool ffe_is_typeless_boz_ = FALSE; bool ffe_is_pedantic_ = FFETARGET_defaultIS_PEDANTIC; bool ffe_is_saveall_; /* TRUE if mainprog or SAVE (no args) seen. */ @@ -323,14 +322,10 @@ ffe_decode_option (argc, argv) ffe_set_is_globals (TRUE); else if (strcmp (&opt[2], "no-globals") == 0) ffe_set_is_globals (FALSE); - else if (strcmp (&opt[2], "bounds-check") == 0) - ffe_set_is_subscript_check (TRUE); - else if (strcmp (&opt[2], "no-bounds-check") == 0) - ffe_set_is_subscript_check (FALSE); else if (strcmp (&opt[2], "fortran-bounds-check") == 0) - ffe_set_is_subscript_check (TRUE); + flag_bounds_check = TRUE; else if (strcmp (&opt[2], "no-fortran-bounds-check") == 0) - ffe_set_is_subscript_check (FALSE); + flag_bounds_check = FALSE; else if (strcmp (&opt[2], "typeless-boz") == 0) ffe_set_is_typeless_boz (TRUE); else if (strcmp (&opt[2], "no-typeless-boz") == 0) diff --git a/gcc/f/top.h b/gcc/f/top.h index c5deea8a700..3c92c269226 100644 --- a/gcc/f/top.h +++ b/gcc/f/top.h @@ -1,5 +1,5 @@ /* top.h -- Public #include File (module.h template V1.0) - Copyright (C) 1995-1997 Free Software Foundation, Inc. + Copyright (C) 1995-1997, 1999 Free Software Foundation, Inc. Contributed by James Craig Burley. This file is part of GNU Fortran. @@ -98,7 +98,6 @@ extern bool ffe_is_mainprog_; extern bool ffe_is_null_version_; extern bool ffe_is_onetrip_; extern bool ffe_is_silent_; -extern bool ffe_is_subscript_check_; extern bool ffe_is_typeless_boz_; extern bool ffe_is_pedantic_; extern bool ffe_is_saveall_; @@ -191,7 +190,6 @@ void ffe_terminate_4 (void); #define ffe_is_saveall() ffe_is_saveall_ #define ffe_is_second_underscore() ffe_is_second_underscore_ #define ffe_is_silent() ffe_is_silent_ -#define ffe_is_subscript_check() ffe_is_subscript_check_ #define ffe_is_typeless_boz() ffe_is_typeless_boz_ #define ffe_is_ugly_args() ffe_is_ugly_args_ #define ffe_is_ugly_assign() ffe_is_ugly_assign_ @@ -243,7 +241,6 @@ void ffe_terminate_4 (void); #define ffe_set_is_saveall(f) (ffe_is_saveall_ = (f)) #define ffe_set_is_second_underscore(f) (ffe_is_second_underscore_ = (f)) #define ffe_set_is_silent(f) (ffe_is_silent_ = (f)) -#define ffe_set_is_subscript_check(f) (ffe_is_subscript_check_ = (f)) #define ffe_set_is_typeless_boz(f) (ffe_is_typeless_boz_ = (f)) #define ffe_set_is_ugly_args(f) (ffe_is_ugly_args_ = (f)) #define ffe_set_is_ugly_assign(f) (ffe_is_ugly_assign_ = (f)) -- 2.30.2