From: borutr Date: Sun, 1 Mar 2009 10:50:36 +0000 (+0000) Subject: * src/z80/peep.c: fixed bug #2648964: --i-code-in-asm crashes sdcc X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=4195a59b6676a786cd329ced6a257701ca7bca85;p=fw%2Fsdcc * src/z80/peep.c: fixed bug #2648964: --i-code-in-asm crashes sdcc git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@5397 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- diff --git a/ChangeLog b/ChangeLog index 13740f42..3ee2328c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2009-03-01 Borut Razem + + * src/z80/peep.c: fixed bug #2648964: --i-code-in-asm crashes sdcc + 2009-03-01 Maarten Brock * src/mcs51/ralloc.c (spillThis, spilSomething): fixed bug 2435941 diff --git a/src/z80/peep.c b/src/z80/peep.c index b30335c2..3ae394f0 100644 --- a/src/z80/peep.c +++ b/src/z80/peep.c @@ -80,9 +80,9 @@ isReturned(const char *what) do { l = l->next; - } while(l->ic->op != FUNCTION); + } while(l->isComment || l->ic->op != FUNCTION); - sym = OP_SYMBOL(IC_LEFT(_G.head->next->next->ic)); + sym = OP_SYMBOL(IC_LEFT(l->ic)); if(sym && IS_DECL(sym->type)) {