[Issue 7625] New: inlining on works with explicit else branch

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Mar 1 16:10:27 PST 2012


http://d.puremagic.com/issues/show_bug.cgi?id=7625

           Summary: inlining on works with explicit else branch
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: dawg at dawgfoto.de


--- Comment #0 from dawg at dawgfoto.de 2012-03-01 16:10:26 PST ---
int foo(int v)
{
    return bar(2 * v);
}

int bar(int a)
{
    if (a > 0)
        return 1;
    // else
        return baz(a);
}

int baz(int a)
{
    if (a > 0)
        throw new Exception("a > 0");
    return a - 1;
}

--------

bar is only inlined by foo when 'else' is present.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list