[Issue 11201] ICE: (symbol.c) -inline stops compilation
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Nov 13 23:56:26 PST 2013
https://d.puremagic.com/issues/show_bug.cgi?id=11201
yebblies <yebblies at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |yebblies at gmail.com
--- Comment #3 from yebblies <yebblies at gmail.com> 2013-11-14 18:56:21 EST ---
Does not require -unittest
struct Foo {
int a;
float b;
Foo func()() const { return this; }
}
auto f1()(Foo a) { return a; }
void main() {
auto a = Foo(0, 1);
cast(void)(f1(a.func!()()) == a);
}
Produces this ast for main:
Foo a = Foo(0, 1.00000F);
cast(void)((Foo __inlineretval2 = Foo a = Foo __inlineretval1 = ref Foo this =
a
;
, (assert(&this, "null this") , this);
, __inlineretval1;
, a;
, __inlineretval2).a == a.a && (Foo __inlineretval3 = Foo a = Foo
__inlineretva
l1 = ref Foo this = a;
, (assert(&this, "null this") , this);
, __inlineretval1;
, a;
, __inlineretval3).b == a.b);
return 0;
The most suspect thing is that __inlineretval1 is declared twice - the crash in
symbol.c happens on this symbol with assert(s->Ssymnum == -1); - ie the symbol
is already numbered.
--
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list