/* 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; }
See http://sourceware.org/bugzilla/show_bug.cgi?id=10231
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 >
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".
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
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
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
.
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