Bug 40473 - -mno-sched-prolog breaks function parameter debug location lists
Summary: -mno-sched-prolog breaks function parameter debug location lists
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 4.5.0
: P3 normal
Target Milestone: ---
Assignee: Alan Modra
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-06-17 09:20 UTC by Alan Modra
Modified: 2009-09-23 22:39 UTC (History)
2 users (show)

See Also:
Host:
Target: powerpc-*-linux
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments
patch proposal (433 bytes, patch)
2009-06-17 14:36 UTC, Alan Modra
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alan Modra 2009-06-17 09:20:56 UTC
/* When compiled with -g -O -mno-sched-prolog, the debug info location
   lists for p1 and p2 do not cover the start of f.  There are other
   inaccuracies, but not covering the start of the function is specific
   to -nno-sched-prolog.  */
int f (int p1, int p2)
{
  extern int bar (int);
  int x, y;
  for (x = p1, y = 0; x < p2; x++)
    y += bar (x);
  return y;
}
Comment 1 Alan Modra 2009-06-17 09:21:25 UTC
See http://sourceware.org/bugzilla/show_bug.cgi?id=10231
Comment 2 pinskia@gmail.com 2009-06-17 13:12:48 UTC
Subject: Re:  -mno-sched-prolog breaks function parameter debug location lists

This option should just be removed.

Sent from my iPhone

On Jun 17, 2009, at 2:21 AM, "amodra at bigpond dot net dot au" <gcc-bugzilla@gcc.gnu.org 
 > wrote:

>
>
> ------- Comment #1 from amodra at bigpond dot net dot au  2009-06-17  
> 09:21 -------
> See http://sourceware.org/bugzilla/show_bug.cgi?id=10231
>
>
> -- 
>
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40473
>
Comment 3 Alan Modra 2009-06-17 14:36:12 UTC
Created attachment 18016 [details]
patch proposal

Actually, it doesn't look all that hard to fix.  The attached patch is a little horrible in that it doesn't use the normal method of insert_insn_on_edge(), commit_edge_insertions(), but we are too late for that.  I tried, and found verify_flow_info() in commit_edge_insertions() was bombing on stuff already present.  Patch currently bootstrapping with BOOT_CFLAGS="-g -O2 -mno-sched-prolog".
Comment 4 Alan Modra 2009-09-23 00:23:37 UTC
Subject: Bug 40473

Author: amodra
Date: Wed Sep 23 00:23:24 2009
New Revision: 152056

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=152056
Log:
	PR target/40473
	* config/rs6000/rs6000.c (rs6000_output_function_prologue): Don't
	call final to emit non-scheduled prologue, instead insert at entry.


Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/rs6000/rs6000.c

Comment 5 Alan Modra 2009-09-23 22:19:25 UTC
Subject: Bug 40473

Author: amodra
Date: Wed Sep 23 22:19:05 2009
New Revision: 152103

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=152103
Log:
	PR target/40473
	* config/rs6000/rs6000.c (rs6000_output_function_prologue): Don't
	call final to emit non-scheduled prologue, instead insert at entry.


Modified:
    branches/gcc-4_4-branch/gcc/ChangeLog
    branches/gcc-4_4-branch/gcc/config/rs6000/rs6000.c

Comment 6 Alan Modra 2009-09-23 22:30:28 UTC
Subject: Bug 40473

Author: amodra
Date: Wed Sep 23 22:30:05 2009
New Revision: 152105

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=152105
Log:
	PR target/40473
	* config/rs6000/rs6000.c (rs6000_output_function_prologue): Don't
	call final to emit non-scheduled prologue, instead insert at entry.


Modified:
    branches/gcc-4_3-branch/gcc/ChangeLog
    branches/gcc-4_3-branch/gcc/config/rs6000/rs6000.c

Comment 7 Alan Modra 2009-09-23 22:39:04 UTC
.
Comment 8 Peter Bergner 2009-10-02 17:12:43 UTC
Subject: Bug 40473

Author: bergner
Date: Fri Oct  2 17:12:31 2009
New Revision: 152411

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=152411
Log:
	Backport from mainline:

	2009-08-23  Alan Modra  <amodra@bigpond.net.au>
	PR target/41081
	* config/rs6000/rs6000.md (rotlsi3_64, ashlsi3_64, lshrsi3_64,
	ashrsi3_64): New.


	Backport from 4.3 branch:

	2009-09-25  Alan Modra  <amodra@bigpond.net.au>
	* config/rs6000/rs6000.md (load_toc_v4_PIC_3c): Correct POWER
	form of instruction.

	2009-09-23  Alan Modra  <amodra@bigpond.net.au>
	PR target/40473
	* config/rs6000/rs6000.c (rs6000_output_function_prologue): Don't
	call final to emit non-scheduled prologue, instead insert at entry.

Modified:
    branches/ibm/gcc-4_3-branch/gcc/ChangeLog.ibm
    branches/ibm/gcc-4_3-branch/gcc/config/rs6000/rs6000.c
    branches/ibm/gcc-4_3-branch/gcc/config/rs6000/rs6000.md