D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 10401 - ICE(ztc/symbol.c 1035) - inline Nullable struct with JSONValue
Summary: ICE(ztc/symbol.c 1035) - inline Nullable struct with JSONValue
Status: RESOLVED WORKSFORME
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P2 regression
Assignee: No Owner
URL:
Keywords: ice
Depends on:
Blocks:
 
Reported: 2013-06-18 04:57 UTC by Mario Kroeplin
Modified: 2013-10-07 00:15 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Mario Kroeplin 2013-06-18 04:57:10 UTC
With D 2.063 and D 2.063.2 the following code does no longer compile with switch '-inline':

import std.json;
import std.typecons;

struct S
{
    JSONValue value;
}

void f(Nullable!S s) { }

The error message is:
Internal error: ../ztc/symbol.c 1035
Comment 1 hsteoh 2013-06-29 13:42:43 UTC
Confirmed on DMD git HEAD (5a97c27ed1081357e48a5658b71a357addfcfb62) on Linux/amd64.
Comment 2 hsteoh 2013-06-29 14:16:00 UTC
The ICE appears to be introduced by DMD commit 42e929a12c4df7a68e7bc721479a36697abce67b (fix for issue #3789).

However, due to changes in Phobos, the above version of DMD is unable to reproduce the same problem in Phobos git HEAD; the latest version of Phobos that this version of DMD is able to compile (and reproduce the problem) is 41098e3f49492fb1cd44137c4cac41083c5e34c1.

(tldr: to reproduce the bug, first checkout Phobos commit 41098e3, otherwise the bug won't show up in the referenced DMD commit above, since newer versions of Phobos use syntax only supported by later versions of DMD.)
Comment 3 Walter Bright 2013-10-07 00:15:44 UTC
Compiles without error with 2.064 with and without -inline.