summaryrefslogtreecommitdiff
path: root/gcc/fortran
diff options
context:
space:
mode:
authorjvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4>2008-06-15 20:00:41 +0000
committerjvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4>2008-06-15 20:00:41 +0000
commitbd9c6afef4fdabb5d8566dacdcdaeb80b3a55acb (patch)
tree4cf334140b80931476eaef8dc63ae264e680ff4a /gcc/fortran
parent73de90a35a9708d1cc00a2dd17e7f4f42bdd811b (diff)
downloadgcc-bd9c6afef4fdabb5d8566dacdcdaeb80b3a55acb.tar.gz
2008-06-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/36515 * trans-decl.c (gfc_generate_function_code): Add range_check to options array. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@136821 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran')
-rw-r--r--gcc/fortran/ChangeLog6
-rw-r--r--gcc/fortran/trans-decl.c8
2 files changed, 12 insertions, 2 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index 82ca881e7bb..307af676b8a 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,9 @@
+2008-06-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
+
+ PR fortran/36515
+ * trans-decl.c (gfc_generate_function_code): Add range_check to options
+ array.
+
2008-06-15 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* gfc-internals.texi: Expand TABs, drop indentation outside examples.
diff --git a/gcc/fortran/trans-decl.c b/gcc/fortran/trans-decl.c
index 57914ae7a42..686e059ec4e 100644
--- a/gcc/fortran/trans-decl.c
+++ b/gcc/fortran/trans-decl.c
@@ -3292,9 +3292,13 @@ gfc_generate_function_code (gfc_namespace * ns)
build_int_cst (integer_type_node,
flag_bounds_check), array);
+ array = tree_cons (NULL_TREE,
+ build_int_cst (integer_type_node,
+ gfc_option.flag_range_check), array);
+
array_type = build_array_type (integer_type_node,
build_index_type (build_int_cst (NULL_TREE,
- 6)));
+ 7)));
array = build_constructor_from_list (array_type, nreverse (array));
TREE_CONSTANT (array) = 1;
TREE_STATIC (array) = 1;
@@ -3308,7 +3312,7 @@ gfc_generate_function_code (gfc_namespace * ns)
var = gfc_build_addr_expr (pvoid_type_node, var);
tmp = build_call_expr (gfor_fndecl_set_options, 2,
- build_int_cst (integer_type_node, 7), var);
+ build_int_cst (integer_type_node, 8), var);
gfc_add_expr_to_block (&body, tmp);
}