Note: This website is archived. For up-to-date information about D projects and development, please visit wiki.dlang.org.

Changeset 600

Show
Ignore:
Timestamp:
08/05/10 18:16:27 (14 years ago)
Author:
walter
Message:

bugzilla 4578 Regression(2.047,1.062): ICE(cgcod.c): var+arr[]

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/dmd-1.x/src/e2ir.c

    r579 r600  
    16801680    e = e1->toElem(irs); 
    16811681    einc = e2->toElem(irs); 
    16821682    e = el_bin((op == TOKplusplus) ? OPpostinc : OPpostdec, 
    16831683                e->Ety,e,einc); 
    16841684    el_setLoc(e,loc); 
    16851685    return e; 
    16861686} 
    16871687 
    16881688//////////////////////////// Binary /////////////////////////////// 
    16891689 
    16901690/******************************************** 
    16911691 */ 
    16921692 
    16931693elem *BinExp::toElemBin(IRState *irs,int op) 
    16941694{ 
    16951695    //printf("toElemBin() '%s'\n", toChars()); 
    16961696 
    16971697    Type *tb1 = e1->type->toBasetype(); 
    16981698    Type *tb2 = e2->type->toBasetype(); 
    16991699 
    1700     if ((tb1->ty == Tarray || tb1->ty == Tsarray) && 
    1701         (tb2->ty == Tarray || tb2->ty == Tsarray) && 
     1700    if ((tb1->ty == Tarray || tb1->ty == Tsarray || 
     1701         tb2->ty == Tarray || tb2->ty == Tsarray) && 
     1702        tb2->ty != Tvoid && 
    17021703        op != OPeq && op != OPandand && op != OPoror 
    17031704       ) 
    17041705    { 
    17051706        error("Array operation %s not implemented", toChars()); 
    17061707        return el_long(type->totym(), 0);  // error recovery 
    17071708    } 
    17081709 
    17091710    tym_t tym = type->totym(); 
    17101711 
    17111712    elem *el = e1->toElem(irs); 
    17121713    elem *er = e2->toElem(irs); 
    17131714    elem *e = el_bin(op,tym,el,er); 
    17141715 
    17151716    el_setLoc(e,loc); 
    17161717    return e; 
    17171718} 
    17181719 
    17191720/*************************************** 
    17201721 */ 
    17211722 
  • trunk/src/e2ir.c

    r579 r600  
    19841984    elem *e = e1->toElem(irs); 
    19851985    elem *einc = e2->toElem(irs); 
    19861986    e = el_bin((op == TOKplusplus) ? OPpostinc : OPpostdec, 
    19871987                e->Ety,e,einc); 
    19881988    el_setLoc(e,loc); 
    19891989    return e; 
    19901990} 
    19911991 
    19921992//////////////////////////// Binary /////////////////////////////// 
    19931993 
    19941994/******************************************** 
    19951995 */ 
    19961996 
    19971997elem *BinExp::toElemBin(IRState *irs,int op) 
    19981998{ 
    19991999    //printf("toElemBin() '%s'\n", toChars()); 
    20002000 
    20012001    Type *tb1 = e1->type->toBasetype(); 
    20022002    Type *tb2 = e2->type->toBasetype(); 
    20032003 
    2004     if ((tb1->ty == Tarray || tb1->ty == Tsarray) && 
    2005         (tb2->ty == Tarray || tb2->ty == Tsarray) && 
     2004    if ((tb1->ty == Tarray || tb1->ty == Tsarray || 
     2005         tb2->ty == Tarray || tb2->ty == Tsarray) && 
     2006        tb2->ty != Tvoid && 
    20062007        op != OPeq && op != OPandand && op != OPoror 
    20072008       ) 
    20082009    { 
    20092010        error("Array operation %s not implemented", toChars()); 
    20102011        return el_long(type->totym(), 0);  // error recovery 
    20112012    } 
    20122013 
    20132014    tym_t tym = type->totym(); 
    20142015 
    20152016    elem *el = e1->toElem(irs); 
    20162017    elem *er = e2->toElem(irs); 
    20172018    elem *e = el_bin(op,tym,el,er); 
    20182019 
    20192020    el_setLoc(e,loc); 
    20202021    return e; 
    20212022} 
    20222023 
    20232024/*************************************** 
    20242025 */ 
    20252026