D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 14642 - [REG2.066] ICE in ctfeInterpret
Summary: [REG2.066] ICE in ctfeInterpret
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P1 regression
Assignee: No Owner
URL:
Keywords: ice, pull
: 14240 (view as issue list)
Depends on:
Blocks:
 
Reported: 2015-06-02 10:54 UTC by Maor
Modified: 2015-06-17 21:05 UTC (History)
2 users (show)

See Also:


Attachments
a tar containing 2 tars (each with the code reproducing the bug on a specific dmd version) (6.95 KB, application/gzip)
2015-06-02 10:54 UTC, Maor
Details

Note You need to log in before you can comment on or make changes to this issue.
Description Maor 2015-06-02 10:54:06 UTC
Created attachment 1525 [details]
a tar containing 2 tars (each with the code reproducing the bug on a specific dmd version)

Attached is the dustmite reduced code.

This bug reproduces on both dmd 2.066.1 & 2.067.1 (but the code reproducing it is slightly different, therefore, the attachment contains a tar with 2 tars in it , one for each version of dmd).

The reduced code has some compilation errors (the original one didn't) but the seg fault still happens.

after untarring the code just run:

for 2.066.1: dmd -g -w -c weka/XXX/XXZ/XXY.d -ofsome_obj.o
for 2.067.1: dmd -c weka/BXX/IXX/DXX.d
Comment 1 Vladimir Panteleev 2015-06-03 01:04:55 UTC
Introduced in https://github.com/D-Programming-Language/dmd/pull/3824 I think
Comment 2 Kenji Hara 2015-06-03 10:34:47 UTC
Reduced test case from the second tar for 2.067.1:

alias TypeTuple(T...) = T;

struct X
{
    static struct NA()
    {
        X x;

        void check()
        {
            x.func();
        }
    }

    alias na = NA!();

    auto func()
    {
        Y* p;
        p.func();
    }
}

struct Y
{
    mixin Mix;
}

template Mix()
{
    void func()
    {
        auto z = Z(null);
    }
}

struct Type(size_t v) {}

enum errVal = errorValue;

struct Z
{
    Type!errVal v;
}
Comment 4 github-bugzilla 2015-06-03 19:13:29 UTC
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/e555b562d733e277773bc632c12917505e680b10
fix Issue 14642 - ICE in ctfeInterpret

https://github.com/D-Programming-Language/dmd/commit/a74d774ac1b5402895775b3df9a8cddcd7960f2e
Merge pull request #4715 from 9rnsr/fix14642

[REG2.066] Issue 14642 - ICE in ctfeInterpret
Comment 5 Kenji Hara 2015-06-04 06:08:35 UTC
*** Issue 14240 has been marked as a duplicate of this issue. ***