summaryrefslogtreecommitdiff
path: root/gcc/gimple-low.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/gimple-low.c')
-rw-r--r--gcc/gimple-low.c39
1 files changed, 26 insertions, 13 deletions
diff --git a/gcc/gimple-low.c b/gcc/gimple-low.c
index 3507d3cb09d..402a921ed0b 100644
--- a/gcc/gimple-low.c
+++ b/gcc/gimple-low.c
@@ -67,7 +67,7 @@ along with GCC; see the file COPYING3. If not see
struct return_statements_t
{
tree label;
- gimple stmt;
+ greturn *stmt;
};
typedef struct return_statements_t return_statements_t;
@@ -305,8 +305,11 @@ lower_stmt (gimple_stmt_iterator *gsi, struct lower_data *data)
return;
case GIMPLE_EH_ELSE:
- lower_sequence (gimple_eh_else_n_body_ptr (stmt), data);
- lower_sequence (gimple_eh_else_e_body_ptr (stmt), data);
+ {
+ geh_else *eh_else_stmt = as_a <geh_else *> (stmt);
+ lower_sequence (gimple_eh_else_n_body_ptr (eh_else_stmt), data);
+ lower_sequence (gimple_eh_else_e_body_ptr (eh_else_stmt), data);
+ }
break;
case GIMPLE_NOP:
@@ -378,7 +381,9 @@ lower_stmt (gimple_stmt_iterator *gsi, struct lower_data *data)
return;
case GIMPLE_TRANSACTION:
- lower_sequence (gimple_transaction_body_ptr (stmt), data);
+ lower_sequence (gimple_transaction_body_ptr (
+ as_a <gtransaction *> (stmt)),
+ data);
break;
default:
@@ -395,7 +400,7 @@ static void
lower_gimple_bind (gimple_stmt_iterator *gsi, struct lower_data *data)
{
tree old_block = data->block;
- gimple stmt = gsi_stmt (*gsi);
+ gbind *stmt = as_a <gbind *> (gsi_stmt (*gsi));
tree new_block = gimple_bind_block (stmt);
if (new_block)
@@ -468,7 +473,9 @@ lower_try_catch (gimple_stmt_iterator *gsi, struct lower_data *data)
for (; !gsi_end_p (i); gsi_next (&i))
{
data->cannot_fallthru = false;
- lower_sequence (gimple_catch_handler_ptr (gsi_stmt (i)), data);
+ lower_sequence (gimple_catch_handler_ptr (
+ as_a <gcatch *> (gsi_stmt (i))),
+ data);
if (!data->cannot_fallthru)
cannot_fallthru = false;
}
@@ -509,7 +516,7 @@ lower_try_catch (gimple_stmt_iterator *gsi, struct lower_data *data)
This is a subroutine of gimple_stmt_may_fallthru. */
static bool
-gimple_try_catch_may_fallthru (gimple stmt)
+gimple_try_catch_may_fallthru (gtry *stmt)
{
gimple_stmt_iterator i;
@@ -530,7 +537,8 @@ gimple_try_catch_may_fallthru (gimple stmt)
through iff any of the catch bodies falls through. */
for (; !gsi_end_p (i); gsi_next (&i))
{
- if (gimple_seq_may_fallthru (gimple_catch_handler (gsi_stmt (i))))
+ if (gimple_seq_may_fallthru (gimple_catch_handler (
+ as_a <gcatch *> (gsi_stmt (i)))))
return true;
}
return false;
@@ -589,11 +597,12 @@ gimple_stmt_may_fallthru (gimple stmt)
return false;
case GIMPLE_BIND:
- return gimple_seq_may_fallthru (gimple_bind_body (stmt));
+ return gimple_seq_may_fallthru (
+ gimple_bind_body (as_a <gbind *> (stmt)));
case GIMPLE_TRY:
if (gimple_try_kind (stmt) == GIMPLE_TRY_CATCH)
- return gimple_try_catch_may_fallthru (stmt);
+ return gimple_try_catch_may_fallthru (as_a <gtry *> (stmt));
/* It must be a GIMPLE_TRY_FINALLY. */
@@ -608,8 +617,12 @@ gimple_stmt_may_fallthru (gimple stmt)
&& gimple_seq_may_fallthru (gimple_try_cleanup (stmt)));
case GIMPLE_EH_ELSE:
- return (gimple_seq_may_fallthru (gimple_eh_else_n_body (stmt))
- || gimple_seq_may_fallthru (gimple_eh_else_e_body (stmt)));
+ {
+ geh_else *eh_else_stmt = as_a <geh_else *> (stmt);
+ return (gimple_seq_may_fallthru (gimple_eh_else_n_body (eh_else_stmt))
+ || gimple_seq_may_fallthru (gimple_eh_else_e_body (
+ eh_else_stmt)));
+ }
case GIMPLE_CALL:
/* Functions that do not return do not fall through. */
@@ -635,7 +648,7 @@ gimple_seq_may_fallthru (gimple_seq seq)
static void
lower_gimple_return (gimple_stmt_iterator *gsi, struct lower_data *data)
{
- gimple stmt = gsi_stmt (*gsi);
+ greturn *stmt = as_a <greturn *> (gsi_stmt (*gsi));
gimple t;
int i;
return_statements_t tmp_rs;