[Bug rtl-optimization/79125] [7 Regression] ICE in rtl_verify_bb_insns, at cfgrtl.c:2661 (error: flow control insn inside a basic block)

2017-01-20 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79125

Jeffrey A. Law  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #6 from Jeffrey A. Law  ---
Fixed by Bernd's patch on the trunk.

[Bug rtl-optimization/79125] [7 Regression] ICE in rtl_verify_bb_insns, at cfgrtl.c:2661 (error: flow control insn inside a basic block)

2017-01-20 Thread law at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79125

--- Comment #5 from Jeffrey A. Law  ---
Author: law
Date: Sat Jan 21 07:23:47 2017
New Revision: 244741

URL: https://gcc.gnu.org/viewcvs?rev=244741&root=gcc&view=rev
Log:
2017-01-21  Bernd Schmidt  

rtl-optimization/79125
* cprop.c (local_cprop_pass): Handle cases where we make an
unconditional trap.

PR rtl-optimization/79125
* gcc.dg/torture/pr79125.c: New test.

Added:
trunk/gcc/testsuite/gcc.dg/torture/pr79125.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/cprop.c
trunk/gcc/testsuite/ChangeLog

[Bug rtl-optimization/79125] [7 Regression] ICE in rtl_verify_bb_insns, at cfgrtl.c:2661 (error: flow control insn inside a basic block)

2017-01-19 Thread bernds at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79125

Bernd Schmidt  changed:

   What|Removed |Added

 CC||bernds at gcc dot gnu.org
   Assignee|unassigned at gcc dot gnu.org  |bernds at gcc dot 
gnu.org

--- Comment #4 from Bernd Schmidt  ---
Actually just the same approach we used for the global pass ought to just work.
Watch for conditional traps turning into unconditional ones, put those in a
vec, split basic blocks later for every element in the vec.

[Bug rtl-optimization/79125] [7 Regression] ICE in rtl_verify_bb_insns, at cfgrtl.c:2661 (error: flow control insn inside a basic block)

2017-01-18 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79125

Jeffrey A. Law  changed:

   What|Removed |Added

 CC||bernds at redhat dot com

--- Comment #3 from Jeffrey A. Law  ---
Forgot to CC Bernd.

Bernd, this might be an easy one for you to pick up.

[Bug rtl-optimization/79125] [7 Regression] ICE in rtl_verify_bb_insns, at cfgrtl.c:2661 (error: flow control insn inside a basic block)

2017-01-18 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79125

Jeffrey A. Law  changed:

   What|Removed |Added

   Priority|P3  |P2
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-01-19
 CC||law at redhat dot com
 Ever confirmed|0   |1

--- Comment #2 from Jeffrey A. Law  ---
So in this case the conditional trap is in BB2 and is turned into an
unconditional trap by local cprop.  Note the code that currently scans for
traps skips BB2 (no global cprop can happen in that block).  It also ignores
insns that are unconditional traps at the start of the global pass.

local_cprop_pass ought to be able to see every possible conditional during its
scan.  Put those onto a worklist.

After the global pass is done, walk the worklist.  If the entry on the list is
an unconditional trap and its containing block has any successors, then we need
to split after the trap and insert the barrier.

It means a bit more worklist scanning, since we'll put all traps (conditional
or unconditional) on the list.  But that ought to be in the noise relative to
everything else going on.

Bernd, you want to take this one?  I've got a ppc64 beaker box handy for
additional testing once you've got a patch.

[Bug rtl-optimization/79125] [7 Regression] ICE in rtl_verify_bb_insns, at cfgrtl.c:2661 (error: flow control insn inside a basic block)

2017-01-18 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79125

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|--- |7.0

[Bug rtl-optimization/79125] [7 Regression] ICE in rtl_verify_bb_insns, at cfgrtl.c:2661 (error: flow control insn inside a basic block)

2017-01-17 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79125

Arseny Solokha  changed:

   What|Removed |Added

   Keywords||ice-on-valid-code

--- Comment #1 from Arseny Solokha  ---
aqluuplt.c: In function 'hl':
aqluuplt.c:32:1: error: in basic block 2:
 }
 ^
aqluuplt.c:32:1: error: flow control insn inside a basic block
(insn 79 22 78 2 (trap_if (const_int 1 [0x1])
(const_int 0 [0])) 824 {trap}
 (nil))
aqluuplt.c:32:1: internal compiler error: in rtl_verify_bb_insns, at
cfgrtl.c:2661
0x3174763ed05 _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-7.0.0_alpha20170115/work/gcc-7-20170115/gcc/rtl-error.c:108
0x317472018c7 rtl_verify_bb_insns
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-7.0.0_alpha20170115/work/gcc-7-20170115/gcc/cfgrtl.c:2661
0x317472018c7 rtl_verify_flow_info_1
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-7.0.0_alpha20170115/work/gcc-7-20170115/gcc/cfgrtl.c:2747
0x317471eda1d verify_flow_info()
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-7.0.0_alpha20170115/work/gcc-7-20170115/gcc/cfghooks.c:258
0x317475c8161 execute_function_todo
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-7.0.0_alpha20170115/work/gcc-7-20170115/gcc/passes.c:1977
0x317475c8fab execute_todo
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-7.0.0_alpha20170115/work/gcc-7-20170115/gcc/passes.c:2015