New bugs incoming:

uint fn(uint a)
{
    final switch(a)
    {
        case 1 : {

            while(a < 20)
//          bool whileCondition;
//            WhileBlockEvalCond :
//            whileCondition = (a < 20);
            {
//                WhileBlockBegin:
                a++;
                if (a == 17) break;
/*
                WhlieBlockEnd:
                    if(!whileCondition)
                       goto WhileBlockAfter
                // break seems to go here :-/
                goto WhileBlockEvalCond;
                // break should go here!
*/
            }
//             WhileBlockAfter:
                return a;
        }
    }

    return 1;
}

pragma(msg, fn(1)); // should print 17
when executed with with newCTFE this will print 20

Reply via email to