Hi! I've noticed a couple of places that should be using gimple_call_noreturn_p but are using gimple_call_flags (stmt) & ECF_NORETURN instead.
Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2016-08-17 Jakub Jelinek <ja...@redhat.com> * gimple-fold.c (gimple_fold_call): Use gimple_call_noreturn_p instead of testing ECF_NORETURN bit in gimple_call_flags. * tree-cfg.c (make_edges_bb, execute_fixup_cfg): Likewise. * predict.c (tree_bb_level_predictions): Likewise. * gimple-low.c (gimple_stmt_may_fallthru): Likewise. --- gcc/gimple-fold.c.jj 2016-07-19 19:29:05.250752770 +0200 +++ gcc/gimple-fold.c 2016-08-17 13:34:21.209544835 +0200 @@ -3184,7 +3184,7 @@ gimple_fold_call (gimple_stmt_iterator * /* If changing the call to __cxa_pure_virtual or similar noreturn function, adjust gimple_call_fntype too. */ - if ((gimple_call_flags (stmt) & ECF_NORETURN) + if (gimple_call_noreturn_p (stmt) && VOID_TYPE_P (TREE_TYPE (TREE_TYPE (fndecl))) && TYPE_ARG_TYPES (TREE_TYPE (fndecl)) && (TREE_VALUE (TYPE_ARG_TYPES (TREE_TYPE (fndecl))) --- gcc/tree-cfg.c.jj 2016-08-16 18:50:14.918137409 +0200 +++ gcc/tree-cfg.c 2016-08-17 13:35:49.059419876 +0200 @@ -807,7 +807,7 @@ make_edges_bb (basic_block bb, struct om } /* Some calls are known not to return. */ else - fallthru = !(gimple_call_flags (last) & ECF_NORETURN); + fallthru = !gimple_call_noreturn_p (last); break; case GIMPLE_ASSIGN: @@ -9083,7 +9083,7 @@ execute_fixup_cfg (void) if (!stmt || (!is_ctrl_stmt (stmt) && (!is_gimple_call (stmt) - || (gimple_call_flags (stmt) & ECF_NORETURN) == 0))) + || !gimple_call_noreturn_p (stmt)))) { if (stmt && is_gimple_call (stmt)) gimple_call_set_ctrl_altering (stmt, false); --- gcc/predict.c.jj 2016-08-06 12:11:52.254489381 +0200 +++ gcc/predict.c 2016-08-17 13:35:12.365889754 +0200 @@ -2639,8 +2639,7 @@ tree_bb_level_predictions (void) if (is_gimple_call (stmt)) { - if ((gimple_call_flags (stmt) & ECF_NORETURN) - && has_return_edges) + if (gimple_call_noreturn_p (stmt) && has_return_edges) predict_paths_leading_to (bb, PRED_NORETURN, NOT_TAKEN); decl = gimple_call_fndecl (stmt); --- gcc/gimple-low.c.jj 2016-05-03 14:12:19.053019350 +0200 +++ gcc/gimple-low.c 2016-08-17 13:34:54.813114525 +0200 @@ -610,7 +610,7 @@ gimple_stmt_may_fallthru (gimple *stmt) case GIMPLE_CALL: /* Functions that do not return do not fall through. */ - return (gimple_call_flags (stmt) & ECF_NORETURN) == 0; + return !gimple_call_noreturn_p (stmt); default: return true; Jakub