Changes in src/GenPoly/Lvalue.cc [57acae0:6b8c4a8]
- File:
-
- 1 edited
-
src/GenPoly/Lvalue.cc (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/GenPoly/Lvalue.cc
r57acae0 r6b8c4a8 166 166 if ( isIntrinsicReference( appExpr ) ) { 167 167 // 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(); 170 170 appExpr->result->set_lvalue( true ); 171 171 if ( ! inIntrinsic ) { … … 183 183 void FixIntrinsicResult::premutate( FunctionDecl * funcDecl ) { 184 184 GuardValue( inIntrinsic ); 185 inIntrinsic = funcDecl->linkage == LinkageSpec::Intrinsic;185 inIntrinsic = funcDecl->linkage == LinkageSpec::Intrinsic; 186 186 } 187 187 … … 403 403 ret = new AddressExpr( ret ); 404 404 } 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() ) ) { 406 406 // must keep cast if cast-to type is different from the actual type 407 407 castExpr->arg = ret;
Note:
See TracChangeset
for help on using the changeset viewer.