[Issue 934] Segfault taking mangleof a forward reference in a template.

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Apr 16 02:05:08 PDT 2009


http://d.puremagic.com/issues/show_bug.cgi?id=934


clugdbug at yahoo.com.au changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|forward reference by        |Segfault taking mangleof a
                   |pragma(msg) in template:    |forward reference in a
                   |"mtype.c:550: virtual       |template.
                   |Expression*                 |
                   |Type::getProperty(Loc,      |
                   |Identifier*): Assertion     |
                   |`deco' failed"              |




------- Comment #2 from clugdbug at yahoo.com.au  2009-04-16 04:05 -------
Actually it's nothing to do with pragma(msg). It's the mangleof which is the
problem. Change it to .stringof and problem disappears.

template Templ(T) {
const char [] XXX = Type.mangleof;
    alias T Type;
}

void main() {
    Templ!(int).Type x;  // instantiate
}
====================
Segfaults on DMD2.028.
assert mtype.c(1272) deco
<segfault>

DMD1.042
Assertion failure: 'deco' on line 576 in file 'mtype.c'

abnormal program termination


-- 



More information about the Digitalmars-d-bugs mailing list