This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch sdbout]: Fix ICE on -debug testsuite test const2.C for coff
- From: Jeff Law <law at redhat dot com>
- To: Kai Tietz <ktietz70 at googlemail dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Richard Henderson <rth at redhat dot com>
- Date: Tue, 11 Nov 2014 16:10:04 -0700
- Subject: Re: [patch sdbout]: Fix ICE on -debug testsuite test const2.C for coff
- Authentication-results: sourceware.org; auth=none
- References: <CAEwic4YufDreB7kqB2C=SOZ5nyrYRSdpxhApdQw6w1gxtD9K0w at mail dot gmail dot com> <545D2584 dot 5080106 at redhat dot com> <CAEwic4YSUURkGb5gnCDAqOatWkWMVbq6JPDGkuCr6nEayzjWNg at mail dot gmail dot com>
On 11/08/14 03:27, Kai Tietz wrote:
Hi Jeff,
2014-11-07 21:03 GMT+01:00 Jeff Law <law@redhat.com>:
On 11/06/14 12:37, Kai Tietz wrote:
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.
Is there a testcase in the suite that triggers this problem? If not, can
you try to add one? Out of curiosity, what was DECL_RTL here?
Sure, as (partial) mentioned in subject-line the testcase
g++.dg/debug/const2.C: Triggers this issue. So there is no need to
add a separate testcase for it. Testcase fails for any use of -gcoff1
option.
Doh, looked in the body, not the subject, my bad.
This is probably OK, but I'd really like to know what kind of goofy RTL we
passed to eliminate_regs that caused it to fail.
I assume it is ok, as I just mimic dwarf2-behavior, which checks
before call for eliminate_regs, if rtl isn't a global-var itself.
As assumed by checking in debugger I see that eliminate_regs fails on rtx:
(mem/u/c:SI (symbol_ref:DI ("_ZN1b1dE") [flags 0x2] <var_decl 0xffbf0000 d>) [0
d+0 S4 A32])
Ok. Thanks. Patch is fine.
So a more general question about sdbout. Most prior dbg-coff targets
using nowadays dwarf2 too. It seems to me that sdbout didn't got any
substantial maintenance the last years anymore. Just fallout was
fixed. AFAIK is coff (or was) mainly used nowadays for embedded
stuff, and in combination with some tools just supporting coff-dbg
information. Do we actually need to support it anymore?
Most of the COFF targets were deprecated years ago. The windows
related targets (msdosdjgpp, cygwin, mingw, interix) still reference
dbxcoff. I think fixing those to no longer use dbxcoff, then removing
config/dbxcoff is the first step. Then we'd need to see if anything
references arm/coff.h, if not fix that and remove arm/coff.h.
I think at that point sdbout becomes dead code, though you should
probably check the IBM targets since they use xcoff.
We could go through the same exercise for stabs (dbxout0 :-)
jeff