tree name, cst;
gimple load;
gimple_stmt_iterator gsi = gsi_for_stmt (swtch);
+ location_t loc = gimple_location (swtch);
gcc_assert (info.default_values[num]);
ctor = build_constructor (array_type, info.constructors[num]);
TREE_CONSTANT (ctor) = true;
- decl = build_decl (VAR_DECL, NULL_TREE, array_type);
+ decl = build_decl (loc, VAR_DECL, NULL_TREE, array_type);
TREE_STATIC (decl) = 1;
DECL_INITIAL (decl) = ctor;
build_arrays (gimple swtch)
{
tree arr_index_type;
- tree tidx, sub;
+ tree tidx, sub, tmp;
gimple stmt;
gimple_stmt_iterator gsi;
int i;
gsi = gsi_for_stmt (swtch);
arr_index_type = build_index_type (info.range_size);
- tidx = make_ssa_name (create_tmp_var (arr_index_type, "csti"), NULL);
+ tmp = create_tmp_var (arr_index_type, "csti");
+ add_referenced_var (tmp);
+ tidx = make_ssa_name (tmp, NULL);
sub = fold_build2 (MINUS_EXPR, TREE_TYPE (info.index_expr), info.index_expr,
fold_convert (TREE_TYPE (info.index_expr),
info.range_min));
static void
gen_inbound_check (gimple swtch)
{
- tree label_decl1 = create_artificial_label ();
- tree label_decl2 = create_artificial_label ();
- tree label_decl3 = create_artificial_label ();
+ tree label_decl1 = create_artificial_label (UNKNOWN_LOCATION);
+ tree label_decl2 = create_artificial_label (UNKNOWN_LOCATION);
+ tree label_decl3 = create_artificial_label (UNKNOWN_LOCATION);
gimple label1, label2, label3;
tree utype;
/* (end of) block 0 */
gsi = gsi_for_stmt (info.arr_ref_first);
tmp_u_var = create_tmp_var (utype, "csui");
+ add_referenced_var (tmp_u_var);
tmp_u_1 = make_ssa_name (tmp_u_var, NULL);
cast = fold_convert (utype, info.index_expr);