6296 – ICE(glue.c): invalid template instantiated in is(typeof()).

D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 6296 - ICE(glue.c): invalid template instantiated in is(typeof()).
Summary: ICE(glue.c): invalid template instantiated in is(typeof()).
Status: RESOLVED DUPLICATE of issue 4269
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D1 (retired)
Hardware: Other Windows
: P2 regression
Assignee: No Owner
URL:
Keywords: ice
Depends on:
Blocks: 9188
Show dependency tree / graph
Reported: 2011年07月12日 10:03 UTC by Denis Shelomovskii
Modified: 2012年12月20日 00:13 UTC (History)
4 users (show)

See Also:


Attachments
Bug testcase (96 bytes, text/x-dsrc)
2011年07月12日 10:03 UTC, Denis Shelomovskii
Details
Bug testcase (48 bytes, text/x-dsrc)
2011年11月19日 04:49 UTC, Denis Shelomovskii
Details
Show Obsolete (1) Add an attachment (proposed patch, testcase, etc.)

Note You need to log in before you can comment on or make changes to this issue.
Description Denis Shelomovskii 2011年07月12日 10:03:46 UTC
Created attachment 1006 [details] 
Bug testcase
Broken is(typeof(...)) is a realy blocker for me.
I didn't know where was a problem since dmd 1.067 where it was introduced.
And this bug report is the merit of DustMite:
702 КБ of my D sources -> few hours with DustMite (looks like it finally
crashed) -> 63.2 КБ -> some time with DustMite -> 2.33 КБ -> some time by hands
-> 96 bytes.
Comment 1 Trass3r 2011年07月15日 05:27:29 UTC
Seems to be D1-specific indeed, compiles fine with 2.054 on Linux x64.
Comment 2 Zoadian 2011年07月15日 06:45:28 UTC
nope probably same error on D2 here:
Assertion failure: '0' on line 1123 in file 'glue.c'
Windows x64 - VisualStudio2010 - VisualD, D2, DMD.2.054
http://pastebin.com/p3K8CMXF 
Comment 3 Trass3r 2011年07月15日 07:11:15 UTC
(In reply to comment #2)
What about Denis' test case?
Comment 4 Denis Shelomovskii 2011年07月15日 07:24:06 UTC
(In reply to comment #3)
> (In reply to comment #2)
> 
> What about Denis' test case?
If works with dmd 2.054. And I originally marked this issue as D1 only.
Comment 5 Trass3r 2011年07月15日 07:39:34 UTC
Zoadian, your test case is incomplete.
Error: undefined identifier Modifier
Also could you try reducing it with DustMite?
Comment 6 Zoadian 2011年07月15日 07:45:55 UTC
Reduced source code: http://pastebin.com/p3K8CMXF
never worked with dustmite, and no time to get into it now. sry.
Comment 7 Denis Shelomovskii 2011年07月15日 07:56:29 UTC
And where are the guys:
import util.math;
import util.array;
Comment 8 Zoadian 2011年07月15日 08:01:30 UTC
they are not needed, sry, forgot to remove them. : http://pastebin.com/e7HazwDF
math.d is empty; this is array.d http://pastebin.com/guBWs4h6 
Comment 9 Trass3r 2011年07月15日 08:06:25 UTC
My dmd yields
bug6296b.d(16): Error: cannot implicitly convert expression (this) of type ModifiableInt to typeof(this)
Comment 10 Denis Shelomovskii 2011年07月15日 08:20:32 UTC
I'll DustMite it.
Comment 11 Denis Shelomovskii 2011年07月15日 10:24:47 UTC
After DustMite-ing all phobos std.* sources: Issue6296 
Comment 12 Denis Shelomovskii 2011年07月15日 10:25:52 UTC
After DustMite-ing all phobos std.* sources: Issue6325 
Comment 13 Denis Shelomovskii 2011年09月09日 11:31:21 UTC
dmd 1.070 now fails with:
Assertion failure: '0' on line 1114 in file 'glue.c'
Reduced test case:
---
void f(A)(A) { }
bool b = is(typeof( f(x) ));
---
As it works for `f!(typeof(x))(x)`, looks like IFTI bug
Comment 15 Denis Shelomovskii 2011年09月14日 22:45:49 UTC
However, this D1 bug is still in dmd-1.x branch.
Comment 17 Denis Shelomovskii 2011年09月15日 12:47:03 UTC
Still in dmd-1.x branch (tested after 23846ac and fe308a1).
---
void f(A)(A) { }
bool b = is(typeof( f(x) ));
---
Comment 18 Don 2011年09月16日 03:02:04 UTC
(In reply to comment #17)
> Still in dmd-1.x branch (tested after 23846ac and fe308a1).
> ---
> void f(A)(A) { }
> bool b = is(typeof( f(x) ));
> ---
Aargh, it was 6650 which was fixed, not this one!
I just copied the wrong bug number into the pull request (the commit itself correctly names 6650).
Comment 19 Denis Shelomovskii 2011年11月19日 04:49:07 UTC
Created attachment 1045 [details] 
Bug testcase
Comment 20 Don 2012年05月03日 02:53:13 UTC
*** This issue has been marked as a duplicate of issue 4269 ***
Comment 21 Walter Bright 2012年12月10日 14:38:13 UTC
(In reply to comment #19)
> Created an attachment (id=1045) [details]
> Bug testcase
This compiles successfully for both D1 1.076 and D2 2.061


AltStyle によって変換されたページ (->オリジナル) /