aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlo Wood <carlo@alinoe.com>2003-09-29 23:09:12 +0000
committerCarlo Wood <carlo@gcc.gnu.org>2003-09-29 23:09:12 +0000
commitb82c4660a5f2cdd720d5b68c29006294245d75c7 (patch)
treec72cbbd2ca46ce5cae76146e9dad49e168fb7c79
parent6fe2eacc481af458ce1001ef56cf70e21825f1f0 (diff)
downloadgcc-b82c4660a5f2cdd720d5b68c29006294245d75c7.zip
gcc-b82c4660a5f2cdd720d5b68c29006294245d75c7.tar.gz
gcc-b82c4660a5f2cdd720d5b68c29006294245d75c7.tar.bz2
re PR debug/12319 (Wrong DW_AT_low_pc and DW_AT_high_pc for DW_TAG_inlined_subroutine)
PR debug/12319 * cfglayout.c (insn_scope): Use prologue_locator and epilogue_locator; return the outer function scope for pro- and epilogue insns. From-SVN: r71926
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/cfglayout.c12
2 files changed, 19 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index a9fdc0e..c2f6901 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2003-09-30 Carlo Wood <carlo@alinoe.com>
+
+ PR debug/12319
+ * cfglayout.c (insn_scope): Use prologue_locator and
+ epilogue_locator; return the outer function scope for
+ pro- and epilogue insns.
+
2003-09-29 Zack Weinberg <zack@codesourcery.com>
* objc/objc-act.c (encode_type): Encode INTEGER_TYPEs and
diff --git a/gcc/cfglayout.c b/gcc/cfglayout.c
index 7121a3e..f713eb1 100644
--- a/gcc/cfglayout.c
+++ b/gcc/cfglayout.c
@@ -415,6 +415,18 @@ insn_scope (rtx insn)
int min = 0;
int loc = INSN_LOCATOR (insn);
+ /* When block_locators_locs was initialized, the pro- and epilogue
+ insns didn't exist yet and can therefore not be found this way.
+ But we know that they belong to the outer most block of the
+ current function.
+ Without this test, the prologue would be put inside the block of
+ the first valid instruction in the function and when that first
+ insn is part of an inlined function then the low_pc of that
+ inlined function is messed up. Likewise for the epilogue and
+ the last valid instruction. */
+ if (loc == prologue_locator || loc == epilogue_locator)
+ return DECL_INITIAL (cfun->decl);
+
if (!max || !loc)
return NULL;
while (1)