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 bootstrap/39025] ICE in start_function, at c-decl.c:6225 while configuring libgcc



------- Comment #1 from ro at gcc dot gnu dot org  2009-02-02 23:43 -------
It turns out that there are two problems here:

* If you invoke cc1 conftest.c (i.e. without -quiet), you get the ICE from the
  assertion failure in c-decl.c:6225:

  /* This is the earliest point at which we might know the assembler
     name of the function.  Thus, if it's set before this, die horribly.  */
  gcc_assert (!DECL_ASSEMBLER_NAME_SET_P (decl1));

  decl1 has an assembler_name of "main" at this point, which is due to this
  change in toplev.c (announce_function):

@@ -419,10 +432,7 @@ announce_function (tree decl)
 {
   if (!quiet_flag)
     {
-      if (rtl_dump_and_exit)
-       fprintf (stderr, "%s ", IDENTIFIER_POINTER (DECL_NAME (decl)));
-      else
-       fprintf (stderr, " %s", lang_hooks.decl_printable_name (decl, 2));
+      fprintf (stderr, "%s ", IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME
(decl)));
       fflush (stderr);
       pp_needs_newline (global_dc->printer) = true;
       diagnostic_set_last_function (global_dc, (diagnostic_info *) NULL);

  Unlike lang_hooks.decl_printable_name, decl_assembler_name sets
assembler_name
  if unset, thus breaking the later assert.  Since announce_functions gards
  this with !quiet_flag, it only breaks without that flag.

* If instead on runs cc1 -g -quiet conftest.c (-g is necessary to trigger the
  bug which breaks configure, -quiet works around the first problem), on gets
  this instead.

> ./cc1 -g -quiet conftest.c
conftest.c:9: internal compiler error: Segmentation Fault

   Running cc1 under gdb reveals

Program received signal SIGSEGV, Segmentation fault.
0x083fdd54 in get_personality_function (decl=0x0) at
/vol/gcc/src/gcc-lto/gcc/expr.h:806
(gdb) where
#0  0x083fdd54 in get_personality_function (decl=0x0) at
/vol/gcc/src/gcc-lto/gcc/expr.h:806
#1  0x08404f08 in output_call_frame_info (for_eh=0) at
/vol/gcc/src/gcc-lto/gcc/dwarf2out.c:2914
#2  0x08405fce in dwarf2out_frame_finish () at
/vol/gcc/src/gcc-lto/gcc/dwarf2out.c:3351
#3  0x0899930a in compile_file () at /vol/gcc/src/gcc-lto/gcc/toplev.c:1023
#4  0x0899acc4 in do_compile () at /vol/gcc/src/gcc-lto/gcc/toplev.c:2220
#5  0x0899ad2b in toplev_main (argc=4, argv=0x80476cc) at
/vol/gcc/src/gcc-lto/gcc/toplev.c:2252
#6  0x0821c2f9 in main (argc=4, argv=0x80476cc) at
/vol/gcc/src/gcc-lto/gcc/main.c:35

  I.e. get_personality_function is called with current_function_decl = NULL.


-- 


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


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