Summary: struct passed to template: cannot access frame pointer
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: regression
          Priority: P2
         Component: DMD

--- Comment #0 from Jameson <> 2012-10-21 11:13:20 PDT ---
import std.traits;

    auto fun(T)(out T ret) {

    version(none) {
        auto fun(T)(T ret) {

    void main() {
        struct A {
            auto f() {

        A a;

With the latest dmd (from HEAD), I get the following compile errors:

    test.d(3): Error: cannot access frame pointer of test.main.A
    test.d(18): Error: template instance!(A) error instantiating

This only happens when the struct has a function and it's passed as an out
parameter. This worked fine on DMD 2.060, but breaks with the HEAD on master.

Any following will cause this to compile:

* remove f()
* make A static
* change out in fun to anything else (ref, in, ...)

This may be related to

Tests run on Linux x64, dmd compiled with 'gmake -f posix.mak MODEL=64;'

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to