[Bug rtl-optimization/85458] FAIL: gcc.dg/pr83480.c (internal compiler error)
danglin at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Jul 30 21:29:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85458
--- Comment #2 from John David Anglin <danglin at gcc dot gnu.org> ---
The ICE occurs because pa_adjust_priority reduces priority from 1 to 0.
The documentations for TARGET_SCHED_ADJUST_PRIORITY states:
@deftypefn {Target Hook} int TARGET_SCHED_ADJUST_PRIORITY (rtx_insn
*@var{insn}, int @var{priority})
This hook adjusts the integer scheduling priority @var{priority} of
@var{insn}. It should return the new priority. Increase the priority to
execute @var{insn} earlier, reduce the priority to execute @var{insn}
later. Do not define this hook if you do not need to adjust the
scheduling priorities of insns.
@end deftypefn
However, the assert in sel_target_adjust_priority only allows for an increase
in priority:
sel_target_adjust_priority (expr_t expr)
{
int priority = EXPR_PRIORITY (expr);
int new_priority;
if (targetm.sched.adjust_priority)
new_priority = targetm.sched.adjust_priority (EXPR_INSN_RTX (expr),
priority);
else
new_priority = priority;
/* If the priority has changed, adjust EXPR_PRIORITY_ADJ accordingly. */
EXPR_PRIORITY_ADJ (expr) = new_priority - EXPR_PRIORITY (expr);
gcc_assert (EXPR_PRIORITY_ADJ (expr) >= 0);
My first guess would be is that the assert is wrong.
More information about the Gcc-bugs
mailing list