From: Jakub Jelinek Date: Tue, 30 Jan 2018 20:03:04 +0000 (+0100) Subject: re PR target/83986 (ICE in maybe_record_trace_start, at dwarf2cfi.c:2348) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c5370327b043595a13cda2237cf2007b690440ef;p=gcc.git re PR target/83986 (ICE in maybe_record_trace_start, at dwarf2cfi.c:2348) PR rtl-optimization/83986 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti dependence against last_pending_memory_flush in addition to pending_jump_insns. * gcc.dg/pr83986.c: New test. From-SVN: r257203 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c9068360d01..e4c68ffd9f7 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2018-01-30 Jakub Jelinek + + PR rtl-optimization/83986 + * sched-deps.c (sched_analyze_insn): For frame related insns, add anti + dependence against last_pending_memory_flush in addition to + pending_jump_insns. + 2018-01-30 Alexandre Oliva PR tree-optimization/81611 diff --git a/gcc/sched-deps.c b/gcc/sched-deps.c index 2d0199d5837..9a5cbebea40 100644 --- a/gcc/sched-deps.c +++ b/gcc/sched-deps.c @@ -2922,6 +2922,8 @@ sched_analyze_insn (struct deps_desc *deps, rtx x, rtx_insn *insn) = alloc_INSN_LIST (insn, deps->sched_before_next_jump); /* Make sure epilogue insn is scheduled after preceding jumps. */ + add_dependence_list (insn, deps->last_pending_memory_flush, 1, + REG_DEP_ANTI, true); add_dependence_list (insn, deps->pending_jump_insns, 1, REG_DEP_ANTI, true); } diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 0eac0733043..8a8b71664e3 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2018-01-30 Jakub Jelinek + + PR rtl-optimization/83986 + * gcc.dg/pr83986.c: New test. + 2018-01-30 Bill Seurer PR 58684 diff --git a/gcc/testsuite/gcc.dg/pr83986.c b/gcc/testsuite/gcc.dg/pr83986.c new file mode 100644 index 00000000000..31a53d93616 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr83986.c @@ -0,0 +1,14 @@ +/* PR rtl-optimization/83986 */ +/* { dg-do compile } */ +/* { dg-options "-g -O2 -fsched2-use-superblocks -funwind-tables --param max-pending-list-length=1" } */ + +int v; + +int +foo (int x) +{ + v &= !!v && !!x; + if (v != 0) + foo (0); + return 0; +}