Ignore:
Timestamp:
Apr 27, 2018, 2:35:11 PM (4 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
aaron-thesis, arm-eh, cleanup-dtors, deferred_resn, demangler, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, with_gc
Children:
399a908, a0c7d5cc
Parents:
b9f383f (diff), 9d5fb67 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/InitTweak/InitTweak.cc

    rb9f383f r5527759  
    528528                }
    529529                if ( dynamic_cast< ReferenceType * >( dst->result ) ) {
    530                         dst = new AddressExpr( dst );
     530                        for (int depth = dst->result->referenceDepth(); depth > 0; depth--) {
     531                                dst = new AddressExpr( dst );
     532                        }
    531533                } else {
    532534                        dst = new CastExpr( dst, new ReferenceType( noQualifiers, dst->result->clone() ) );
    533535                }
    534536                if ( dynamic_cast< ReferenceType * >( src->result ) ) {
    535                         src = new CastExpr( src, new ReferenceType( noQualifiers, src->result->stripReferences()->clone() ) );
     537                        for (int depth = src->result->referenceDepth(); depth > 0; depth--) {
     538                                src = new AddressExpr( src );
     539                        }
     540                        // src = new CastExpr( src, new ReferenceType( noQualifiers, src->result->stripReferences()->clone() ) );
    536541                }
    537542                return new ApplicationExpr( VariableExpr::functionPointer( assign ), { dst, src } );
Note: See TracChangeset for help on using the changeset viewer.