This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/56294] BOOT_CFLAGS='-O2 -g -fno-ipa-sra' leads to bootstrap comparison failure


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56294

Martin Jambor <jamborm at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |NEW
         AssignedTo|jamborm at gcc dot gnu.org  |unassigned at gcc dot
                   |                            |gnu.org

--- Comment #11 from Martin Jambor <jamborm at gcc dot gnu.org> 2013-02-27 16:11:02 UTC ---
OK, patch http://gcc.gnu.org/ml/gcc-patches/2013-02/msg01233.html
fixes the testcase from comment #7 and patch
http://gcc.gnu.org/ml/gcc-patches/2013-02/msg01235.html should avoid
some further (although apparently not that crucial) differences in SRA
-g and -g0 output.  Unfortunately, they do not fix the debug
comparison failure from comment #9.

The problematic difference is:

--- testcase.gkd        2013-02-27 16:25:54.036565436 +0100
+++ testcase.gk.gkd     2013-02-27 16:25:54.185565083 +0100
@@ -140,3 +140,3 @@
 (insn:TI# 0 0 5 (set (reg/f:DI 6 bp [orig:62 D.xxxx ] [62])
-        (mem/f:DI (const_int 0 [0]) [ *control_var_27(D)+0 S8 A64]))
testcase.ii:166# {*movdi_internal_rex64}
+        (mem/f:DI (const_int 0 [0]) [ *control_var_28(D)+0 S8 A64]))
testcase.ii:166# {*movdi_internal_rex64}
      (nil))

and appears for the first time in release_ssa pass.  It seems to me
that (right after early SRA), two SSA names simply have a different
order in -g0 and -g compilations:

-SSA_NAME 63: elim_cost$complexity_63
-  DEF: elim_cost$complexity_63 = PHI <elim_cost$complexity_50(D)(3),
elim_cost$complexity_85(5), elim_cost$complexity_85(4)>
+SSA_NAME 63: cost$cost_63
+  DEF: cost$cost_63 = PHI <cost$cost_80(D)(17), cost$cost_79(18)>

-SSA_NAME 71: cost$cost_71
-  DEF: cost$cost_71 = PHI <cost$cost_80(D)(17), cost$cost_79(18)>
+SSA_NAME 71: elim_cost$complexity_71
+  DEF: elim_cost$complexity_71 = PHI <elim_cost$complexity_50(D)(3),
elim_cost$complexity_85(5), elim_cost$complexity_85(4)>

Also, if I just do not produce DEBUG statements with
elim_cost$complexity on the RHS, the problem goes away.  However, I do
not anything wrong with the statements.  Later, just before
release_ssa, three SSA names have different order:

-SSA_NAME 67: .MEM_67
-  DEF: comp ={v} {CLOBBER};
+SSA_NAME 63: cost$cost_63
+  DEF: cost$cost_63 = PHI <cost$cost_80(D)(12), elim_cost$cost_72(13)>

-SSA_NAME 70: control_var_70(D)
-  DEF: GIMPLE_NOP
+SSA_NAME 67: .MEM_67
+  DEF: comp ={v} {CLOBBER};

-SSA_NAME 71: cost$cost_71
-  DEF: cost$cost_71 = PHI <cost$cost_80(D)(12), elim_cost$cost_72(13)>
+SSA_NAME 70: control_var_70(D)
+  DEF: GIMPLE_NOP

...and control_var manages to leak to the final dump, causing the
failure.

I'll return to this bug in a few days, but now I need a break from it,
so I'm un-assigning myself.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]