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]

dwarf2out.c abort


Hi!

I did some more investigation and:

1999-12-22  Jason Merrill  <jason@casey.cygnus.com>

        * dwarf2out.c (add_abstract_origin_attribute): Call
        gen_abstract_function on our function context.

triggers the abort in gen_subprogram_die:
      if (get_AT_flag (old_die, DW_AT_declaration) != 1)
        {
          /* ??? This can happen if there is a bug in the program, for
             instance, if it has duplicate function definitions.  Ideally,
             we should detect this case and ignore it.  For now, if we have
             already reported an error, any error at all, then assume that
             we got here because of a input error, not a dwarf2 bug.  */
          if (errorcount)
            return;
          abort ();  <=================
        }

on any successfully inlined nested function on sparc-*-linux and
sparc64-*-linux when compiling with -O2 -gdwarf-2.
E.g.:

int main (void) {
  inline int x(void) {
      return 0;
  }
  exit (x());
}

If I comment out the call to gen_abstract_function(), compile succeeds.

Cheers,
    Jakub
___________________________________________________________________
Jakub Jelinek | jakub@redhat.com | http://sunsite.mff.cuni.cz/~jj
Linux version 2.3.40 on a sparc64 machine (1343.49 BogoMips)
___________________________________________________________________

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