[Bug middle-end/16089] [3.5 regression] unwind-dw2.c:1311: error: insn outside basic block

hubicka at ucw dot cz gcc-bugzilla@gcc.gnu.org
Sun Jun 20 10:08:00 GMT 2004


------- Additional Comments From hubicka at ucw dot cz  2004-06-20 10:08 -------
Subject: Re:  [3.5 regression] unwind-dw2.c:1311: error: insn outside basic block

> 
> ------- Additional Comments From pinskia at gcc dot gnu dot org  2004-06-20 05:33 -------
> I have patch.  David could you test this for me?
> Index: integrate.c
> ===============================================================
> ====
> RCS file: /cvs/gcc/gcc/gcc/integrate.c,v
> retrieving revision 1.257
> diff -u -p -r1.257 integrate.c
> --- integrate.c 15 Jun 2004 18:02:25 -0000      1.257
> +++ integrate.c 20 Jun 2004 05:33:03 -0000
> @@ -1284,6 +1284,13 @@ has_hard_reg_initial_val (enum machine_m
>    return has_func_hard_reg_initial_val (cfun, gen_rtx_REG (mode, regno));
>  }
>  
> +/* Return RTX to emit after when we want to emit code on the entry of function.  */
> +static rtx
> +entry_of_function (void)
> +{
> +  return (n_basic_blocks ? BB_HEAD (ENTRY_BLOCK_PTR->next_bb) : get_insns ());
> +}
> +
>  void
>  emit_initial_value_sets (void)
>  {
> @@ -1300,7 +1307,7 @@ emit_initial_value_sets (void)
>    seq = get_insns ();
>    end_sequence ();
>  
> -  emit_insn_after (seq, get_insns ());
> +  emit_insn_after (seq, entry_of_function ());
>  }

Thanks,
this looks like proper fix for this problem, just I think we can put
entry_of_function somewhere into global headers so it can be shared
across binutils.c and integrate.c
Thanks a lot for looking into this!

Honza
>  
>  /* If the backend knows where to allocate pseudos for hard
> 
> -- 
>            What    |Removed                     |Added
> ----------------------------------------------------------------------------
>          AssignedTo|unassigned at gcc dot gnu   |pinskia at gcc dot gnu dot
>                    |dot org                     |org
>              Status|NEW                         |ASSIGNED
> 
> 
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16089
> 
> ------- You are receiving this mail because: -------
> You are on the CC list for the bug, or are watching someone who is.


-- 


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



More information about the Gcc-bugs mailing list