return 0;
}
-struct tree_opt_pass pass_build_cfg =
+struct gimple_opt_pass pass_build_cfg =
{
+ {
+ GIMPLE_PASS,
"cfg", /* name */
NULL, /* gate */
execute_build_cfg, /* execute */
PROP_cfg, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
- TODO_verify_stmts | TODO_cleanup_cfg, /* todo_flags_finish */
- 0 /* letter */
+ TODO_verify_stmts | TODO_cleanup_cfg /* todo_flags_finish */
+ }
};
/* Search the CFG for any computed gotos. If found, factor them to a
}
-struct tree_opt_pass pass_remove_useless_stmts =
+struct gimple_opt_pass pass_remove_useless_stmts =
{
+ {
+ GIMPLE_PASS,
"useless", /* name */
NULL, /* gate */
remove_useless_stmts, /* execute */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
- TODO_dump_func, /* todo_flags_finish */
- 0 /* letter */
+ TODO_dump_func /* todo_flags_finish */
+ }
};
/* Remove PHI nodes associated with basic block BB and all edges out of BB. */
we may be missing "valid" checks, but what can you do?
This was PR19217. */
if (in_phi)
- break;
+ {
+ if (!is_gimple_min_invariant (t))
+ {
+ error ("non-invariant address expression in PHI argument");
+ return t;
+ }
+ break;
+ }
old_invariant = TREE_INVARIANT (t);
old_constant = TREE_CONSTANT (t);
return x;
}
- /* Stop recursing and verifying invariant ADDR_EXPRs, they tend
- to become arbitrary complicated. */
- if (is_gimple_min_invariant (t))
- *walk_subtrees = 0;
break;
}
error ("invalid position or size operand to BIT_FIELD_REF");
return t;
}
+ else if (INTEGRAL_TYPE_P (TREE_TYPE (t))
+ && (TYPE_PRECISION (TREE_TYPE (t))
+ != TREE_INT_CST_LOW (TREE_OPERAND (t, 1))))
+ {
+ error ("integral result type precision does not match "
+ "field size of BIT_FIELD_REF");
+ return t;
+ }
+ if (!INTEGRAL_TYPE_P (TREE_TYPE (t))
+ && (GET_MODE_PRECISION (TYPE_MODE (TREE_TYPE (t)))
+ != TREE_INT_CST_LOW (TREE_OPERAND (t, 1))))
+ {
+ error ("mode precision of non-integral result does not "
+ "match field size of BIT_FIELD_REF");
+ return t;
+ }
}
t = TREE_OPERAND (t, 0);
case NOP_EXPR:
case CHANGE_DYNAMIC_TYPE_EXPR:
case ASM_EXPR:
+ case PREDICT_EXPR:
return false;
default:
m->base.from = decl;
m->to = create_artificial_label ();
LABEL_DECL_UID (m->to) = LABEL_DECL_UID (decl);
+ if (LABEL_DECL_UID (m->to) >= cfun->last_label_uid)
+ cfun->last_label_uid = LABEL_DECL_UID (m->to) + 1;
slot = htab_find_slot_with_hash (hash, m, m->hash, INSERT);
gcc_assert (*slot == NULL);
return 0;
}
-struct tree_opt_pass pass_split_crit_edges =
+struct gimple_opt_pass pass_split_crit_edges =
{
+ {
+ GIMPLE_PASS,
"crited", /* name */
NULL, /* gate */
split_critical_edges, /* execute */
PROP_no_crit_edges, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
- TODO_dump_func, /* todo_flags_finish */
- 0 /* letter */
+ TODO_dump_func /* todo_flags_finish */
+ }
};
\f
}
}
-struct tree_opt_pass pass_warn_function_return =
+struct gimple_opt_pass pass_warn_function_return =
{
+ {
+ GIMPLE_PASS,
NULL, /* name */
NULL, /* gate */
execute_warn_function_return, /* execute */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
- 0, /* todo_flags_finish */
- 0 /* letter */
+ 0 /* todo_flags_finish */
+ }
};
/* Emit noreturn warnings. */
return 0;
}
-struct tree_opt_pass pass_warn_function_noreturn =
+struct gimple_opt_pass pass_warn_function_noreturn =
{
+ {
+ GIMPLE_PASS,
NULL, /* name */
NULL, /* gate */
execute_warn_function_noreturn, /* execute */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
- 0, /* todo_flags_finish */
- 0 /* letter */
+ 0 /* todo_flags_finish */
+ }
};