Bug in 970924 snapshot

Andreas Schwab schwab@issan.informatik.uni-dortmund.de
Fri Sep 26 02:37:00 GMT 1997


Fred Richardson <frichard@bbn.com> writes:

|> This bug doesn't occur in "gcc version cygnus-2.7.2-970404" (I don't
|> know how that relates to the egcs distribution).

|> I'm running on "SunOS 5.5.1 Generic sun4u sparc SUNW,Ultra-1".

|> The bug occurs in "cc1plus", it a segmentation fault.

Please try this patch which i have just send to the gcc2 list:

1997-09-25  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* integrate.c (expand_inline_function): Make sure there is at
	least one insn that can be used as an insertion point.

*** testgcc-970923/integrate.c.~2~	Thu Sep 25 19:55:04 1997
--- testgcc-970923/integrate.c	Thu Sep 25 20:58:32 1997
*************** expand_inline_function (fndecl, parms, t
*** 1433,1440 ****
    map->const_age = 0;
  
    /* Record the current insn in case we have to set up pointers to frame
!      and argument memory blocks.  */
    map->insns_at_start = get_last_insn ();
  
    map->regno_pointer_flag = INLINE_REGNO_POINTER_FLAG (header);
    map->regno_pointer_align = INLINE_REGNO_POINTER_ALIGN (header);
--- 1433,1443 ----
    map->const_age = 0;
  
    /* Record the current insn in case we have to set up pointers to frame
!      and argument memory blocks.  If there are no insns yet, add a dummy
!      insn that can be used as an insertion point.  */
    map->insns_at_start = get_last_insn ();
+   if (!map->insns_at_start)
+     map->insns_at_start = emit_note (NULL_PTR, NOTE_INSN_DELETED);
  
    map->regno_pointer_flag = INLINE_REGNO_POINTER_FLAG (header);
    map->regno_pointer_align = INLINE_REGNO_POINTER_ALIGN (header);

-- 
Andreas Schwab                                      "And now for something
schwab@issan.informatik.uni-dortmund.de              completely different"



More information about the Gcc mailing list