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


yebblies <yebbl...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-invalid-code
                 CC|                            |yebbl...@gmail.com
           Platform|Other                       |All
            Summary|Bus error with non-constant |ICE(constfold.c) On use of
                   |expression and struct       |invalid expression as a
                   |initializer                 |compile-time initializer
         OS/Version|Mac OS X                    |All


--- Comment #1 from yebblies <yebbl...@gmail.com> 2011-09-06 14:10:39 EST ---
That's a strange place to get the error.  I get an AV at constfold.c:1396.

CatExp::optimize calls :optimize on fileProtocol (which does nothing) then
passes it along to Cat, which crashes trying to access fileProtocol's type.

It seems to happen for all operators:

class Orbit
{
    Repository repository = Repository();
}

struct Repository
{
    //int source = xx ~ xx;
    //int source = xx + xx;
    //int source = xx - xx;
    //int source = xx * xx;
    //int source = xx / xx;
    //int source = xx ^^ xx;
    //int source = xx & xx;
    int source = xx | xx;
}

void main () {}

It is probably invalid to assume e->type has been set inside Cat and other
constfold functions.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to