diff options
author | carlo <carlo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-09-29 23:09:12 +0000 |
---|---|---|
committer | carlo <carlo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-09-29 23:09:12 +0000 |
commit | 79e6cfee8d92ce808495f39e77cf6d16fe97e752 (patch) | |
tree | c72cbbd2ca46ce5cae76146e9dad49e168fb7c79 /gcc/cfglayout.c | |
parent | 40d3e4b2e18466b4ef8b8ba4d9f8ad48702044ae (diff) | |
download | gcc-79e6cfee8d92ce808495f39e77cf6d16fe97e752.tar.gz |
PR debug/12319
* cfglayout.c (insn_scope): Use prologue_locator and
epilogue_locator; return the outer function scope for
pro- and epilogue insns.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@71926 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cfglayout.c')
-rw-r--r-- | gcc/cfglayout.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/cfglayout.c b/gcc/cfglayout.c index 7121a3e5db4..f713eb16651 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) |