Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/GenPoly/Lvalue.cc

    r57acae0 r6b8c4a8  
    166166                        if ( isIntrinsicReference( appExpr ) ) {
    167167                                // eliminate reference types from intrinsic applications - now they return lvalues
    168                                 Type * result = appExpr->result;
    169                                 appExpr->result = result->stripReferences()->clone();
     168                                ReferenceType * result = strict_dynamic_cast< ReferenceType * >( appExpr->result );
     169                                appExpr->result = result->base->clone();
    170170                                appExpr->result->set_lvalue( true );
    171171                                if ( ! inIntrinsic ) {
     
    183183                void FixIntrinsicResult::premutate( FunctionDecl * funcDecl ) {
    184184                        GuardValue( inIntrinsic );
    185                         inIntrinsic =  funcDecl->linkage == LinkageSpec::Intrinsic;
     185                        inIntrinsic = funcDecl->linkage == LinkageSpec::Intrinsic;
    186186                }
    187187
     
    403403                                        ret = new AddressExpr( ret );
    404404                                }
    405                                 if ( srcType->get_lvalue() && srcType->get_qualifiers() != strict_dynamic_cast<ReferenceType *>( destType )->base->get_qualifiers() ) {
     405                                if ( srcType->get_lvalue() && ! ResolvExpr::typesCompatible( srcType, strict_dynamic_cast<ReferenceType *>( destType )->base, SymTab::Indexer() ) ) {
    406406                                        // must keep cast if cast-to type is different from the actual type
    407407                                        castExpr->arg = ret;
Note: See TracChangeset for help on using the changeset viewer.