[Issue 7588] New: Segfault with alias this and function templates

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Feb 25 10:31:45 PST 2012


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

           Summary: Segfault with alias this and function templates
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: ice
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: mrmocool at gmx.de


--- Comment #0 from Trass3r <mrmocool at gmx.de> 2012-02-25 19:31:43 CET ---
struct S
{
   int t(A...)(A a) { return 0; }
   alias t this;
}

int main()
{
   S s;
   return s;
}

$ gdb --args dmd test.d

Program received signal SIGSEGV, Segmentation fault.
0x00000000004caee3 in TypeStruct::implicitConvTo(Type*) ()
(gdb) bt
#0  0x00000000004caee3 in TypeStruct::implicitConvTo(Type*) ()
#1  0x000000000040c527 in Expression::implicitConvTo(Type*) ()
#2  0x000000000040c2fd in Expression::implicitCastTo(Scope*, Type*) ()
#3  0x00000000004f3f0b in ReturnStatement::semantic(Scope*) ()
#4  0x00000000004ec6a2 in CompoundStatement::semantic(Scope*) ()
#5  0x000000000048defc in FuncDeclaration::semantic3(Scope*) ()
#6  0x00000000004ba294 in Module::semantic3() ()
#7  0x00000000004b83b2 in main ()

-- 
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