[Issue 15296] New: [REG dmd2.069] cannot inline simple function that calls use non-inlinable statements

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Fri Nov 6 03:19:24 PST 2015


https://issues.dlang.org/show_bug.cgi?id=15296

          Issue ID: 15296
           Summary: [REG dmd2.069] cannot inline simple function that
                    calls use non-inlinable statements
           Product: D
           Version: D2
          Hardware: All
                OS: Windows
            Status: NEW
          Severity: regression
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: r.sagitario at gmx.de

The inliner is getting worse:

struct GCBits
{
    void setWords(size_t , size_t )
    {
        for(size_t w = 0; false; ) {}
    }

    pragma(inline,true)
    void setRange(size_t target, size_t len)
    {
        setWords(target, len);
    }
}

void foo()
{
    GCBits bits;
    bits.setRange(0, 0);
}

This used to compile with "-inline" with dmd 2.068, but does no longer with dmd
2.069 and git HEAD.

--


More information about the Digitalmars-d-bugs mailing list