www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 3524] New: "Internal error: e2ir.c 725", after scoped error and processing inrevelant file.

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=3524

           Summary: "Internal error: e2ir.c 725", after scoped error and
                    processing inrevelant file.
           Product: D
           Version: 2.032
          Platform: x86
        OS/Version: Linux
            Status: NEW
          Severity: minor
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: baryluk smp.if.uj.edu.pl


--- Comment #0 from Witold Baryluk <baryluk smp.if.uj.edu.pl> 2009-11-18
20:31:59 PST ---


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Nov 18 2009
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=3524



--- Comment #1 from Witold Baryluk <baryluk smp.if.uj.edu.pl> 2009-11-18
20:34:58 PST ---
file1.d:
--------------
class F(T, alias s) {
    this() {
        s.c += cast(T)2;
    }
}

class A(T) {
    T c;
}

void main() {
    for (int Mi = 0; Mi < 10; Mi++) {
        scope a = new A!(float)();
        scope f = new F!(float, a)();
    }
}
--------------


file2.d:
--------------
class A {
    void foo() {}
}

class B(alias G) {
    void bar() {
        G.foo();
    }
}

void bzium(A g) {
    new B!(g)();
}
--------------


$ dmd2 file1.d file2.d
file1.d(13): Error: variable bug35xx.main.a has scoped destruction, cannot
build closure
Internal error: e2ir.c 725
$

This is minimal test case I found in big program. actually removing file2.d
from command line helps (file1.d doesn't need anything from file2.d)

$ dmd2 file1.d
file1.d(13): Error: variable bug35xx.main.a has scoped destruction, cannot
build closure
$

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Nov 18 2009
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=3524



--- Comment #2 from Witold Baryluk <baryluk smp.if.uj.edu.pl> 2009-11-18
20:40:53 PST ---
slightly smaller file1.d:

file1.d:
--------
class E {}

class F(alias s) {
    void zz() {
        s.toHash();
    }
}


void main() {
    scope e = new E(); // line 11
    auto f = new F!(e)();
}
--------

$ dmd2 file1.d file2.d
file1.d(11): Error: variable file1.main.e has scoped destruction, cannot build
closure
Internal error: e2ir.c 725
$

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Nov 18 2009
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=3524


Don <clugdbug yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |clugdbug yahoo.com.au
            Summary|"Internal error: e2ir.c     |ICE(e2ir.c): using alias
                   |725", after scoped error    |parameter after scope
                   |and processing inrevelant   |closure error
                   |file.                       |


--- Comment #3 from Don <clugdbug yahoo.com.au> 2010-01-11 06:58:54 PST ---
Reduced test case shows that this is some form of memory corruption.
------
class A {}

struct F(alias g) {
  void e() {
      assert(g);
  }
}

void bzium(A a) {
    scope A b;
    F!(b) c;
    F!(a) d;
}
----
file2.d(10): Error: variable file2.bzium.b has scoped destruction, cannot build
closure
Internal error: e2ir.c 739

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