Remove more stray returns and gcc_unreachable ()s
This removes more cases that appear when bootstrap with -Wunreachable-code-return progresses. 2021-11-29 Richard Biener <rguenther@suse.de> * config/i386/i386.c (ix86_shift_rotate_cost): Remove unreachable return. * tree-chrec.c (evolution_function_is_invariant_rec_p): Likewise. * tree-if-conv.c (if_convertible_stmt_p): Likewise. * tree-ssa-pre.c (fully_constant_expression): Likewise. * tree-vrp.c (operand_less_p): Likewise. * reload.c (reg_overlap_mentioned_for_reload_p): Remove unreachable gcc_unreachable (). * sel-sched-ir.h (bb_next_bb): Likewise. * varasm.c (compare_constant): Likewise. gcc/cp/ * logic.cc (cnf_size_r): Remove unreachable and inconsistently placed gcc_unreachable ()s. * pt.c (iterative_hash_template_arg): Remove unreachable gcc_unreachable and return. gcc/fortran/ * target-memory.c (gfc_element_size): Remove unreachable return. gcc/objc/ * objc-act.c (objc_build_setter_call): Remove unreachable return. libcpp/ * charset.c (convert_escape): Remove unreachable break.
This commit is contained in:
parent
0194d92c35
commit
fa01e206c8
13 changed files with 3 additions and 26 deletions
|
@ -20366,7 +20366,6 @@ ix86_shift_rotate_cost (const struct processor_costs *cost,
|
|||
else
|
||||
return cost->shift_var;
|
||||
}
|
||||
return cost->shift_const;
|
||||
}
|
||||
|
||||
/* Compute a (partial) cost for rtx X. Return true if the complete
|
||||
|
|
|
@ -495,7 +495,6 @@ cnf_size_r (tree t)
|
|||
else
|
||||
/* Neither LHS nor RHS is a conjunction. */
|
||||
return std::make_pair (0, false);
|
||||
gcc_unreachable ();
|
||||
}
|
||||
if (conjunction_p (lhs))
|
||||
{
|
||||
|
@ -536,7 +535,6 @@ cnf_size_r (tree t)
|
|||
else
|
||||
/* Neither LHS nor RHS is a conjunction. */
|
||||
return std::make_pair (2, false);
|
||||
gcc_unreachable ();
|
||||
}
|
||||
if (conjunction_p (lhs))
|
||||
{
|
||||
|
|
|
@ -1969,9 +1969,6 @@ iterative_hash_template_arg (tree arg, hashval_t val)
|
|||
val = iterative_hash_template_arg (TREE_OPERAND (arg, i), val);
|
||||
return val;
|
||||
}
|
||||
|
||||
gcc_unreachable ();
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Unregister the specialization SPEC as a specialization of TMPL.
|
||||
|
|
|
@ -138,7 +138,6 @@ gfc_element_size (gfc_expr *e, size_t *siz)
|
|||
*siz = 0;
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1904,9 +1904,6 @@ objc_build_setter_call (tree lhs, tree rhs)
|
|||
setter_argument, NULL);
|
||||
return setter;
|
||||
}
|
||||
|
||||
/* Unreachable, but the compiler may not realize. */
|
||||
return error_mark_node;
|
||||
}
|
||||
|
||||
/* This hook routine is called when a MODIFY_EXPR is being built. We
|
||||
|
|
|
@ -6602,11 +6602,10 @@ reg_overlap_mentioned_for_reload_p (rtx x, rtx in)
|
|||
return (rtx_equal_p (x, in)
|
||||
|| reg_overlap_mentioned_for_reload_p (x, XEXP (in, 0))
|
||||
|| reg_overlap_mentioned_for_reload_p (x, XEXP (in, 1)));
|
||||
else return (reg_overlap_mentioned_for_reload_p (XEXP (x, 0), in)
|
||||
|| reg_overlap_mentioned_for_reload_p (XEXP (x, 1), in));
|
||||
else
|
||||
return (reg_overlap_mentioned_for_reload_p (XEXP (x, 0), in)
|
||||
|| reg_overlap_mentioned_for_reload_p (XEXP (x, 1), in));
|
||||
}
|
||||
|
||||
gcc_unreachable ();
|
||||
}
|
||||
|
||||
/* Return nonzero if anything in X contains a MEM. Look also for pseudo
|
||||
|
|
|
@ -1493,8 +1493,6 @@ bb_next_bb (basic_block bb)
|
|||
default:
|
||||
return bb->next_bb;
|
||||
}
|
||||
|
||||
gcc_unreachable ();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1148,8 +1148,6 @@ evolution_function_is_invariant_rec_p (tree chrec, int loopnum)
|
|||
default:
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/* Return true if CHREC is invariant in loop LOOPNUM, false otherwise. */
|
||||
|
|
|
@ -1110,8 +1110,6 @@ if_convertible_stmt_p (gimple *stmt, vec<data_reference_p> refs)
|
|||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/* Assumes that BB has more than 1 predecessors.
|
||||
|
|
|
@ -1234,7 +1234,6 @@ fully_constant_expression (pre_expr e)
|
|||
default:
|
||||
return e;
|
||||
}
|
||||
return e;
|
||||
}
|
||||
|
||||
/* Translate the VUSE backwards through phi nodes in E->dest, so that
|
||||
|
|
|
@ -330,8 +330,6 @@ operand_less_p (tree val, tree val2)
|
|||
else
|
||||
return -2;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Compare two values VAL1 and VAL2. Return
|
||||
|
|
|
@ -3415,8 +3415,6 @@ compare_constant (const tree t1, const tree t2)
|
|||
default:
|
||||
return 0;
|
||||
}
|
||||
|
||||
gcc_unreachable ();
|
||||
}
|
||||
|
||||
/* Return the section into which constant EXP should be placed. */
|
||||
|
|
|
@ -1534,7 +1534,6 @@ convert_escape (cpp_reader *pfile, const uchar *from, const uchar *limit,
|
|||
case 'x':
|
||||
return convert_hex (pfile, from, limit, tbuf, cvt,
|
||||
char_range, loc_reader, ranges);
|
||||
break;
|
||||
|
||||
case '0': case '1': case '2': case '3':
|
||||
case '4': case '5': case '6': case '7':
|
||||
|
|
Loading…
Add table
Reference in a new issue