summaryrefslogtreecommitdiff
path: root/gcc/c/c-array-notation.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/c/c-array-notation.c')
-rw-r--r--gcc/c/c-array-notation.c21
1 files changed, 9 insertions, 12 deletions
diff --git a/gcc/c/c-array-notation.c b/gcc/c/c-array-notation.c
index 6a5631c3b6f..0ac6ba8e119 100644
--- a/gcc/c/c-array-notation.c
+++ b/gcc/c/c-array-notation.c
@@ -70,6 +70,7 @@
#include "coretypes.h"
#include "tree.h"
#include "c-tree.h"
+#include "gimple-expr.h"
#include "tree-iterator.h"
#include "opts.h"
#include "c-family/c-common.h"
@@ -282,8 +283,7 @@ fix_builtin_array_notation_fn (tree an_builtin_fn, tree *new_var)
for (ii = 0; ii < rank; ii++)
{
- an_loop_info[ii].var = build_decl (location, VAR_DECL, NULL_TREE,
- integer_type_node);
+ an_loop_info[ii].var = create_tmp_var (integer_type_node, NULL);
an_loop_info[ii].ind_init =
build_modify_expr (location, an_loop_info[ii].var,
TREE_TYPE (an_loop_info[ii].var), NOP_EXPR,
@@ -781,8 +781,8 @@ build_array_notation_expr (location_t location, tree lhs, tree lhs_origtype,
for (ii = 0; ii < lhs_rank; ii++)
if (lhs_an_info[0][ii].is_vector)
{
- lhs_an_loop_info[ii].var = build_decl (location, VAR_DECL, NULL_TREE,
- integer_type_node);
+ lhs_an_loop_info[ii].var = create_tmp_var (integer_type_node,
+ NULL);
lhs_an_loop_info[ii].ind_init = build_modify_expr
(location, lhs_an_loop_info[ii].var,
TREE_TYPE (lhs_an_loop_info[ii].var), NOP_EXPR,
@@ -793,8 +793,8 @@ build_array_notation_expr (location_t location, tree lhs, tree lhs_origtype,
{
/* When we have a polynomial, we assume that the indices are of type
integer. */
- rhs_an_loop_info[ii].var = build_decl (location, VAR_DECL, NULL_TREE,
- integer_type_node);
+ rhs_an_loop_info[ii].var = create_tmp_var (integer_type_node,
+ NULL);
rhs_an_loop_info[ii].ind_init = build_modify_expr
(location, rhs_an_loop_info[ii].var,
TREE_TYPE (rhs_an_loop_info[ii].var), NOP_EXPR,
@@ -970,8 +970,7 @@ fix_conditional_array_notations_1 (tree stmt)
cilkplus_extract_an_triplets (array_list, list_size, rank, &an_info);
for (ii = 0; ii < rank; ii++)
{
- an_loop_info[ii].var = build_decl (location, VAR_DECL, NULL_TREE,
- integer_type_node);
+ an_loop_info[ii].var = create_tmp_var (integer_type_node, NULL);
an_loop_info[ii].ind_init =
build_modify_expr (location, an_loop_info[ii].var,
TREE_TYPE (an_loop_info[ii].var), NOP_EXPR,
@@ -1067,8 +1066,7 @@ fix_array_notation_expr (location_t location, enum tree_code code,
loop_init = push_stmt_list ();
for (ii = 0; ii < rank; ii++)
{
- an_loop_info[ii].var = build_decl (location, VAR_DECL, NULL_TREE,
- integer_type_node);
+ an_loop_info[ii].var = create_tmp_var (integer_type_node, NULL);
an_loop_info[ii].ind_init =
build_modify_expr (location, an_loop_info[ii].var,
TREE_TYPE (an_loop_info[ii].var), NOP_EXPR,
@@ -1163,8 +1161,7 @@ fix_array_notation_call_expr (tree arg)
}
for (ii = 0; ii < rank; ii++)
{
- an_loop_info[ii].var = build_decl (location, VAR_DECL, NULL_TREE,
- integer_type_node);
+ an_loop_info[ii].var = create_tmp_var (integer_type_node, NULL);
an_loop_info[ii].ind_init =
build_modify_expr (location, an_loop_info[ii].var,
TREE_TYPE (an_loop_info[ii].var), NOP_EXPR, location,