This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch sdbout]: Fix ICE on -debug testsuite test const2.C for coff
- From: Kai Tietz <ktietz70 at googlemail dot com>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Cc: Richard Henderson <rth at redhat dot com>
- Date: Thu, 6 Nov 2014 20:37:59 +0100
- Subject: [patch sdbout]: Fix ICE on -debug testsuite test const2.C for coff
- Authentication-results: sourceware.org; auth=none
Hi,
This fixes recent fallout of debug-tests on Windows target for sdbout
(coff) caused by an ICE.
ChangeLog
2014-11-06 Kai Tietz <ktietz@redhat.com>
* sdbout.c (sdbout_symbol): Eliminate register only
if decl isn't a global variable.
Tested for i686-w64-mingw32, and x86_64-w64-mingw32. Ok for apply?
Regards,
Kai
Index: sdbout.c
===================================================================
--- sdbout.c (Revision 217175)
+++ sdbout.c (Arbeitskopie)
@@ -739,13 +739,16 @@ sdbout_symbol (tree decl, int local)
if (!DECL_RTL_SET_P (decl))
return;
- SET_DECL_RTL (decl,
- eliminate_regs (DECL_RTL (decl), VOIDmode, NULL_RTX));
+ value = DECL_RTL (decl);
+
+ if (!is_global_var (decl))
+ value = eliminate_regs (value, VOIDmode, NULL_RTX);
+
+ SET_DECL_RTL (decl, value);
#ifdef LEAF_REG_REMAP
if (crtl->uses_only_leaf_regs)
- leaf_renumber_regs_insn (DECL_RTL (decl));
+ leaf_renumber_regs_insn (value);
#endif
- value = DECL_RTL (decl);
/* Don't mention a variable at all
if it was completely optimized into nothingness.