This is the mail archive of the gcc-patches@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]

Re: gcc.c-torture/unsorted/loop386.c fails on sh-elf


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


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