Bug 6896 – ICE(glue.c !vthis->csym): on method with alias this access

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
Other
OS
All
Creation time
2011-11-05T11:12:00Z
Last change time
2012-05-04T16:07:04Z
Keywords
ice
Assigned to
nobody
Creator
code

Comments

Comment #0 by code — 2011-11-05T11:12:46Z
// REQUIRED_ARGS: -inline struct Nested { int _val; } struct S { Nested _nested; alias _nested this; void set(int v) { assign(v); } void assign(int v) { _val = v; } } ---- Note that this does not happen when the definition of assign comes lexically before set. So the issue appears to be an alias this access when inlining a function that was forward referenced. This is probably related to http://d.puremagic.com/issues/show_bug.cgi?id=2962.
Comment #1 by dsimcha — 2011-12-08T16:21:41Z
Here's another way to reproduce the same failure: int expression( string op, Lhs, Rhs ) ( auto ref Lhs lhs, auto ref Rhs rhs ) { return 0; } struct BasicMatrix( Storage_ ) { auto opBinary( string op, NewRhs )( auto ref NewRhs newRhs ) { alias this thisConverted; return expression!op( thisConverted, newRhs ); } } void ridgeLargeP() { BasicMatrix!double cwc; auto foo = cwc * cwc; }
Comment #2 by dsimcha — 2011-12-08T16:21:49Z
*** Issue 7082 has been marked as a duplicate of this issue. ***
Comment #3 by lovelydear — 2012-04-20T17:15:45Z
Both tests pass and run with or without -inline
Comment #4 by lovelydear — 2012-04-20T17:16:10Z
(In reply to comment #3) > Both tests pass and run with or without -inline On 2.059 Win32
Comment #5 by lovelydear — 2012-05-01T15:56:08Z
Should be closed FIXED.