D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 7710 - Segmentation fault when assigning function to delegate variable
Summary: Segmentation fault when assigning function to delegate variable
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: x86_64 Linux
: P2 normal
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-14 13:05 UTC by Alex Rønne Petersen
Modified: 2012-04-21 06:56 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 Alex Rønne Petersen 2012-03-14 13:05:08 UTC
I have no idea if it's valid code, but it does crash DMD.

alexrp@alexrp ~/Projects/tests $ cat test.d
void foo()
{
}

void main()
{
    void delegate() f = foo;
}
alexrp@alexrp ~/Projects/tests $ dmd test.d
Segmentation fault
Comment 1 SomeDude 2012-04-21 06:51:07 UTC
With 2.059 Win32:

PS E:\DigitalMars\dmd2\samples> rdmd bug.d
bug.d(7): Error: expression foo() is void and has no value