[Issue 14272] DMD segfault in in Dsymbol::checkDeprecated(Loc, Scope*) on possibly invalid code
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Wed Mar 11 03:23:41 PDT 2015
https://issues.dlang.org/show_bug.cgi?id=14272
Ketmar Dark <ketmar at ketmar.no-ip.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ketmar at ketmar.no-ip.org
--- Comment #1 from Ketmar Dark <ketmar at ketmar.no-ip.org> ---
heh. this is stack overflow when trying to do semantic analysis on `tag`.
compiler sees `tag` declaration inside struct with initialiser and starts
semantic analysis of initializer, which comes to `tag` declaration inside
struct with initialiser, and compiler starts semantic analysis of initializer,
which comes to... also, this is not template-related bug, the following code
gives the same result:
struct A {
enum int tag = tag;
}
void main () {
auto a = A();
}
compiler needs to check for recursive symbol usage in initializer.
--
More information about the Digitalmars-d-bugs
mailing list