http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56294
--- Comment #18 from Martin Jambor <jamborm at gcc dot gnu.org> 2013-03-05 16:49:29 UTC --- (In reply to comment #17) > Which is the testcase that still fails? The attached and more reduced ones > pass for me ... The testcase from comment #10 (called "Another unrelated issue") still fails for me with g++ -O2 -fno-ipa-sra -fcompare-debug. (I use trunk from yesterday). (In reply to comment #16) > can you check if rewrite_update_enter_block visits basic-blocks > in different order -g vs. -g0? No, from the dumps it does not seem so (see below). The dump also shows that in the -g1 case, the renamer sees elim_cost$complexity much earlier with debug statements. However, even seeing them only a little bit earlier (BB 17 as opposed to 18) is enough to trigger the problem. Perhaps because there is a to-be SSA name definition at the beginning of BB 18? -g0: Updating SSA: Registering new PHI nodes in block #0 Registering new PHI nodes in block #2 Registering new PHI nodes in block #3 Registering new PHI nodes in block #4 Updating SSA information for statement elim_cost$cost = SR.30; Updating SSA information for statement elim_cost$complexity = SR.31; Updating SSA information for statement _22 = elim_cost$cost; Registering new PHI nodes in block #5 Updating SSA information for statement elim_cost$cost = _24; Registering new PHI nodes in block #6 Updating SSA information for statement cost$cost = elim_cost$cost; Updating SSA information for statement _74 = cost$cost; Registering new PHI nodes in block #7 Registering new PHI nodes in block #8 Registering new PHI nodes in block #9 Registering new PHI nodes in block #10 Registering new PHI nodes in block #11 Registering new PHI nodes in block #12 Registering new PHI nodes in block #13 Registering new PHI nodes in block #14 Registering new PHI nodes in block #15 Registering new PHI nodes in block #16 Updating SSA information for statement _50 = elim_cost$cost; Updating SSA information for statement elim_cost$cost = _51; Registering new PHI nodes in block #17 Registering new PHI nodes in block #18 Updating SSA information for statement cost$cost = elim_cost$cost; Updating SSA information for statement cost$complexity = elim_cost$complexity; Registering new PHI nodes in block #19 Updating SSA information for statement cost$cost = cost$cost; Updating SSA information for statement _78 = cost$cost; Registering new PHI nodes in block #20 Symbols to be put in SSA form { D.2850 D.2851 D.2854 D.2855 D.2856 D.2857 D.2858 D.2859 } Incremental SSA update started at block: 0 Number of blocks in CFG: 21 Number of blocks to update: 20 ( 95%) Affected blocks: 0 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 -g1: Updating SSA: Registering new PHI nodes in block #0 Registering new PHI nodes in block #2 Registering new PHI nodes in block #3 Registering new PHI nodes in block #4 Updating SSA information for statement elim_cost$cost = SR.30; Updating SSA information for statement elim_cost$complexity = SR.31; Updating SSA information for statement _22 = elim_cost$cost; Registering new PHI nodes in block #5 Updating SSA information for statement elim_cost$cost = _24; Registering new PHI nodes in block #6 Updating SSA information for statement cost$cost = elim_cost$cost; Updating SSA information for statement # DEBUG cost$complexity => elim_cost$complexity Updating SSA information for statement _74 = cost$cost; Registering new PHI nodes in block #7 Registering new PHI nodes in block #8 Registering new PHI nodes in block #9 Registering new PHI nodes in block #10 Registering new PHI nodes in block #11 Registering new PHI nodes in block #12 Registering new PHI nodes in block #13 Registering new PHI nodes in block #14 Registering new PHI nodes in block #15 Registering new PHI nodes in block #16 Updating SSA information for statement _50 = elim_cost$cost; Updating SSA information for statement elim_cost$cost = _51; Registering new PHI nodes in block #17 Updating SSA information for statement # DEBUG cost1$cost => elim_cost$cost Updating SSA information for statement # DEBUG cost1$complexity => elim_cost$complexity Registering new PHI nodes in block #18 Updating SSA information for statement cost$cost = elim_cost$cost; Updating SSA information for statement cost$complexity = elim_cost$complexity; Registering new PHI nodes in block #19 Updating SSA information for statement cost$cost = cost$cost; Updating SSA information for statement # DEBUG cost$complexity => cost$complexity Updating SSA information for statement _78 = cost$cost; Registering new PHI nodes in block #20 Symbols to be put in SSA form { D.2850 D.2851 D.2854 D.2855 D.2856 D.2857 D.2858 D.2864 } Incremental SSA update started at block: 0 Number of blocks in CFG: 21 Number of blocks to update: 20 ( 95%) Affected blocks: 0 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20