D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 10575 - struct and alloca cause internal error
Summary: struct and alloca cause internal error
Status: RESOLVED DUPLICATE of issue 3753
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: 2013-07-08 11:54 UTC by Maxime Chevalier-Boisvert
Modified: 2013-08-28 00:20 UTC (History)
1 user (show)

See Also:


Attachments
failing test case (165 bytes, text/x-dsrc)
2013-07-08 11:54 UTC, Maxime Chevalier-Boisvert
Details

Note You need to log in before you can comment on or make changes to this issue.
Description Maxime Chevalier-Boisvert 2013-07-08 11:54:40 UTC
Created attachment 1231 [details]
failing test case

Using alloca in a function with a struct that has a destructor seems to cause
an internal compiler error in DMD. The following error message results:

Internal error: eh.c 54

A failing test case is attached.
Comment 1 yebblies 2013-08-20 07:40:24 UTC
For small test cases, please paste inline instead of attaching.

import core.stdc.stdlib;

struct TheStruct
{
    ~this()
    {
    }
}

void bar()
{
}

void main()
{
    auto s = TheStruct();
    bar();
    auto a = alloca(16);
}

I can't reproduce on win32, but that is not a surprise as eh.c is posix-only.
Comment 2 Don 2013-08-28 00:20:03 UTC

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