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]
Other format: [Raw text]

[Bug debug/14114] New: ICE in gen_subprogram_die


gcc crashes compiling the C code below, if both debugging and optimization
are on:

$ ./cc1 x.c -quiet -g -O2
x.c: In function `a':
x.c:5: internal compiler error: in gen_subprogram_die, at dwarf2out.c:10696
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
$
[sss@karma gcc]
It's tripping over this abort in gen_subprogram_die:

	  /* ??? 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 an input error, not a dwarf2 bug.  */
	  if (errorcount)
	    return;
	  abort ();

Environment:
System: Linux karma 2.6.1 #10 Tue Feb 10 04:31:35 EST 2004 i686 i686 i386 GNU/Linux
Architecture: i686

	<machine, os, target, libraries (multiple lines)>
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: ../gcc/configure --prefix=/usr/local/gcc --enable-threads=posix --enable-long-long --enable-languages=c,c++,f77

How-To-Repeat:

Compile with -g -O2:

---------------------------------------
void a()
{
  void c();
  c();
}

void b()
{
  void c();
}

void c() {}
---------------------------------------
------- Additional Comments From snyder at fnal dot gov  2004-02-11 20:06 -------
Fix:
	<how to correct or work around the problem, if known (multiple lines)>

-- 
           Summary: ICE in gen_subprogram_die
           Product: gcc
           Version: 3.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: debug
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: snyder at fnal dot gov
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14114


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