[Bug target/54385] [4.8 regression] ICE in pre_and_rev_post_order_compute, at cfganal.c:873
steven at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Aug 27 17:18:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54385
Steven Bosscher <steven at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC|steven at gcc dot gnu.org |
--- Comment #1 from Steven Bosscher <steven at gcc dot gnu.org> 2012-08-27 17:18:27 UTC ---
Starting program: /home/stevenb/devel/build-debug/gcc/cc1plus -quiet PR54385.cc
-O2 -fnon-call-exceptions
Breakpoint 1, fancy_abort (file=0x1147c0a0 "../../trunk/gcc/cfganal.c",
line=873, function=0x1147c1c0 "pre_and_rev_post_order_compute")
at ../../trunk/gcc/diagnostic.c:1011
1011 internal_error ("in %s, at %s:%d", function, trim_filename (file),
line);
(gdb) up
#1 0x00000000105d7d4c in pre_and_rev_post_order_compute (pre_order=0x0,
rev_post_order=0x116d5580, include_entry_exit=false) at
../../trunk/gcc/cfganal.c:873
873 gcc_assert (pre_order_num == n_basic_blocks - NUM_FIXED_BLOCKS);
(gdb) p brief_dump_cfg(stderr,-1)
;; basic block 2, loop depth 0, count 0, freq 10000, maybe hot
;; prev block 0, next block 3, flags: (REACHABLE, RTL, MODIFIED)
;; pred: ENTRY [100.0%] (FALLTHRU)
;; succ: 3 [100.0%] (FALLTHRU)
;; basic block 3, loop depth 0, count 0, freq 10000, maybe hot
;; prev block 2, next block 4, flags: (REACHABLE, RTL, MODIFIED)
;; pred: 2 [100.0%] (FALLTHRU)
;; succ: EXIT [100.0%] (ABNORMAL,SIBCALL)
;; basic block 4, loop depth 0, count 0, freq 0
;; prev block 3, next block 1, flags: (REACHABLE, RTL, MODIFIED)
;; pred:
;; succ:
$5 = void
(gdb) p current_pass->name
$6 = 0x114a27d8 "postreload"
So there's an unreachable block and it confuses pre_and_rev_post_order_compute.
Someone has removed a critical edge between the ICE point and the start of
postreload. This is the CFG on entry to rest_of_handle_postreload:
;; basic block 2, loop depth 0, count 0, freq 10000, maybe hot
;; prev block 0, next block 3, flags: (REACHABLE, RTL, MODIFIED)
;; pred: ENTRY [100.0%] (FALLTHRU)
;; succ: 4 (ABNORMAL,EH)
;; 3 [100.0%] (FALLTHRU)
;; basic block 3, loop depth 0, count 0, freq 10000, maybe hot
;; prev block 2, next block 4, flags: (REACHABLE, RTL, MODIFIED)
;; pred: 2 [100.0%] (FALLTHRU)
;; succ: EXIT [100.0%] (ABNORMAL,SIBCALL)
;; basic block 4, loop depth 0, count 0, freq 0
;; prev block 3, next block 1, flags: (REACHABLE, RTL, MODIFIED)
;; pred: 2 (ABNORMAL,EH)
;; succ:
The edge disappears in reload_cse_regs_1, which is not CFG aware (like most of
postreload, it seems).
This is a pre-existing problem that happens to be exposed by my patch.
More information about the Gcc-bugs
mailing list