Changeset 1cdfa82 for src/InitTweak


Ignore:
Timestamp:
Apr 25, 2018, 4:55:53 PM (6 years ago)
Author:
Aaron Moss <a3moss@…>
Branches:
new-env, with_gc
Children:
42107b4
Parents:
2efe4b8 (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 remote-tracking branch 'origin/master' into with_gc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/InitTweak/InitTweak.cc

    r2efe4b8 r1cdfa82  
    529529                }
    530530                if ( dynamic_cast< ReferenceType * >( dst->result ) ) {
    531                         dst = new AddressExpr( dst );
     531                        for (int depth = dst->result->referenceDepth(); depth > 0; depth--) {
     532                                dst = new AddressExpr( dst );
     533                        }
    532534                } else {
    533535                        dst = new CastExpr( dst, new ReferenceType( noQualifiers, dst->result->clone() ) );
    534536                }
    535537                if ( dynamic_cast< ReferenceType * >( src->result ) ) {
    536                         src = new CastExpr( src, new ReferenceType( noQualifiers, src->result->stripReferences()->clone() ) );
     538                        for (int depth = src->result->referenceDepth(); depth > 0; depth--) {
     539                                src = new AddressExpr( src );
     540                        }
     541                        // src = new CastExpr( src, new ReferenceType( noQualifiers, src->result->stripReferences()->clone() ) );
    537542                }
    538543                return new ApplicationExpr( VariableExpr::functionPointer( assign ), { dst, src } );
Note: See TracChangeset for help on using the changeset viewer.