diff mbox

Fix PR57451 (Incorrect debug ranges emitted for -freorder-blocks-and-partition -g)

Message ID CAAe5K+WdX+DijjgzDo8k254PHBWekwVrg6=imQpo7YtnJMkUHw@mail.gmail.com
State New
Headers show

Commit Message

Teresa Johnson Aug. 23, 2013, 1:34 p.m. UTC
Hi Steve and Kaz,

Sorry about that. Kaz has a fix shown in rtl-optimization/58220:

It should be committed soon, by Kaz or myself once testing finishes.
Please let me know if that doesn't fix your failures.

Thanks,
Teresa

On Thu, Aug 22, 2013 at 4:59 PM, Kaz Kojima <kkojima@rr.iij4u.or.jp> wrote:
> Steve Ellcey <sellcey@mips.com> wrote:
>> On Mon, 2013-08-19 at 22:21 -0700, Teresa Johnson wrote:
>>
>>> 2013-08-19  Teresa Johnson  <tejohnson@google.com>
>>>
>>>         PR rtl-optimizations/57451
>>>         * final.c (reemit_insn_block_notes): Prevent lexical blocks
>>>         from crossing split section boundaries.
>>>
>>>         * testsuite/g++.dg/tree-prof/pr57451.C: New test.
>>
>> Teresa,
>>
>> This patch is causing a problem in my mips compiler.  I am creating a
>> cross-toolchain running on x86 targeting mips-mti-linux-gnu and if I
>> compile glibc using a GCC that has this patch all of the programs I
>> compile go into an infinite loop when run under the qemu simulator.  I
>> think it is the dynamic linker that is getting miscompiled, but I
>> haven't tracked down the exact nature of the miscompilation yet.  Has
>> anyone else reported any problems with it?  I am adding Richard
>> Sandiford to the email list since he is a mips expert and also might
>> have some insight to using next_active_insn vs. next_real_insn vs.
>> next_insn, though it doesn't look like you have changed what is used
>> here.
>
> Similar on SH.  I've just filed rtl-optimization/58220.
>
> Regards,
>         kaz

Comments

Teresa Johnson Aug. 23, 2013, 2:38 p.m. UTC | #1
On Fri, Aug 23, 2013 at 6:34 AM, Teresa Johnson <tejohnson@google.com> wrote:
> Hi Steve and Kaz,
>
> Sorry about that. Kaz has a fix shown in rtl-optimization/58220:
>
> --- ORIG/trunk/gcc/final.c 2013-08-22 09:43:35.000000000 +0900
> +++ trunk/gcc/final.c 2013-08-22 14:36:51.000000000 +0900
> @@ -1650,7 +1650,7 @@ reemit_insn_block_notes (void)
>    rtx insn, note;
>
>    insn = get_insns ();
> -  for (; insn; insn = next_insn (insn))
> +  for (; insn; insn = NEXT_INSN (insn))
>      {
>        tree this_block;
>
> It should be committed soon, by Kaz or myself once testing finishes.
> Please let me know if that doesn't fix your failures.

Fix committed as r201941. Let me know if you still have issues.

Teresa

>
> Thanks,
> Teresa
>
> On Thu, Aug 22, 2013 at 4:59 PM, Kaz Kojima <kkojima@rr.iij4u.or.jp> wrote:
>> Steve Ellcey <sellcey@mips.com> wrote:
>>> On Mon, 2013-08-19 at 22:21 -0700, Teresa Johnson wrote:
>>>
>>>> 2013-08-19  Teresa Johnson  <tejohnson@google.com>
>>>>
>>>>         PR rtl-optimizations/57451
>>>>         * final.c (reemit_insn_block_notes): Prevent lexical blocks
>>>>         from crossing split section boundaries.
>>>>
>>>>         * testsuite/g++.dg/tree-prof/pr57451.C: New test.
>>>
>>> Teresa,
>>>
>>> This patch is causing a problem in my mips compiler.  I am creating a
>>> cross-toolchain running on x86 targeting mips-mti-linux-gnu and if I
>>> compile glibc using a GCC that has this patch all of the programs I
>>> compile go into an infinite loop when run under the qemu simulator.  I
>>> think it is the dynamic linker that is getting miscompiled, but I
>>> haven't tracked down the exact nature of the miscompilation yet.  Has
>>> anyone else reported any problems with it?  I am adding Richard
>>> Sandiford to the email list since he is a mips expert and also might
>>> have some insight to using next_active_insn vs. next_real_insn vs.
>>> next_insn, though it doesn't look like you have changed what is used
>>> here.
>>
>> Similar on SH.  I've just filed rtl-optimization/58220.
>>
>> Regards,
>>         kaz
>
>
>
> --
> Teresa Johnson | Software Engineer | tejohnson@google.com | 408-460-2413
Steve Ellcey Aug. 23, 2013, 4:20 p.m. UTC | #2
On Fri, 2013-08-23 at 07:38 -0700, Teresa Johnson wrote:

> > It should be committed soon, by Kaz or myself once testing finishes.
> > Please let me know if that doesn't fix your failures.
> 
> Fix committed as r201941. Let me know if you still have issues.
> 
> Teresa

This patch fixes the problem for me.  Thanks Teresa, Thanks Kaz.

Steve Ellcey
diff mbox

Patch

--- ORIG/trunk/gcc/final.c 2013-08-22 09:43:35.000000000 +0900
+++ trunk/gcc/final.c 2013-08-22 14:36:51.000000000 +0900
@@ -1650,7 +1650,7 @@  reemit_insn_block_notes (void)
   rtx insn, note;

   insn = get_insns ();
-  for (; insn; insn = next_insn (insn))
+  for (; insn; insn = NEXT_INSN (insn))
     {
       tree this_block;