This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: gcc.c-torture/unsorted/loop386.c fails on sh-elf
- To: Jason Merrill <jason at redhat dot com>
- Subject: Re: gcc.c-torture/unsorted/loop386.c fails on sh-elf
- From: Alexandre Oliva <aoliva at redhat dot com>
- Date: 12 Feb 2001 00:12:14 -0200
- Cc: gcc-patches at gcc dot gnu dot org
- Organization: GCC Team, Red Hat
- References: <orlmrwenpb.fsf@guarana.lsd.ic.unicamp.br><u9zofvptcv.fsf@casey.cambridge.redhat.com>
On Feb 9, 2001, Jason Merrill <jason@redhat.com> wrote:
> The problem was that reorder_basic_blocks was throwing away most of the
> block structure for foo. The fix is to emit the abstract debugging info
> before optimizing:
Is there any reason why you still haven't checked it in? If not, I
have one: it breaks in case the function being outlined is
artificial. I have only been able to trigger the problem with
-fno-new-abi, with a testcase as simple as:
# 1 "dummy.C"
#pragma implementation
# 1 "dummy.h" 1
#pragma interface
struct filebuf {
virtual int foo();
};
# 3 "dummy.C" 2
int filebuf::foo() { return 0; }
We'd crash when emitting debugging info for the typeinfo function of
class filebuf, because we hadn't generated a declaration attribute
when emitting the abstract function. The following addition to your
patch seems to have fixed the problem. Does it seem reasonable for
you?
> + void
> + note_outlining_of_inline_function (fndecl)
> + tree fndecl;
> + {
[snip]
if (write_symbols == DWARF2_DEBUG && ! DECL_ARTIFICIAL (fndecl))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> + dwarf2out_abstract_function (fndecl);
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me