D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 7588 - Segfault with alias this and function templates
Summary: Segfault with alias this and function templates
Status: RESOLVED DUPLICATE of issue 7580
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P2 normal
Assignee: No Owner
URL:
Keywords: ice
Depends on:
Blocks:
 
Reported: 2012-02-25 10:31 UTC by Trass3r
Modified: 2012-02-25 18:44 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Trass3r 2012-02-25 10:31:43 UTC
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 ()
Comment 1 yebblies 2012-02-25 18:39:20 UTC
Is this the same as issue 7580?
Comment 2 Kenji Hara 2012-02-25 18:44:07 UTC

*** This issue has been marked as a duplicate of issue 7580 ***