Changes in / [af08051:28e58fd]


Ignore:
Location:
src
Files:
5 added
1 deleted
147 edited

Legend:

Unmodified
Added
Removed
  • src/CodeGen/CodeGenerator.cc

    raf08051 r28e58fd  
    192192                        genCommaList( aggDecl->get_parameters().begin(), aggDecl->get_parameters().end() );
    193193                        output << ")" << endl;
     194                        output << indent;
    194195                }
    195196
     
    205206                        for ( std::list< Declaration* >::iterator i = memb.begin(); i != memb.end(); i++ ) {
    206207                                updateLocation( *i );
     208                                output << indent;
    207209                                (*i)->accept( *this );
    208210                                output << ";" << endl;
     
    244246                                assert( obj );
    245247                                updateLocation( obj );
    246                                 output << mangleName( obj );
     248                                output << indent << mangleName( obj );
    247249                                if ( obj->get_init() ) {
    248250                                        output << " = ";
     
    332334        void CodeGenerator::visit( __attribute__((unused)) ConstructorInit * init ){
    333335                assertf( ! genC, "ConstructorInit nodes should not reach code generation." );
    334                 // xxx - generate something reasonable for constructor/destructor pairs
    335                 output << "<ctorinit>";
     336                // pseudo-output for constructor/destructor pairs
     337                output << "<ctorinit>{" << std::endl << ++indent << "ctor: ";
     338                maybeAccept( init->get_ctor(), *this );
     339                output << ", " << std::endl << indent << "dtor: ";
     340                maybeAccept( init->get_dtor(), *this );
     341                output << std::endl << --indent << "}";
    336342        }
    337343
     
    347353                        if ( varExpr->get_var()->get_linkage() == LinkageSpec::Intrinsic && operatorLookup( varExpr->get_var()->get_name(), opInfo ) ) {
    348354                                std::list< Expression* >::iterator arg = applicationExpr->get_args().begin();
    349                                 switch ( opInfo.type ) {
    350                                   case OT_PREFIXASSIGN:
    351                                   case OT_POSTFIXASSIGN:
    352                                   case OT_INFIXASSIGN:
    353                                   case OT_CTOR:
    354                                   case OT_DTOR:
    355                                         {
    356                                                 assert( arg != applicationExpr->get_args().end() );
    357                                                 if ( AddressExpr * addrExpr = dynamic_cast< AddressExpr * >( *arg ) ) {
    358                                                         // remove & from first assignment/ctor argument
    359                                                         *arg = addrExpr->get_arg();
    360                                                 } else {
    361                                                         // no address-of operator, so must be a pointer - add dereference
    362                                                         // NOTE: if the assertion starts to trigger, check that the application expr isn't being shared.
    363                                                         // Since its arguments are modified here, this assertion most commonly triggers when the application
    364                                                         // is visited multiple times.
    365                                                         UntypedExpr * newExpr = new UntypedExpr( new NameExpr( "*?" ) );
    366                                                         newExpr->get_args().push_back( *arg );
    367                                                         Type * type = InitTweak::getPointerBase( (*arg)->get_result() );
    368                                                         assertf( type, "First argument to a derefence must be a pointer. Ensure that expressions are not being shared." );
    369                                                         newExpr->set_result( type->clone() );
    370                                                         *arg = newExpr;
    371                                                 } // if
    372                                                 break;
    373                                         }
    374 
    375                                   default:
    376                                         // do nothing
    377                                         ;
    378                                 } // switch
    379 
    380355                                switch ( opInfo.type ) {
    381356                                  case OT_INDEX:
     
    584559                if ( castExpr->get_result()->isVoid() ) {
    585560                        output << "(void)" ;
    586                 } else if ( ! castExpr->get_result()->get_lvalue() ) {
    587                         // at least one result type of cast, but not an lvalue
     561                } else {
     562                        // at least one result type of cast.
     563                        // Note: previously, lvalue casts were skipped. Since it's now impossible for the user to write
     564                        // an lvalue cast, this has been taken out.
    588565                        output << "(";
    589566                        output << genType( castExpr->get_result(), "", pretty, genC );
    590567                        output << ")";
    591                 } else {
    592                         // otherwise, the cast is to an lvalue type, so the cast should be dropped, since the result of a cast is
    593                         // never an lvalue in C
    594568                } // if
    595569                castExpr->get_arg()->accept( *this );
     
    706680                extension( commaExpr );
    707681                output << "(";
     682                if ( genC ) {
     683                        // arg1 of a CommaExpr is never used, so it can be safely cast to void to reduce gcc warnings.
     684                        commaExpr->set_arg1( new CastExpr( commaExpr->get_arg1() ) );
     685                }
    708686                commaExpr->get_arg1()->accept( *this );
    709687                output << " , ";
    710688                commaExpr->get_arg2()->accept( *this );
    711689                output << ")";
     690        }
     691
     692        void CodeGenerator::visit( TupleAssignExpr * tupleExpr ) {
     693                assertf( ! genC, "TupleAssignExpr should not reach code generation." );
     694                tupleExpr->stmtExpr->accept( *this );
    712695        }
    713696
     
    759742                output << "(" << genType( compLitExpr->get_result(), "", pretty, genC ) << ")";
    760743                compLitExpr->get_initializer()->accept( *this );
     744        }
     745
     746        void CodeGenerator::visit( UniqueExpr * unqExpr ) {
     747                assertf( ! genC, "Unique expressions should not reach code generation." );
     748                output << "unq<" << unqExpr->get_id() << ">{ ";
     749                unqExpr->get_expr()->accept( *this );
     750                output << " }";
    761751        }
    762752
     
    770760                for ( Statement * stmt : stmts ) {
    771761                        updateLocation( stmt );
    772             output << printLabels( stmt->get_labels() );
     762                        output << printLabels( stmt->get_labels() );
    773763                        if ( i+1 == numStmts ) {
    774764                                // last statement in a statement expression needs to be handled specially -
     
    815805        void CodeGenerator::visit( ExprStmt * exprStmt ) {
    816806                assert( exprStmt );
    817                 Expression * expr = exprStmt->get_expr();
    818807                if ( genC ) {
    819808                        // cast the top-level expression to void to reduce gcc warnings.
    820                         expr = new CastExpr( expr );
    821                 }
    822                 expr->accept( *this );
     809                        exprStmt->set_expr( new CastExpr( exprStmt->get_expr() ) );
     810                }
     811                exprStmt->get_expr()->accept( *this );
    823812                output << ";";
    824813        }
  • src/CodeGen/CodeGenerator.h

    raf08051 r28e58fd  
    7474                virtual void visit( CommaExpr *commaExpr );
    7575                virtual void visit( CompoundLiteralExpr *compLitExpr );
     76                virtual void visit( UniqueExpr * );
     77                virtual void visit( TupleAssignExpr * tupleExpr );
    7678                virtual void visit( UntypedTupleExpr *tupleExpr );
    7779                virtual void visit( TupleExpr *tupleExpr );
  • src/CodeGen/GenType.cc

    raf08051 r28e58fd  
    3737                virtual void visit( PointerType *pointerType );
    3838                virtual void visit( ArrayType *arrayType );
     39                virtual void visit( ReferenceType *refType );
    3940                virtual void visit( StructInstType *structInst );
    4041                virtual void visit( UnionInstType *unionInst );
     
    145146        void GenType::visit( ArrayType *arrayType ) {
    146147                genArray( arrayType->get_qualifiers(), arrayType->get_base(), arrayType->get_dimension(), arrayType->get_isVarLen(), arrayType->get_isStatic() );
     148        }
     149
     150        void GenType::visit( ReferenceType *refType ) {
     151                assert( refType->get_base() != 0);
     152                assertf( ! genC, "Reference types should not reach code generation." );
     153                handleQualifiers( refType );
     154                typeString = "&" + typeString;
     155                refType->get_base()->accept( *this );
    147156        }
    148157
     
    278287                        typeString = "_Atomic " + typeString;
    279288                } // if
     289                if ( type->get_lvalue() && ! genC ) {
     290                        // when not generating C code, print lvalue for debugging.
     291                        typeString = "lvalue " + typeString;
     292                }
    280293        }
    281294} // namespace CodeGen
  • src/CodeGen/OperatorTable.cc

    raf08051 r28e58fd  
    1414//
    1515
    16 #include <map>      // for map, _Rb_tree_const_iterator, map<>::const_iterator
    17 #include <utility>  // for pair
     16#include <algorithm>  // for any_of
     17#include <map>        // for map, _Rb_tree_const_iterator, map<>::const_iterator
     18#include <utility>    // for pair
    1819
    1920#include "OperatorTable.h"
     
    9394                } // if
    9495        }
     96
     97        /// determines if a given function name is one of the operator types between [begin, end)
     98        template<typename Iterator>
     99        bool isOperatorType( const std::string & funcName, Iterator begin, Iterator end ) {
     100                OperatorInfo info;
     101                if ( operatorLookup( funcName, info ) ) {
     102                        return std::find( begin, end, info.type ) != end;
     103                }
     104                return false;
     105        }
     106
     107        bool isConstructor( const std::string & funcName ) {
     108                static OperatorType types[] = { OT_CTOR };
     109                return isOperatorType( funcName, std::begin(types), std::end(types) );
     110        }
     111
     112        bool isDestructor( const std::string & funcName ) {
     113                static OperatorType types[] = { OT_DTOR };
     114                return isOperatorType( funcName, std::begin(types), std::end(types) );
     115        }
     116
     117        bool isAssignment( const std::string & funcName ) {
     118                static OperatorType types[] = { OT_PREFIXASSIGN, OT_POSTFIXASSIGN, OT_INFIXASSIGN };
     119                return isOperatorType( funcName, std::begin(types), std::end(types) );
     120        }
     121
     122        bool isCtorDtor( const std::string & funcName ) {
     123                static OperatorType types[] = { OT_CTOR, OT_DTOR };
     124                return isOperatorType( funcName, std::begin(types), std::end(types) );
     125        }
     126
     127        bool isCtorDtorAssign( const std::string & funcName ) {
     128                static OperatorType types[] = { OT_CTOR, OT_DTOR, OT_PREFIXASSIGN, OT_POSTFIXASSIGN, OT_INFIXASSIGN };
     129                return isOperatorType( funcName, std::begin(types), std::end(types) );
     130        }
    95131} // namespace CodeGen
    96132
  • src/CodeGen/OperatorTable.h

    raf08051 r28e58fd  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // OperatorTable.h -- 
     7// OperatorTable.h --
    88//
    99// Author           : Richard C. Bilson
     
    4242
    4343        bool operatorLookup( std::string funcName, OperatorInfo &info );
     44
     45        bool isConstructor( const std::string & );
     46        bool isDestructor( const std::string & );
     47        bool isAssignment( const std::string & );
     48        bool isCtorDtor( const std::string & );
     49        bool isCtorDtorAssign( const std::string & );
    4450} // namespace CodeGen
    4551
  • src/Common/PassVisitor.h

    raf08051 r28e58fd  
    116116        virtual void visit( PointerType *pointerType ) override final;
    117117        virtual void visit( ArrayType *arrayType ) override final;
     118        virtual void visit( ReferenceType *referenceType ) override final;
    118119        virtual void visit( FunctionType *functionType ) override final;
    119120        virtual void visit( StructInstType *aggregateUseType ) override final;
     
    202203        virtual Type* mutate( PointerType *pointerType ) override final;
    203204        virtual Type* mutate( ArrayType *arrayType ) override final;
     205        virtual Type* mutate( ReferenceType *referenceType ) override final;
    204206        virtual Type* mutate( FunctionType *functionType ) override final;
    205207        virtual Type* mutate( StructInstType *aggregateUseType ) override final;
  • src/Common/PassVisitor.impl.h

    raf08051 r28e58fd  
    792792
    793793template< typename pass_type >
     794void PassVisitor< pass_type >::visit( ReferenceType * node ) {
     795        VISIT_BODY( node );
     796}
     797
     798template< typename pass_type >
    794799void PassVisitor< pass_type >::visit( FunctionType * node ) {
    795800        VISIT_BODY( node );
     
    11291134
    11301135template< typename pass_type >
     1136Type * PassVisitor< pass_type >::mutate( ReferenceType * node ) {
     1137        MUTATE_BODY( Type, node );
     1138}
     1139
     1140template< typename pass_type >
    11311141Type * PassVisitor< pass_type >::mutate( FunctionType * node ) {
    11321142        MUTATE_BODY( Type, node );
  • src/Common/utility.h

    raf08051 r28e58fd  
    310310template< typename T1, typename T2 >
    311311struct group_iterate_t {
    312         group_iterate_t( const T1 & v1, const T2 & v2 ) : args(v1, v2) {
    313                 assertf(v1.size() == v2.size(), "group iteration requires containers of the same size.");
     312        group_iterate_t( bool skipBoundsCheck, const T1 & v1, const T2 & v2 ) : args(v1, v2) {
     313                assertf(skipBoundsCheck || v1.size() == v2.size(), "group iteration requires containers of the same size: <%zd, %zd>.", v1.size(), v2.size());
    314314        };
    315315
     
    336336};
    337337
     338/// performs bounds check to ensure that all arguments are of the same length.
    338339template< typename... Args >
    339340group_iterate_t<Args...> group_iterate( Args &&... args ) {
    340         return group_iterate_t<Args...>(std::forward<Args>( args )...);
     341        return group_iterate_t<Args...>(false, std::forward<Args>( args )...);
     342}
     343
     344/// does not perform a bounds check - requires user to ensure that iteration terminates when appropriate.
     345template< typename... Args >
     346group_iterate_t<Args...> unsafe_group_iterate( Args &&... args ) {
     347        return group_iterate_t<Args...>(true, std::forward<Args>( args )...);
    341348}
    342349
  • src/Concurrency/Keywords.cc

    raf08051 r28e58fd  
    2121#include "Common/SemanticError.h"  // for SemanticError
    2222#include "Common/utility.h"        // for deleteAll, map_range
    23 #include "InitTweak/InitTweak.h"   // for isConstructor
     23#include "CodeGen/OperatorTable.h" // for isConstructor
     24#include "InitTweak/InitTweak.h"   // for getPointerBase
    2425#include "Parser/LinkageSpec.h"    // for Cforall
    2526#include "SymTab/AddVisit.h"       // for acceptAndAdd
     
    289290                        LinkageSpec::Cforall,
    290291                        nullptr,
    291                         new PointerType(
     292                        new ReferenceType(
    292293                                noQualifiers,
    293294                                new StructInstType(
     
    445446
    446447                //Makes sure it's not a copy
    447                 PointerType* pty = dynamic_cast< PointerType * >( ty );
    448                 if( ! pty ) throw SemanticError( "Mutex argument must be of pointer/reference type ", arg );
     448                ReferenceType* rty = dynamic_cast< ReferenceType * >( ty );
     449                if( ! rty ) throw SemanticError( "Mutex argument must be of reference type ", arg );
    449450
    450451                //Make sure the we are pointing directly to a type
    451                 Type* base = pty->get_base();
    452                 if(  dynamic_cast< PointerType * >( base ) ) throw SemanticError( "Mutex argument have exactly one level of indirection ", arg );
     452                Type* base = rty->get_base();
     453                if( dynamic_cast< ReferenceType * >( base ) ) throw SemanticError( "Mutex argument have exactly one level of indirection ", arg );
     454                if( dynamic_cast< PointerType * >( base ) ) throw SemanticError( "Mutex argument have exactly one level of indirection ", arg );
    453455
    454456                //Make sure that typed isn't mutex
     
    520522                Visitor::visit(decl);
    521523
    522                 if( ! InitTweak::isConstructor(decl->get_name()) ) return;
     524                if( ! CodeGen::isConstructor(decl->get_name()) ) return;
    523525
    524526                DeclarationWithType * param = decl->get_functionType()->get_parameters().front();
    525                 auto ptr = dynamic_cast< PointerType * >( param->get_type() );
    526                 // if( ptr ) std::cerr << "FRED1" << std::endl;
    527                 auto type  = dynamic_cast< StructInstType * >( ptr->get_base() );
     527                auto type  = dynamic_cast< StructInstType * >( InitTweak::getPointerBase( param->get_type() ) );
    528528                // if( type ) std::cerr << "FRED2" << std::endl;
    529529                if( type && type->get_baseStruct()->is_thread() ) {
  • src/GenPoly/Box.cc

    raf08051 r28e58fd  
    2525
    2626#include "Box.h"
     27
     28#include "CodeGen/OperatorTable.h"
    2729#include "Common/ScopedMap.h"            // for ScopedMap, ScopedMap<>::iter...
    2830#include "Common/SemanticError.h"        // for SemanticError
     
    564566                        // To compound the issue, the right side can be *x, etc. because of lvalue-returning functions
    565567                        if ( UntypedExpr * assign = dynamic_cast< UntypedExpr * >( commaExpr->get_arg1() ) ) {
    566                                 if ( InitTweak::isAssignment( InitTweak::getFunctionName( assign ) ) ) {
     568                                if ( CodeGen::isAssignment( InitTweak::getFunctionName( assign ) ) ) {
    567569                                        assert( assign->get_args().size() == 2 );
    568570                                        if ( ApplicationExpr * appExpr = dynamic_cast< ApplicationExpr * > ( assign->get_args().back() ) ) {
     
    604606                                                }
    605607                                        } else {
    606                                                 throw SemanticError( "Cannot pass non-struct type for generic struct" );
     608                                                throw SemanticError( "Cannot pass non-struct type for generic struct: ", argBaseType );
    607609                                        }
    608610                                }
     
    10191021                                                } // if
    10201022                                                if ( baseType1 || baseType2 ) {
     1023                                                        delete ret->get_result();
    10211024                                                        ret->set_result( appExpr->get_result()->clone() );
    10221025                                                        if ( appExpr->get_env() ) {
     
    10321035                                                assert( ! appExpr->get_args().empty() );
    10331036                                                if ( isPolyType( appExpr->get_result(), scopeTyVars, env ) ) {
     1037                                                        // remove dereference from polymorphic types since they are boxed.
    10341038                                                        Expression *ret = appExpr->get_args().front();
     1039                                                        // fix expr type to remove pointer
    10351040                                                        delete ret->get_result();
    10361041                                                        ret->set_result( appExpr->get_result()->clone() );
     
    11221127
    11231128                        assert( appExpr->get_function()->has_result() );
    1124                         PointerType *pointer = safe_dynamic_cast< PointerType *>( appExpr->get_function()->get_result() );
    1125                         FunctionType *function = safe_dynamic_cast< FunctionType *>( pointer->get_base() );
     1129                        FunctionType * function = getFunctionType( appExpr->get_function()->get_result() );
     1130                        assertf( function, "ApplicationExpr has non-function type: %s", toString( appExpr->get_function()->get_result() ).c_str() );
    11261131
    11271132                        if ( Expression *newExpr = handleIntrinsics( appExpr ) ) {
     
    12001205                                                        if ( ApplicationExpr * appExpr = dynamic_cast< ApplicationExpr * >( expr->get_args().front() ) ) {
    12011206                                                                assert( appExpr->get_function()->has_result() );
    1202                                                                 PointerType *pointer = safe_dynamic_cast< PointerType *>( appExpr->get_function()->get_result() );
    1203                                                                 FunctionType *function = safe_dynamic_cast< FunctionType *>( pointer->get_base() );
     1207                                                                FunctionType *function = getFunctionType( appExpr->get_function()->get_result() );
     1208                                                                assert( function );
    12041209                                                                needs = needsAdapter( function, scopeTyVars );
    12051210                                                        } // if
     
    12101215                        // isPolyType check needs to happen before mutating addrExpr arg, so pull it forward
    12111216                        // out of the if condition.
     1217                        addrExpr->set_arg( mutateExpression( addrExpr->get_arg() ) );
     1218                        // ... but must happen after mutate, since argument might change (e.g. intrinsic *?, ?[?]) - re-evaluate above comment
    12121219                        bool polytype = isPolyType( addrExpr->get_arg()->get_result(), scopeTyVars, env );
    1213                         addrExpr->set_arg( mutateExpression( addrExpr->get_arg() ) );
    12141220                        if ( polytype || needs ) {
    12151221                                Expression *ret = addrExpr->get_arg();
     
    12781284                                if ( adaptersDone.find( mangleName ) == adaptersDone.end() ) {
    12791285                                        std::string adapterName = makeAdapterName( mangleName );
    1280                                         paramList.push_front( new ObjectDecl( adapterName, Type::StorageClasses(), LinkageSpec::C, 0, new PointerType( Type::Qualifiers(), makeAdapterType( *funType, scopeTyVars ) ), 0 ) );
     1286                                        // adapter may not be used in body, pass along with unused attribute.
     1287                                        paramList.push_front( new ObjectDecl( adapterName, Type::StorageClasses(), LinkageSpec::C, 0, new PointerType( Type::Qualifiers(), makeAdapterType( *funType, scopeTyVars ) ), 0, { new Attribute( "unused" ) } ) );
    12811288                                        adaptersDone.insert( adaptersDone.begin(), mangleName );
    12821289                                }
     
    13841391                        std::list< DeclarationWithType *>::iterator last = funcType->get_parameters().begin();
    13851392                        std::list< DeclarationWithType *> inferredParams;
    1386                         ObjectDecl newObj( "", Type::StorageClasses(), LinkageSpec::C, 0, new BasicType( Type::Qualifiers(), BasicType::LongUnsignedInt ), 0 );
     1393                        // size/align/offset parameters may not be used in body, pass along with unused attribute.
     1394                        ObjectDecl newObj( "", Type::StorageClasses(), LinkageSpec::C, 0, new BasicType( Type::Qualifiers(), BasicType::LongUnsignedInt ), 0,
     1395                                           { new Attribute( "unused" ) } );
    13871396                        ObjectDecl newPtr( "", Type::StorageClasses(), LinkageSpec::C, 0,
    13881397                                           new PointerType( Type::Qualifiers(), new BasicType( Type::Qualifiers(), BasicType::LongUnsignedInt ) ), 0 );
     
    14071416                                for ( std::list< DeclarationWithType *>::iterator assert = (*tyParm)->get_assertions().begin(); assert != (*tyParm)->get_assertions().end(); ++assert ) {
    14081417//      *assert = (*assert)->acceptMutator( *this );
     1418                                        // assertion parameters may not be used in body, pass along with unused attribute.
     1419                                        (*assert)->get_attributes().push_back( new Attribute( "unused" ) );
    14091420                                        inferredParams.push_back( *assert );
    14101421                                }
  • src/GenPoly/InstantiateGeneric.cc

    raf08051 r28e58fd  
    162162                /// Should not make use of type environment to replace types of function parameter and return values.
    163163                bool inFunctionType = false;
     164                /// Index of current member, used to recreate MemberExprs with the member from an instantiation
     165                int memberIndex = -1;
    164166                GenericInstantiator() : instantiations(), dtypeStatics(), typeNamer("_conc_") {}
    165167
     
    167169                Type* postmutate( UnionInstType *inst );
    168170
    169                 void premutate( __attribute__((unused)) FunctionType * ftype ) {
     171                // fix MemberExprs to use the member from the instantiation
     172                void premutate( MemberExpr * memberExpr );
     173                Expression * postmutate( MemberExpr * memberExpr );
     174
     175                void premutate( FunctionType * ) {
    170176                        GuardValue( inFunctionType );
    171177                        inFunctionType = true;
     
    414420        }
    415421
     422        namespace {
     423                bool isGenericType( Type * t ) {
     424                        if ( StructInstType * inst = dynamic_cast< StructInstType * >( t ) ) {
     425                                return ! inst->parameters.empty();
     426                        } else if ( UnionInstType * inst = dynamic_cast< UnionInstType * >( t ) ) {
     427                                return ! inst->parameters.empty();
     428                        }
     429                        return false;
     430                }
     431
     432                AggregateDecl * getAggr( Type * t ) {
     433                        if ( StructInstType * inst = dynamic_cast< StructInstType * >( t ) ) {
     434                                return inst->baseStruct;
     435                        } else if ( UnionInstType * inst = dynamic_cast< UnionInstType * >( t ) ) {
     436                                return inst->baseUnion;
     437                        }
     438                        assertf( false, "Non-aggregate type: %s", toString( t ).c_str() );
     439                }
     440        }
     441
     442        void GenericInstantiator::premutate( MemberExpr * memberExpr ) {
     443                GuardValue( memberIndex );
     444                memberIndex = -1;
     445                if ( isGenericType( memberExpr->aggregate->result ) ) {
     446                        // find the location of the member
     447                        AggregateDecl * aggr = getAggr( memberExpr->aggregate->result );
     448                        std::list< Declaration * > & members = aggr->members;
     449                        memberIndex = std::distance( members.begin(), std::find( members.begin(), members.end(), memberExpr->member ) );
     450                        assertf( memberIndex < (int)members.size(), "Could not find member %s in generic type %s", toString( memberExpr->member ).c_str(), toString( memberExpr->aggregate ).c_str() );
     451                }
     452        }
     453
     454        Expression * GenericInstantiator::postmutate( MemberExpr * memberExpr ) {
     455                if ( memberIndex != -1 ) {
     456                        // using the location from the generic type, find the member in the instantiation and rebuild the member expression
     457                        AggregateDecl * aggr = getAggr( memberExpr->aggregate->result );
     458                        assertf( memberIndex < (int)aggr->members.size(), "Instantiation somehow has fewer members than the generic type." );
     459                        Declaration * member = *std::next( aggr->members.begin(), memberIndex );
     460                        assertf( member->name == memberExpr->member->name, "Instantiation has different member order than the generic type. %s / %s", toString( member ).c_str(), toString( memberExpr->member ).c_str() );
     461                        DeclarationWithType * field = safe_dynamic_cast< DeclarationWithType * >( member );
     462                        MemberExpr * ret = new MemberExpr( field, memberExpr->aggregate->clone() );
     463                        std::swap( ret->env, memberExpr->env );
     464                        delete memberExpr;
     465                        return ret;
     466                }
     467                return memberExpr;
     468        }
     469
    416470        void GenericInstantiator::beginScope() {
    417471                instantiations.beginScope();
  • src/GenPoly/Lvalue.cc

    raf08051 r28e58fd  
    1717#include <string>                        // for string
    1818
     19#include "Common/PassVisitor.h"
    1920#include "Common/SemanticError.h"        // for SemanticError
    2021#include "GenPoly.h"                     // for isPolyType
    2122#include "Lvalue.h"
     23
    2224#include "Parser/LinkageSpec.h"          // for Spec, isBuiltin, Intrinsic
    2325#include "ResolvExpr/TypeEnvironment.h"  // for AssertionSet, OpenVarSet
    2426#include "ResolvExpr/Unify.h"            // for unify
     27#include "ResolvExpr/typeops.h"
     28#include "SymTab/Autogen.h"
    2529#include "SymTab/Indexer.h"              // for Indexer
    2630#include "SynTree/Declaration.h"         // for Declaration, FunctionDecl
     
    3135#include "SynTree/Visitor.h"             // for Visitor, acceptAll
    3236
     37#if 0
     38#define PRINT(x) x
     39#else
     40#define PRINT(x)
     41#endif
     42
    3343namespace GenPoly {
    3444        namespace {
    35                 /// Replace uses of lvalue returns with appropriate pointers
    36                 class Pass1 : public Mutator {
    37                   public:
    38                         Pass1();
    39 
    40                         virtual Expression *mutate( ApplicationExpr *appExpr );
    41                         virtual Statement *mutate( ReturnStmt *appExpr );
    42                         virtual DeclarationWithType *mutate( FunctionDecl *funDecl );
    43                   private:
    44                         DeclarationWithType* retval;
    45                 };
    46 
    47                 /// Replace declarations of lvalue returns with appropriate pointers
    48                 class Pass2 : public Visitor {
    49                   public:
    50                         virtual void visit( FunctionType *funType );
    51                   private:
     45                // TODO: fold this into the general createDeref function??
     46                Expression * mkDeref( Expression * arg ) {
     47                        if ( SymTab::dereferenceOperator ) {
     48                                VariableExpr * deref = new VariableExpr( SymTab::dereferenceOperator );
     49                                deref->set_result( new PointerType( Type::Qualifiers(), deref->get_result() ) );
     50                                Type * base = InitTweak::getPointerBase( arg->get_result() );
     51                                assertf( base, "expected pointer type in dereference (type was %s)", toString( arg->get_result() ).c_str() );
     52                                ApplicationExpr * ret = new ApplicationExpr( deref, { arg } );
     53                                delete ret->get_result();
     54                                ret->set_result( base->clone() );
     55                                ret->get_result()->set_lvalue( true );
     56                                return ret;
     57                        } else {
     58                                return UntypedExpr::createDeref( arg );
     59                        }
     60                }
     61
     62                struct ReferenceConversions final {
     63                        Expression * postmutate( CastExpr * castExpr );
     64                        Expression * postmutate( AddressExpr * addrExpr );
     65                };
     66
     67                /// Intrinsic functions that take reference parameters don't REALLY take reference parameters -- their reference arguments must always be implicitly dereferenced.
     68                struct FixIntrinsicArgs final {
     69                        Expression * postmutate( ApplicationExpr * appExpr );
     70                };
     71
     72                struct FixIntrinsicResult final : public WithGuards {
     73                        Expression * postmutate( ApplicationExpr * appExpr );
     74                        void premutate( FunctionDecl * funcDecl );
     75                        bool inIntrinsic = false;
     76                };
     77
     78                /// Replace reference types with pointer types
     79                struct ReferenceTypeElimination final {
     80                        Type * postmutate( ReferenceType * refType );
    5281                };
    5382
     
    5584                /// https://gcc.gnu.org/onlinedocs/gcc-3.4.6/gcc/Lvalues.html#Lvalues
    5685                /// Replaces &(a,b) with (a, &b), &(a ? b : c) with (a ? &b : &c)
    57                 class GeneralizedLvalue : public Mutator {
    58                         typedef Mutator Parent;
    59 
    60                         virtual Expression * mutate( MemberExpr * memExpr );
    61                         virtual Expression * mutate( AddressExpr * addressExpr );
     86                struct GeneralizedLvalue final : public WithVisitorRef<GeneralizedLvalue> {
     87                        Expression * postmutate( AddressExpr * addressExpr );
     88                        Expression * postmutate( MemberExpr * memExpr );
    6289
    6390                        template<typename Func>
    6491                        Expression * applyTransformation( Expression * expr, Expression * arg, Func mkExpr );
    6592                };
     93
     94                /// Removes redundant &*/*& pattern that this pass can generate
     95                struct CollapseAddrDeref final {
     96                        Expression * postmutate( AddressExpr * addressExpr );
     97                        Expression * postmutate( ApplicationExpr * appExpr );
     98                };
     99
     100                struct AddrRef final : public WithGuards {
     101                        void premutate( AddressExpr * addrExpr );
     102                        Expression * postmutate( AddressExpr * addrExpr );
     103                        void premutate( Expression * expr );
     104
     105                        bool first = true;
     106                        bool current = false;
     107                        int refDepth = 0;
     108                };
    66109        } // namespace
    67110
     111        static bool referencesEliminated = false;
     112        // used by UntypedExpr::createDeref to determine whether result type of dereference should be ReferenceType or value type.
     113        bool referencesPermissable() {
     114                return ! referencesEliminated;
     115        }
     116
    68117        void convertLvalue( std::list< Declaration* >& translationUnit ) {
    69                 Pass1 p1;
    70                 Pass2 p2;
    71                 GeneralizedLvalue genLval;
    72                 mutateAll( translationUnit, p1 );
    73                 acceptAll( translationUnit, p2 );
     118                PassVisitor<ReferenceConversions> refCvt;
     119                PassVisitor<ReferenceTypeElimination> elim;
     120                PassVisitor<GeneralizedLvalue> genLval;
     121                PassVisitor<FixIntrinsicArgs> fixer;
     122                PassVisitor<CollapseAddrDeref> collapser;
     123                PassVisitor<AddrRef> addrRef;
     124                PassVisitor<FixIntrinsicResult> intrinsicResults;
     125                mutateAll( translationUnit, intrinsicResults );
     126                mutateAll( translationUnit, addrRef );
     127                mutateAll( translationUnit, refCvt );
     128                mutateAll( translationUnit, fixer );
     129                mutateAll( translationUnit, collapser );
    74130                mutateAll( translationUnit, genLval );
     131                mutateAll( translationUnit, elim );  // last because other passes need reference types to work
     132
     133                // from this point forward, no other pass should create reference types.
     134                referencesEliminated = true;
    75135        }
    76136
    77137        Expression * generalizedLvalue( Expression * expr ) {
    78                 GeneralizedLvalue genLval;
     138                PassVisitor<GeneralizedLvalue> genLval;
    79139                return expr->acceptMutator( genLval );
    80140        }
    81141
    82142        namespace {
    83                 Type* isLvalueRet( FunctionType *function ) {
    84                         if ( function->get_returnVals().empty() ) return 0;
    85                         Type *ty = function->get_returnVals().front()->get_type();
    86                         return ty->get_lvalue() ? ty : 0;
    87                 }
    88 
    89                 bool isIntrinsicApp( ApplicationExpr *appExpr ) {
    90                         if ( VariableExpr *varExpr = dynamic_cast< VariableExpr* >( appExpr->get_function() ) ) {
    91                                 return varExpr->get_var()->get_linkage() == LinkageSpec::Intrinsic;
    92                         } else {
    93                                 return false;
    94                         } // if
    95                 }
    96 
    97                 Pass1::Pass1() {
    98                 }
    99 
    100                 DeclarationWithType * Pass1::mutate( FunctionDecl *funcDecl ) {
    101                         if ( funcDecl->get_statements() ) {
    102                                 DeclarationWithType* oldRetval = retval;
    103                                 retval = 0;
    104                                 if ( ! LinkageSpec::isBuiltin( funcDecl->get_linkage() ) && isLvalueRet( funcDecl->get_functionType() ) ) {
    105                                         retval = funcDecl->get_functionType()->get_returnVals().front();
    106                                 }
    107                                 // fix expressions and return statements in this function
    108                                 funcDecl->set_statements( funcDecl->get_statements()->acceptMutator( *this ) );
    109                                 retval = oldRetval;
    110                         } // if
    111                         return funcDecl;
    112                 }
    113 
    114                 Expression * Pass1::mutate( ApplicationExpr *appExpr ) {
    115                         appExpr->get_function()->acceptMutator( *this );
    116                         mutateAll( appExpr->get_args(), *this );
    117 
    118                         PointerType *pointer = safe_dynamic_cast< PointerType* >( appExpr->get_function()->get_result() );
    119                         FunctionType *function = safe_dynamic_cast< FunctionType* >( pointer->get_base() );
    120 
    121                         Type *funType = isLvalueRet( function );
    122                         if ( funType && ! isIntrinsicApp( appExpr ) ) {
    123                                 Expression *expr = appExpr;
    124                                 Type *appType = appExpr->get_result();
    125                                 if ( isPolyType( funType ) && ! isPolyType( appType ) ) {
    126                                         // make sure cast for polymorphic type is inside dereference
    127                                         expr = new CastExpr( appExpr, new PointerType( Type::Qualifiers(), appType->clone() ) );
    128                                 }
    129                                 UntypedExpr *deref = new UntypedExpr( new NameExpr( "*?" ) );
    130                                 deref->set_result( appType->clone() );
    131                                 appExpr->set_result( new PointerType( Type::Qualifiers(), appType ) );
    132                                 deref->get_args().push_back( expr );
    133                                 return deref;
    134                         } else {
    135                                 return appExpr;
    136                         } // if
    137                 }
    138 
    139                 Statement * Pass1::mutate(ReturnStmt *retStmt) {
    140                         if ( retval && retStmt->get_expr() ) {
    141                                 if ( retStmt->get_expr()->get_result()->get_lvalue() ) {
    142                                         // ***** Code Removal ***** because casts may be stripped already
    143 
    144                                         // strip casts because not allowed to take address of cast
    145                                         // while ( CastExpr *castExpr = dynamic_cast< CastExpr* >( retStmt->get_expr() ) ) {
    146                                         //      retStmt->set_expr( castExpr->get_arg() );
    147                                         //      retStmt->get_expr()->set_env( castExpr->get_env() );
    148                                         //      castExpr->set_env( 0 );
    149                                         //      castExpr->set_arg( 0 );
    150                                         //      delete castExpr;
    151                                         // } // while
    152                                         retStmt->set_expr( new AddressExpr( retStmt->get_expr()->acceptMutator( *this ) ) );
     143                // true for intrinsic function calls that return a reference
     144                bool isIntrinsicReference( Expression * expr ) {
     145                        if ( UntypedExpr * untyped = dynamic_cast< UntypedExpr * >( expr ) ) {
     146                                std::string fname = InitTweak::getFunctionName( untyped );
     147                                // known intrinsic-reference prelude functions
     148                                return fname == "*?" || fname == "?[?]";
     149                        } else if ( ApplicationExpr * appExpr = dynamic_cast< ApplicationExpr * > ( expr ) ) {
     150                                if ( DeclarationWithType * func = InitTweak::getFunction( appExpr ) ) {
     151                                        // use type of return variable rather than expr result type, since it may have been changed to a pointer type
     152                                        FunctionType * ftype = GenPoly::getFunctionType( func->get_type() );
     153                                        Type * ret = ftype->get_returnVals().empty() ? nullptr : ftype->get_returnVals().front()->get_type();
     154                                        return func->get_linkage() == LinkageSpec::Intrinsic && dynamic_cast<ReferenceType *>( ret );
     155                                }
     156                        }
     157                        return false;
     158                }
     159
     160                Expression * FixIntrinsicResult::postmutate( ApplicationExpr * appExpr ) {
     161                        if ( isIntrinsicReference( appExpr ) ) {
     162                                // eliminate reference types from intrinsic applications - now they return lvalues
     163                                Type * result = appExpr->get_result();
     164                                appExpr->set_result( result->stripReferences()->clone() );
     165                                appExpr->get_result()->set_lvalue( true );
     166                                if ( ! inIntrinsic ) {
     167                                        // when not in an intrinsic function, add a cast to
     168                                        // don't add cast when in an intrinsic function, since they already have the cast
     169                                        Expression * ret = new CastExpr( appExpr, result );
     170                                        ret->set_env( appExpr->get_env() );
     171                                        appExpr->set_env( nullptr );
     172                                        return ret;
     173                                }
     174                                delete result;
     175                        }
     176                        return appExpr;
     177                }
     178
     179                void FixIntrinsicResult::premutate( FunctionDecl * funcDecl ) {
     180                        GuardValue( inIntrinsic );
     181                        inIntrinsic =  funcDecl->linkage == LinkageSpec::Intrinsic;
     182                }
     183
     184                Expression * FixIntrinsicArgs::postmutate( ApplicationExpr * appExpr ) {
     185                        // intrinsic functions don't really take reference-typed parameters, so they require an implicit dereference on their arguments.
     186                        if ( DeclarationWithType * function = InitTweak::getFunction( appExpr ) ) {
     187                                FunctionType * ftype = GenPoly::getFunctionType( function->get_type() );
     188                                assertf( ftype, "Function declaration does not have function type." );
     189                                // can be of differing lengths only when function is variadic
     190                                assertf( ftype->get_parameters().size() == appExpr->get_args().size() || ftype->get_isVarArgs(), "ApplicationExpr args do not match formal parameter type." );
     191
     192
     193                                unsigned int i = 0;
     194                                const unsigned int end = ftype->get_parameters().size();
     195                                for ( auto p : unsafe_group_iterate( appExpr->get_args(), ftype->get_parameters() ) ) {
     196                                        if (i == end) break;
     197                                        Expression *& arg = std::get<0>( p );
     198                                        Type * formal = std::get<1>( p )->get_type();
     199                                        PRINT(
     200                                                std::cerr << "pair<0>: " << arg << std::endl;
     201                                                std::cerr << "pair<1>: " << formal << std::endl;
     202                                        )
     203                                        if ( dynamic_cast<ReferenceType*>( formal ) ) {
     204                                                if ( isIntrinsicReference( arg ) ) { // do not combine conditions, because that changes the meaning of the else if
     205                                                        if ( function->get_linkage() != LinkageSpec::Intrinsic ) { // intrinsic functions that turn pointers into references
     206                                                                // if argument is dereference or array subscript, the result isn't REALLY a reference, so it's not necessary to fix the argument
     207                                                                PRINT(
     208                                                                        std::cerr << "===is intrinsic arg in non-intrinsic call - adding address" << std::endl;
     209                                                                )
     210                                                                arg = new AddressExpr( arg );
     211                                                        }
     212                                                } else if ( function->get_linkage() == LinkageSpec::Intrinsic ) {
     213                                                        // std::cerr << "===adding deref to arg" << std::endl;
     214                                                        // if the parameter is a reference, add a dereference to the reference-typed argument.
     215                                                        Type * baseType = InitTweak::getPointerBase( arg->get_result() );
     216                                                        assertf( baseType, "parameter is reference, arg must be pointer or reference: %s", toString( arg->get_result() ).c_str() );
     217                                                        PointerType * ptrType = new PointerType( Type::Qualifiers(), baseType->clone() );
     218                                                        delete arg->get_result();
     219                                                        arg->set_result( ptrType );
     220                                                        arg = mkDeref( arg );
     221                                                }
     222                                        }
     223                                        ++i;
     224                                }
     225                        }
     226                        return appExpr;
     227                }
     228
     229                // idea: &&&E: get outer &, inner &
     230                // at inner &, record depth D of reference type
     231                // at outer &, add D derefs.
     232                void AddrRef::premutate( Expression * ) {
     233                        GuardValue( current );
     234                        GuardValue( first );
     235                        current = false;
     236                        first = true;
     237                }
     238
     239                void AddrRef::premutate( AddressExpr * ) {
     240                        GuardValue( current );
     241                        GuardValue( first );
     242                        current = first;
     243                        first = false;
     244                        if ( current ) {
     245                                GuardValue( refDepth );
     246                                refDepth = 0;
     247                        }
     248                }
     249
     250                Expression * AddrRef::postmutate( AddressExpr * addrExpr ) {
     251                        if ( refDepth == 0 ) {
     252                                if ( ! isIntrinsicReference( addrExpr->get_arg() ) ) {
     253                                        // try to avoid ?[?]
     254                                        refDepth = addrExpr->get_arg()->get_result()->referenceDepth();
     255                                }
     256                        }
     257                        if ( current ) {
     258                                Expression * ret = addrExpr;
     259                                while ( refDepth ) {
     260                                        ret = mkDeref( ret );
     261                                        refDepth--;
     262                                }
     263                                return ret;
     264                        }
     265                        return addrExpr;
     266                }
     267
     268                Expression * ReferenceConversions::postmutate( AddressExpr * addrExpr ) {
     269                        // Inner expression may have been lvalue to reference conversion, which becomes an address expression.
     270                        // In this case, remove the outer address expression and return the argument.
     271                        // TODO: It's possible that this might catch too much and require a more sophisticated check.
     272                        return addrExpr;
     273                }
     274
     275                Expression * ReferenceConversions::postmutate( CastExpr * castExpr ) {
     276                        // xxx - is it possible to convert directly between reference types with a different base? E.g.,
     277                        //   int x;
     278                        //   (double&)x;
     279                        // At the moment, I am working off of the assumption that this is illegal, thus the cast becomes redundant
     280                        // after this pass, so trash the cast altogether. If that changes, care must be taken to insert the correct
     281                        // pointer casts in the right places.
     282
     283                        // conversion to reference type
     284                        if ( ReferenceType * refType = dynamic_cast< ReferenceType * >( castExpr->get_result() ) ) {
     285                                (void)refType;
     286                                if ( ReferenceType * otherRef = dynamic_cast< ReferenceType * >( castExpr->get_arg()->get_result() ) ) {
     287                                        // nothing to do if casting from reference to reference.
     288                                        (void)otherRef;
     289                                        PRINT( std::cerr << "convert reference to reference -- nop" << std::endl; )
     290                                        if ( isIntrinsicReference( castExpr->get_arg() ) ) {
     291                                                Expression * callExpr = castExpr->get_arg();
     292                                                PRINT(
     293                                                        std::cerr << "but arg is deref -- &" << std::endl;
     294                                                        std::cerr << callExpr << std::endl;
     295                                                )
     296                                                callExpr = new AddressExpr( callExpr ); // this doesn't work properly for multiple casts
     297                                                delete callExpr->get_result();
     298                                                callExpr->set_result( refType->clone() );
     299                                                // move environment out to new top-level
     300                                                callExpr->set_env( castExpr->get_env() );
     301                                                castExpr->set_arg( nullptr );
     302                                                castExpr->set_env( nullptr );
     303                                                delete castExpr;
     304                                                return callExpr;
     305                                        }
     306                                        int depth1 = refType->referenceDepth();
     307                                        int depth2 = otherRef->referenceDepth();
     308                                        int diff = depth1-depth2;
     309                                        if ( diff == 0 ) {
     310                                                assertf( depth1 == depth2, "non-intrinsic reference with cast of reference to reference not yet supported: %d %d %s", depth1, depth2, toString( castExpr ).c_str() );
     311                                                PRINT( std::cerr << castExpr << std::endl; )
     312                                                return castExpr;
     313                                        } else if ( diff < 0 ) {
     314                                                Expression * ret = castExpr->get_arg();
     315                                                for ( int i = 0; i < diff; ++i ) {
     316                                                        ret = mkDeref( ret );
     317                                                }
     318                                                ret->set_env( castExpr->get_env() );
     319                                                delete ret->get_result();
     320                                                ret->set_result( castExpr->get_result() );
     321                                                castExpr->set_env( nullptr );
     322                                                castExpr->set_arg( nullptr );
     323                                                castExpr->set_result( nullptr );
     324                                                delete castExpr;
     325                                                return ret;
     326                                        } else if ( diff > 0 ) {
     327                                                Expression * ret = castExpr->get_arg();
     328                                                for ( int i = 0; i < diff; ++i ) {
     329                                                        ret = new AddressExpr( ret );
     330                                                }
     331                                                ret->set_env( castExpr->get_env() );
     332                                                delete ret->get_result();
     333                                                ret->set_result( castExpr->get_result() );
     334                                                castExpr->set_env( nullptr );
     335                                                castExpr->set_arg( nullptr );
     336                                                castExpr->set_result( nullptr );
     337                                                delete castExpr;
     338                                                return ret;
     339                                        }
     340
     341                                        assertf( depth1 == depth2, "non-intrinsic reference with cast of reference to reference not yet supported: %d %d %s", depth1, depth2, toString( castExpr ).c_str() );
     342                                        PRINT( std::cerr << castExpr << std::endl; )
     343                                        return castExpr;
     344                                } else if ( castExpr->get_arg()->get_result()->get_lvalue() ) {
     345                                        // conversion from lvalue to reference
     346                                        // xxx - keep cast, but turn into pointer cast??
     347                                        // xxx - memory
     348                                        PRINT(
     349                                                std::cerr << "convert lvalue to reference -- &" << std::endl;
     350                                                std::cerr << castExpr->get_arg() << std::endl;
     351                                        )
     352                                        AddressExpr * ret = new AddressExpr( castExpr->get_arg() );
     353                                        if ( refType->get_base()->get_qualifiers() != castExpr->get_arg()->get_result()->get_qualifiers() ) {
     354                                                // must keep cast if cast-to type is different from the actual type
     355                                                castExpr->set_arg( ret );
     356                                                return castExpr;
     357                                        }
     358                                        ret->set_env( castExpr->get_env() );
     359                                        delete ret->get_result();
     360                                        ret->set_result( castExpr->get_result() );
     361                                        castExpr->set_env( nullptr );
     362                                        castExpr->set_arg( nullptr );
     363                                        castExpr->set_result( nullptr );
     364                                        delete castExpr;
     365                                        return ret;
    153366                                } else {
    154                                         throw SemanticError( "Attempt to return non-lvalue from an lvalue-qualified function" );
    155                                 } // if
    156                         } // if
    157                         return retStmt;
    158                 }
    159 
    160                 void Pass2::visit( FunctionType *funType ) {
    161                         std::string typeName;
    162                         if ( isLvalueRet( funType ) ) {
    163                                 DeclarationWithType *retParm = funType->get_returnVals().front();
    164 
    165                                 // make a new parameter that is a pointer to the type of the old return value
    166                                 retParm->set_type( new PointerType( Type::Qualifiers(), retParm->get_type() ) );
    167                         } // if
    168 
    169                         Visitor::visit( funType );
     367                                        // rvalue to reference conversion -- introduce temporary
     368                                }
     369                                assertf( false, "Only conversions to reference from lvalue are currently supported: %s", toString( castExpr ).c_str() );
     370                        } else if ( ReferenceType * refType = dynamic_cast< ReferenceType * >( castExpr->get_arg()->get_result() ) ) {
     371                                (void)refType;
     372                                // conversion from reference to rvalue
     373                                PRINT(
     374                                        std::cerr << "convert reference to rvalue -- *" << std::endl;
     375                                        std::cerr << "was = " << castExpr << std::endl;
     376                                )
     377                                Expression * ret = castExpr->get_arg();
     378                                TypeSubstitution * env = castExpr->get_env();
     379                                castExpr->set_env( nullptr );
     380                                if ( ! isIntrinsicReference( ret ) ) {
     381                                        // dereference if not already dereferenced
     382                                        ret = mkDeref( ret );
     383                                }
     384                                if ( ResolvExpr::typesCompatibleIgnoreQualifiers( castExpr->get_result(), castExpr->get_arg()->get_result()->stripReferences(), SymTab::Indexer() ) ) {
     385                                        // can remove cast if types are compatible, changing expression type to value type
     386                                        ret->set_result( castExpr->get_result()->clone() );
     387                                        castExpr->set_arg( nullptr );
     388                                        delete castExpr;
     389                                } else {
     390                                        // must keep cast if types are different
     391                                        castExpr->set_arg( ret );
     392                                        ret = castExpr;
     393                                }
     394                                ret->set_env( env );
     395                                PRINT( std::cerr << "now: " << ret << std::endl; )
     396                                return ret;
     397                        }
     398                        return castExpr;
     399                }
     400
     401                Type * ReferenceTypeElimination::postmutate( ReferenceType * refType ) {
     402                        Type * base = refType->get_base();
     403                        Type::Qualifiers qualifiers = refType->get_qualifiers();
     404                        refType->set_base( nullptr );
     405                        delete refType;
     406                        return new PointerType( qualifiers, base );
    170407                }
    171408
     
    175412                                Expression * arg1 = commaExpr->get_arg1()->clone();
    176413                                Expression * arg2 = commaExpr->get_arg2()->clone();
    177                                 Expression * ret = new CommaExpr( arg1, mkExpr( arg2 ) );
     414                                Expression * ret = new CommaExpr( arg1, mkExpr( arg2 )->acceptMutator( *visitor ) );
    178415                                ret->set_env( expr->get_env() );
    179416                                expr->set_env( nullptr );
    180417                                delete expr;
    181                                 return ret->acceptMutator( *this );
     418                                return ret;
    182419                        } else if ( ConditionalExpr * condExpr = dynamic_cast< ConditionalExpr * >( arg ) ) {
    183420                                Expression * arg1 = condExpr->get_arg1()->clone();
    184421                                Expression * arg2 = condExpr->get_arg2()->clone();
    185422                                Expression * arg3 = condExpr->get_arg3()->clone();
    186                                 ConditionalExpr * ret = new ConditionalExpr( arg1, mkExpr( arg2 ), mkExpr( arg3 ) );
     423                                ConditionalExpr * ret = new ConditionalExpr( arg1, mkExpr( arg2 )->acceptMutator( *visitor ), mkExpr( arg3 )->acceptMutator( *visitor ) );
    187424                                ret->set_env( expr->get_env() );
    188425                                expr->set_env( nullptr );
     
    197434                                unify( ret->get_arg2()->get_result(), ret->get_arg3()->get_result(), newEnv, needAssertions, haveAssertions, openVars, SymTab::Indexer(), commonType );
    198435                                ret->set_result( commonType ? commonType : ret->get_arg2()->get_result()->clone() );
    199                                 return ret->acceptMutator( *this );
     436                                return ret;
    200437                        }
    201438                        return expr;
    202439                }
    203440
    204                 Expression * GeneralizedLvalue::mutate( MemberExpr * memExpr ) {
    205                         Parent::mutate( memExpr );
     441                Expression * GeneralizedLvalue::postmutate( MemberExpr * memExpr ) {
    206442                        return applyTransformation( memExpr, memExpr->get_aggregate(), [=]( Expression * aggr ) { return new MemberExpr( memExpr->get_member(), aggr ); } );
    207443                }
    208444
    209                 Expression * GeneralizedLvalue::mutate( AddressExpr * addrExpr ) {
    210                         addrExpr = safe_dynamic_cast< AddressExpr * >( Parent::mutate( addrExpr ) );
     445                Expression * GeneralizedLvalue::postmutate( AddressExpr * addrExpr ) {
    211446                        return applyTransformation( addrExpr, addrExpr->get_arg(), []( Expression * arg ) { return new AddressExpr( arg ); } );
     447                }
     448
     449                Expression * CollapseAddrDeref::postmutate( AddressExpr * addrExpr ) {
     450                        Expression * arg = addrExpr->get_arg();
     451                        if ( isIntrinsicReference( arg ) ) {
     452                                std::string fname = InitTweak::getFunctionName( arg );
     453                                if ( fname == "*?" ) {
     454                                        Expression *& arg0 = InitTweak::getCallArg( arg, 0 );
     455                                        Expression * ret = arg0;
     456                                        ret->set_env( addrExpr->get_env() );
     457                                        arg0 = nullptr;
     458                                        addrExpr->set_env( nullptr );
     459                                        delete addrExpr;
     460                                        return ret;
     461                                }
     462                        }
     463                        return addrExpr;
     464                }
     465
     466                Expression * CollapseAddrDeref::postmutate( ApplicationExpr * appExpr ) {
     467                        if ( isIntrinsicReference( appExpr ) ) {
     468                                std::string fname = InitTweak::getFunctionName( appExpr );
     469                                if ( fname == "*?" ) {
     470                                        Expression * arg = InitTweak::getCallArg( appExpr, 0 );
     471                                        // xxx - this isn't right, because it can remove casts that should be there...
     472                                        // while ( CastExpr * castExpr = dynamic_cast< CastExpr * >( arg ) ) {
     473                                        //      arg = castExpr->get_arg();
     474                                        // }
     475                                        if ( AddressExpr * addrExpr = dynamic_cast< AddressExpr * >( arg ) ) {
     476                                                Expression * ret = addrExpr->get_arg();
     477                                                ret->set_env( appExpr->get_env() );
     478                                                addrExpr->set_arg( nullptr );
     479                                                appExpr->set_env( nullptr );
     480                                                delete appExpr;
     481                                                return ret;
     482                                        }
     483                                }
     484                        }
     485                        return appExpr;
    212486                }
    213487        } // namespace
  • src/GenPoly/Lvalue.h

    raf08051 r28e58fd  
    2525        void convertLvalue( std::list< Declaration* >& translationUnit );
    2626
     27        /// true after reference types have been eliminated from the source code. After this point, reference types should not be added to the AST.
     28        bool referencesPermissable();
     29
    2730        /// applies transformations that allow GCC to accept more complicated lvalue expressions, e.g. &(a, b)
    2831        Expression * generalizedLvalue( Expression * expr );
  • src/GenPoly/Specialize.cc

    raf08051 r28e58fd  
    131131                        // conversion of 0 (null) to function type does not require tuple specialization
    132132                        if ( dynamic_cast< ZeroType * >( actualType ) ) return false;
    133                         FunctionType * aftype = getFunctionType( actualType );
    134                         assertf( aftype, "formal type is a function type, but actual type is not." );
     133                        FunctionType * aftype = getFunctionType( actualType->stripReferences() );
     134                        assertf( aftype, "formal type is a function type, but actual type is not: %s", toString( actualType ).c_str() );
    135135                        // Can't tuple specialize if parameter sizes deeply-differ.
    136136                        if ( functionParameterSize( fftype ) != functionParameterSize( aftype ) ) return false;
  • src/InitTweak/FixInit.cc

    raf08051 r28e58fd  
    2929
    3030#include "CodeGen/GenType.h"           // for genPrettyType
     31#include "CodeGen/OperatorTable.h"
    3132#include "Common/PassVisitor.h"        // for PassVisitor, WithStmtsToAdd
    3233#include "Common/SemanticError.h"      // for SemanticError
     
    254255                        SemanticError errors;
    255256                  private:
    256                         void handleFirstParam( Expression * firstParam );
    257257                        template< typename... Params >
    258258                        void emit( CodeLocation, const Params &... params );
     
    379379                                        FunctionType * ftype = dynamic_cast< FunctionType * >( GenPoly::getFunctionType( funcDecl->get_type() ) );
    380380                                        assert( ftype );
    381                                         if ( isConstructor( funcDecl->get_name() ) && ftype->get_parameters().size() == 2 ) {
    382                                                 Type * t1 = ftype->get_parameters().front()->get_type();
     381                                        if ( CodeGen::isConstructor( funcDecl->get_name() ) && ftype->get_parameters().size() == 2 ) {
     382                                                Type * t1 = getPointerBase( ftype->get_parameters().front()->get_type() );
    383383                                                Type * t2 = ftype->get_parameters().back()->get_type();
    384                                                 PointerType * ptrType = safe_dynamic_cast< PointerType * > ( t1 );
    385 
    386                                                 if ( ResolvExpr::typesCompatible( ptrType->get_base(), t2, SymTab::Indexer() ) ) {
     384                                                assert( t1 );
     385
     386                                                if ( ResolvExpr::typesCompatible( t1, t2, SymTab::Indexer() ) ) {
    387387                                                        // optimization: don't need to copy construct in order to call a copy constructor
    388388                                                        return appExpr;
    389389                                                } // if
    390                                         } else if ( isDestructor( funcDecl->get_name() ) ) {
     390                                        } else if ( CodeGen::isDestructor( funcDecl->get_name() ) ) {
    391391                                                // correctness: never copy construct arguments to a destructor
    392392                                                return appExpr;
     
    417417
    418418                bool ResolveCopyCtors::skipCopyConstruct( Type * type ) {
    419                         return dynamic_cast< VarArgsType * >( type ) || GenPoly::getFunctionType( type ) || Tuples::isTtype( type );
     419                        return dynamic_cast< VarArgsType * >( type ) || dynamic_cast< ReferenceType * >( type ) || GenPoly::getFunctionType( type ) || Tuples::isTtype( type );
    420420                }
    421421
     
    505505                                impCpCtorExpr->get_returnDecls().push_back( ret );
    506506                                CP_CTOR_PRINT( std::cerr << "makeCtorDtor for a return" << std::endl; )
    507                                 if ( ! result->get_lvalue() ) {
     507                                if ( ! dynamic_cast< ReferenceType * >( result ) ) {
    508508                                        // destructing lvalue returns is bad because it can cause multiple destructor calls to the same object - the returned object is not a temporary
    509509                                        destructRet( ret, impCpCtorExpr );
     
    607607
    608608                                Expression * retExpr = new CommaExpr( assign, new VariableExpr( returnDecl ) );
    609                                 if ( callExpr->get_result()->get_lvalue() ) {
    610                                         // lvalue returning functions are funny. Lvalue.cc inserts a *? in front of any lvalue returning
    611                                         // non-intrinsic function. Add an AddressExpr to the call to negate the derefence and change the
    612                                         // type of the return temporary from T to T* to properly capture the return value. Then dereference
    613                                         // the result of the comma expression, since the lvalue returning call was originally wrapped with
    614                                         // an AddressExpr.  Effectively, this turns
    615                                         //   lvalue T f();
    616                                         //   &*f();
    617                                         // into
    618                                         //   T * f();
    619                                         //   T * tmp_cp_retN;
    620                                         //   &*(tmp_cp_retN = &*f(), tmp_cp_retN);              // the first * and second & are generated here
    621                                         // which work out in terms of types, but is pretty messy. It would be nice to find a better way.
    622                                         assign->get_args().back() = new AddressExpr( assign->get_args().back() );
    623 
    624                                         returnDecl->set_type( new PointerType( Type::Qualifiers(), returnDecl->get_type() ) );
    625                                         retExpr->set_result( new PointerType( Type::Qualifiers(), retExpr->get_result() ) );
    626                                         retExpr = UntypedExpr::createDeref( retExpr );
    627                                 } // if
    628609                                // move env from callExpr to retExpr
    629610                                retExpr->set_env( callExpr->get_env() );
     
    991972                        if ( ! funcDecl ) return false;
    992973                        if ( ! funcDecl->get_statements() ) return false;
    993                         return isCtorDtor( funcDecl->get_name() ) && ! LinkageSpec::isOverridable( funcDecl->get_linkage() );
     974                        return CodeGen::isCtorDtor( funcDecl->get_name() ) && ! LinkageSpec::isOverridable( funcDecl->get_linkage() );
    994975                }
    995976
     
    1008989
    1009990                        function = funcDecl;
    1010                         isCtor = isConstructor( function->get_name() );
     991                        isCtor = CodeGen::isConstructor( function->get_name() );
    1011992                        if ( checkWarnings( function ) ) {
    1012993                                FunctionType * type = function->get_functionType();
    1013994                                assert( ! type->get_parameters().empty() );
    1014995                                thisParam = safe_dynamic_cast< ObjectDecl * >( type->get_parameters().front() );
    1015                                 PointerType * ptrType = safe_dynamic_cast< PointerType * > ( thisParam->get_type() );
    1016                                 StructInstType * structType = dynamic_cast< StructInstType * >( ptrType->get_base() );
     996                                Type * thisType = getPointerBase( thisParam->get_type() );
     997                                StructInstType * structType = dynamic_cast< StructInstType * >( thisType );
    1017998                                if ( structType ) {
    1018999                                        structDecl = structType->get_baseStruct();
     
    10471028
    10481029                        if ( ! unhandled.empty() ) {
    1049                                 // need to explicitly re-add function parameters in order to resolve copy constructors
     1030                                // need to explicitly re-add function parameters to the indexer in order to resolve copy constructors
    10501031                                enterScope();
    10511032                                maybeAccept( function->get_functionType(), *this );
     
    10621043                                        // insert and resolve default/copy constructor call for each field that's unhandled
    10631044                                        std::list< Statement * > stmt;
    1064                                         UntypedExpr * deref = UntypedExpr::createDeref( new VariableExpr( thisParam ) );
    1065 
    10661045                                        Expression * arg2 = 0;
    10671046                                        if ( isCopyConstructor( function ) ) {
     
    10721051                                        }
    10731052                                        InitExpander srcParam( arg2 );
    1074                                         SymTab::genImplicitCall( srcParam, new MemberExpr( field, deref ), function->get_name(), back_inserter( stmt ), field, isCtor );
     1053                                        // cast away reference type and construct field.
     1054                                        Expression * thisExpr = new CastExpr( new VariableExpr( thisParam ), thisParam->get_type()->stripReferences()->clone() );
     1055                                        Expression * memberDest = new MemberExpr( field, thisExpr );
     1056                                        SymTab::genImplicitCall( srcParam, memberDest, function->get_name(), back_inserter( stmt ), field, isCtor );
    10751057
    10761058                                        assert( stmt.size() <= 1 );
     
    10991081                }
    11001082
     1083                /// true if expr is effectively just the 'this' parameter
     1084                bool isThisExpression( Expression * expr, DeclarationWithType * thisParam ) {
     1085                        // TODO: there are more complicated ways to pass 'this' to a constructor, e.g. &*, *&, etc.
     1086                        if ( VariableExpr * varExpr = dynamic_cast< VariableExpr * >( expr ) ) {
     1087                                return varExpr->get_var() == thisParam;
     1088                        } else if ( CastExpr * castExpr = dynamic_cast< CastExpr * > ( expr ) ) {
     1089                                return isThisExpression( castExpr->get_arg(), thisParam );
     1090                        }
     1091                        return false;
     1092                }
     1093
     1094                /// returns a MemberExpr if expr is effectively just member access on the 'this' parameter, else nullptr
     1095                MemberExpr * isThisMemberExpr( Expression * expr, DeclarationWithType * thisParam ) {
     1096                        if ( MemberExpr * memberExpr = dynamic_cast< MemberExpr * >( expr ) ) {
     1097                                if ( isThisExpression( memberExpr->get_aggregate(), thisParam ) ) {
     1098                                        return memberExpr;
     1099                                }
     1100                        } else if ( CastExpr * castExpr = dynamic_cast< CastExpr * >( expr ) ) {
     1101                                return isThisMemberExpr( castExpr->get_arg(), thisParam );
     1102                        }
     1103                        return nullptr;
     1104                }
     1105
    11011106                void GenStructMemberCalls::visit( ApplicationExpr * appExpr ) {
    11021107                        if ( ! checkWarnings( function ) ) return;
     
    11071112                                Expression * firstParam = appExpr->get_args().front();
    11081113
    1109                                 if ( VariableExpr * varExpr = dynamic_cast< VariableExpr * >( firstParam ) ) {
     1114                                if ( isThisExpression( firstParam, thisParam ) ) {
    11101115                                        // if calling another constructor on thisParam, assume that function handles
    11111116                                        // all members - if it doesn't a warning will appear in that function.
    1112                                         if ( varExpr->get_var() == thisParam ) {
    1113                                                 unhandled.clear();
    1114                                         }
    1115                                 } else {
    1116                                         // if first parameter is a member expression then
    1117                                         // remove the member from unhandled set.
    1118                                         handleFirstParam( firstParam );
    1119                                 }
    1120                         }
    1121 
    1122                         Parent::visit( appExpr );
    1123                 }
    1124 
    1125                 void GenStructMemberCalls::handleFirstParam( Expression * firstParam ) {
    1126                         using namespace std;
    1127                         if ( AddressExpr * addrExpr = dynamic_cast< AddressExpr * >( firstParam ) ) {
    1128                                 if ( MemberExpr * memberExpr = dynamic_cast< MemberExpr * >( addrExpr->get_arg() ) ) {
    1129                                         if ( ApplicationExpr * deref = dynamic_cast< ApplicationExpr * >( memberExpr->get_aggregate() ) ) {
    1130                                                 if ( getFunctionName( deref ) == "*?" && deref->get_args().size() == 1 ) {
    1131                                                         if ( VariableExpr * varExpr = dynamic_cast< VariableExpr * >( deref->get_args().front() ) ) {
    1132                                                                 if ( varExpr->get_var() == thisParam ) {
    1133                                                                         unhandled.erase( memberExpr->get_member() );
    1134                                                                 }
    1135                                                         }
    1136                                                 }
     1117                                        unhandled.clear();
     1118                                } else if ( MemberExpr * memberExpr = isThisMemberExpr( firstParam, thisParam ) ) {
     1119                                        // if first parameter is a member expression on the this parameter,
     1120                                        // then remove the member from unhandled set.
     1121                                        if ( isThisExpression( memberExpr->get_aggregate(), thisParam ) ) {
     1122                                                unhandled.erase( memberExpr->get_member() );
    11371123                                        }
    11381124                                }
    11391125                        }
     1126                        Parent::visit( appExpr );
    11401127                }
    11411128
     
    11441131                        if ( ! isCtor ) return;
    11451132
    1146                         if ( ApplicationExpr * deref = dynamic_cast< ApplicationExpr * >( memberExpr->get_aggregate() ) ) {
    1147                                 if ( getFunctionName( deref ) == "*?" && deref->get_args().size() == 1 ) {
    1148                                         if ( VariableExpr * varExpr = dynamic_cast< VariableExpr * >( deref->get_args().front() ) ) {
    1149                                                 if ( varExpr->get_var() == thisParam ) {
    1150                                                         if ( unhandled.count( memberExpr->get_member() ) ) {
    1151                                                                 // emit a warning because a member was used before it was constructed
    1152                                                                 usedUninit.insert( { memberExpr->get_member(), memberExpr->location } );
    1153                                                         }
    1154                                                 }
    1155                                         }
     1133                        if ( isThisExpression( memberExpr->get_aggregate(), thisParam ) ) {
     1134                                if ( unhandled.count( memberExpr->get_member() ) ) {
     1135                                        // emit a warning because a member was used before it was constructed
     1136                                        usedUninit.insert( { memberExpr->get_member(), memberExpr->location } );
    11561137                                }
    11571138                        }
     
    11991180                        ctorExpr->set_callExpr( nullptr );
    12001181                        ctorExpr->set_env( nullptr );
     1182                        delete ctorExpr;
    12011183
    12021184                        Expression *& firstArg = callExpr->get_args().front();
    1203                         UntypedExpr * assign = new UntypedExpr( new NameExpr( "?=?" ) );
    1204                         assign->get_args().push_back( new VariableExpr( tmp ) );
    1205                         assign->get_args().push_back( firstArg );
    1206                         assign->set_result( ctorExpr->get_result()->clone() );
    1207                         firstArg = assign;
    1208 
    1209                         CommaExpr * commaExpr = new CommaExpr( callExpr, new VariableExpr( tmp ) );
     1185
     1186                        // xxx - hack in 'fake' assignment operator until resolver can easily be called in this pass. Once the resolver can be used in PassVisitor, this hack goes away.
     1187
     1188                        // generate the type of assignment operator using the type of tmp minus any reference types
     1189                        Type * type = tmp->get_type()->stripReferences();
     1190                        FunctionType * ftype = SymTab::genAssignType( type );
     1191
     1192                        // generate fake assignment decl and call it using &tmp and &firstArg
     1193                        // since tmp is guaranteed to be a reference and we want to assign pointers
     1194                        FunctionDecl * assignDecl = new FunctionDecl( "?=?", Type::StorageClasses(), LinkageSpec::Intrinsic, ftype, nullptr );
     1195                        ApplicationExpr * assign = new ApplicationExpr( VariableExpr::functionPointer( assignDecl ) );
     1196                        assign->get_args().push_back( new AddressExpr( new VariableExpr( tmp ) ) );
     1197                        Expression * addrArg = new AddressExpr( firstArg );
     1198                        // if firstArg has type T&&, then &firstArg has type T*&.
     1199                        // Cast away the reference to a value type so that the argument
     1200                        // matches the assignment's parameter types
     1201                        if ( dynamic_cast<ReferenceType *>( addrArg->get_result() ) ) {
     1202                                addrArg = new CastExpr( addrArg, addrArg->get_result()->stripReferences()->clone() );
     1203                        }
     1204                        assign->get_args().push_back( addrArg );
     1205                        firstArg = new VariableExpr( tmp );
     1206
     1207                        // for constructor expr:
     1208                        //   T x;
     1209                        //   x{};
     1210                        // results in:
     1211                        //   T x;
     1212                        //   T & tmp;
     1213                        //   &tmp = &x, ?{}(tmp), tmp
     1214                        CommaExpr * commaExpr = new CommaExpr( assign, new CommaExpr( callExpr, new VariableExpr( tmp ) ) );
    12101215                        commaExpr->set_env( env );
    1211                         delete ctorExpr;
    12121216                        return commaExpr;
    12131217                }
  • src/InitTweak/GenInit.cc

    raf08051 r28e58fd  
    2121#include <list>                    // for _List_iterator, list
    2222
     23#include "CodeGen/OperatorTable.h"
    2324#include "Common/PassVisitor.h"    // for PassVisitor, WithGuards, WithShort...
    2425#include "Common/SemanticError.h"  // for SemanticError
     
    5758
    5859          protected:
    59                 FunctionType * ftype;
     60                FunctionType * ftype = nullptr;
    6061                std::string funcName;
    6162        };
     
    140141                std::list< DeclarationWithType * > & returnVals = ftype->get_returnVals();
    141142                assert( returnVals.size() == 0 || returnVals.size() == 1 );
    142                 // hands off if the function returns an lvalue - we don't want to allocate a temporary if a variable's address
     143                // hands off if the function returns a reference - we don't want to allocate a temporary if a variable's address
    143144                // is being returned
    144                 if ( returnStmt->get_expr() && returnVals.size() == 1 && ! returnVals.front()->get_type()->get_lvalue() ) {
     145                if ( returnStmt->get_expr() && returnVals.size() == 1 && ! dynamic_cast< ReferenceType * >( returnVals.front()->get_type() ) ) {
    145146                        // explicitly construct the return value using the return expression and the retVal object
    146147                        assertf( returnVals.front()->get_name() != "", "Function %s has unnamed return value\n", funcName.c_str() );
    147                         UntypedExpr *construct = new UntypedExpr( new NameExpr( "?{}" ) );
    148                         construct->get_args().push_back( new AddressExpr( new VariableExpr( returnVals.front() ) ) );
    149                         construct->get_args().push_back( returnStmt->get_expr() );
    150                         stmtsToAddBefore.push_back(new ExprStmt(noLabels, construct));
     148
     149                        stmtsToAddBefore.push_back( genCtorDtor( "?{}", dynamic_cast< ObjectDecl *>( returnVals.front() ), returnStmt->get_expr() ) );
    151150
    152151                        // return the retVal object
     
    215214
    216215        bool CtorDtor::isManaged( Type * type ) const {
     216                // at least for now, references are never constructed
     217                if ( dynamic_cast< ReferenceType * >( type ) ) return false;
    217218                // need to clear and reset qualifiers when determining if a type is managed
    218219                ValueGuard< Type::Qualifiers > qualifiers( type->get_qualifiers() );
     
    238239        void CtorDtor::handleDWT( DeclarationWithType * dwt ) {
    239240                // if this function is a user-defined constructor or destructor, mark down the type as "managed"
    240                 if ( ! LinkageSpec::isOverridable( dwt->get_linkage() ) && isCtorDtor( dwt->get_name() ) ) {
     241                if ( ! LinkageSpec::isOverridable( dwt->get_linkage() ) && CodeGen::isCtorDtor( dwt->get_name() ) ) {
    241242                        std::list< DeclarationWithType * > & params = GenPoly::getFunctionType( dwt->get_type() )->get_parameters();
    242243                        assert( ! params.empty() );
    243                         PointerType * type = safe_dynamic_cast< PointerType * >( params.front()->get_type() );
    244                         managedTypes.insert( SymTab::Mangler::mangle( type->get_base() ) );
     244                        Type * type = InitTweak::getPointerBase( params.front()->get_type() );
     245                        assert( type );
     246                        managedTypes.insert( SymTab::Mangler::mangle( type ) );
    245247                }
    246248        }
  • src/InitTweak/InitTweak.cc

    raf08051 r28e58fd  
    187187
    188188                        UntypedExpr * increment = new UntypedExpr( new NameExpr( "++?" ) );
    189                         increment->get_args().push_back( new AddressExpr( index->clone() ) );
     189                        increment->get_args().push_back( index->clone() );
    190190                        *out++ = new ExprStmt( noLabels, increment );
    191191                }
     
    397397                template<typename CallExpr>
    398398                Expression *& callArg( CallExpr * callExpr, unsigned int pos ) {
    399                         if ( pos >= callExpr->get_args().size() ) assertf( false, "asking for argument that doesn't exist. Return NULL/throw exception?" );
     399                        if ( pos >= callExpr->get_args().size() ) assertf( false, "getCallArg for argument that doesn't exist: (%u); %s.", pos, toString( callExpr ).c_str() );
    400400                        for ( Expression *& arg : callExpr->get_args() ) {
    401401                                if ( pos == 0 ) return arg;
     
    475475                } else if ( ArrayType * arrayType = dynamic_cast< ArrayType * >( type ) ) {
    476476                        return arrayType->get_base();
     477                } else if ( ReferenceType * refType = dynamic_cast< ReferenceType * >( type ) ) {
     478                        return refType->get_base();
    477479                } else {
    478480                        return NULL;
     
    560562                if ( ftype->get_parameters().size() != 2 ) return 0;
    561563
    562                 Type * t1 = ftype->get_parameters().front()->get_type();
     564                Type * t1 = getPointerBase( ftype->get_parameters().front()->get_type() );
    563565                Type * t2 = ftype->get_parameters().back()->get_type();
    564                 PointerType * ptrType = dynamic_cast< PointerType * > ( t1 );
    565                 assert( ptrType );
    566 
    567                 if ( ResolvExpr::typesCompatibleIgnoreQualifiers( ptrType->get_base(), t2, SymTab::Indexer() ) ) {
     566                assert( t1 );
     567
     568                if ( ResolvExpr::typesCompatibleIgnoreQualifiers( t1, t2, SymTab::Indexer() ) ) {
    568569                        return function;
    569570                } else {
  • src/InitTweak/InitTweak.h

    raf08051 r28e58fd  
    2424// helper functions for initialization
    2525namespace InitTweak {
    26         bool isConstructor( const std::string & );
    27         bool isDestructor( const std::string & );
    28         bool isAssignment( const std::string & );
    29         bool isCtorDtor( const std::string & );
    30         bool isCtorDtorAssign( const std::string & );
    31 
    3226        FunctionDecl * isAssignment( Declaration * decl );
    3327        FunctionDecl * isDestructor( Declaration * decl );
  • src/MakeLibCfa.cc

    raf08051 r28e58fd  
    1616#include "MakeLibCfa.h"
    1717
    18 #include <cassert>                 // for assert
     18#include <cassert>                  // for assert
    1919#include <string>                   // for operator==, string
    2020
    2121#include "CodeGen/OperatorTable.h"  // for OperatorInfo, operatorLookup, Ope...
     22#include "Common/PassVisitor.h"     // for PassVisitor
    2223#include "Common/SemanticError.h"   // for SemanticError
    2324#include "Common/UniqueName.h"      // for UniqueName
     
    3233
    3334namespace LibCfa {
    34         class MakeLibCfa : public Visitor {
    35           public:
    36                 void visit( FunctionDecl* funcDecl );
    37                 void visit( ObjectDecl* objDecl );
     35        namespace {
     36                struct MakeLibCfa {
     37                  public:
     38                        void postvisit( FunctionDecl* funcDecl );
    3839
    39                 std::list< Declaration* > &get_newDecls() { return newDecls; }
    40           private:
    41                 std::list< Declaration* > newDecls;
    42         };
     40                        std::list< Declaration* > newDecls;
     41                };
     42        }
    4343
    4444        void makeLibCfa( std::list< Declaration* > &prelude ) {
    45                 MakeLibCfa maker;
     45                PassVisitor<MakeLibCfa> maker;
    4646                acceptAll( prelude, maker );
    47                 prelude.splice( prelude.end(), maker.get_newDecls() );
     47                prelude.splice( prelude.end(), maker.pass.newDecls );
    4848        }
    4949
    50         void MakeLibCfa::visit( FunctionDecl* origFuncDecl ) {
    51                 if ( origFuncDecl->get_linkage() != LinkageSpec::Intrinsic ) return;
    52                 if ( origFuncDecl->get_statements() ) return;
     50        namespace {
     51                struct TypeFinder       {
     52                        void postvisit( TypeInstType * inst ) {
     53                                // if a type variable is seen, assume all zero_t/one_t in the parameter list
     54                                //  can be replaced with the equivalent 'general' pointer.
     55                                if ( type ) return;
     56                                if ( inst->isFtype ) {
     57                                        type = new PointerType( Type::Qualifiers(), new FunctionType( Type::Qualifiers(), false ) );
     58                                } else {
     59                                        type = new PointerType( Type::Qualifiers(), new VoidType( Type::Qualifiers() ) );
     60                                }
     61                        }
     62                        Type * type = nullptr;
     63                };
    5364
    54                 FunctionDecl *funcDecl = origFuncDecl->clone();
    55                 CodeGen::OperatorInfo opInfo;
    56                 bool lookResult = CodeGen::operatorLookup( funcDecl->get_name(), opInfo );
    57                 assert( lookResult );
    58                 assert( ! funcDecl->get_statements() );
    59                 UntypedExpr *newExpr = new UntypedExpr( new NameExpr( funcDecl->get_name() ) );
    60                 UniqueName paramNamer( "_p" );
    61                 std::list< DeclarationWithType* >::iterator param = funcDecl->get_functionType()->get_parameters().begin();
    62                 assert( param != funcDecl->get_functionType()->get_parameters().end() );
     65                struct ZeroOneReplacer {
     66                        ZeroOneReplacer( Type * t ) : type( t ) {}
     67                        ~ZeroOneReplacer() { delete type; }
     68                        Type * type = nullptr;
    6369
    64                 for ( ; param != funcDecl->get_functionType()->get_parameters().end(); ++param ) {
    65                         if ( (*param)->get_name() == "" ) {
    66                                 (*param)->set_name( paramNamer.newName() );
    67                                 (*param)->set_linkage( LinkageSpec::C );
     70                        Type * common( Type * t ) {
     71                                if ( ! type ) return t;
     72                                delete t;
     73                                return type->clone();
    6874                        }
    69                         newExpr->get_args().push_back( new VariableExpr( *param ) );
    70                 } // for
    7175
    72                 funcDecl->set_statements( new CompoundStmt( std::list< Label >() ) );
    73                 newDecls.push_back( funcDecl );
     76                        Type * postmutate( OneType * t ) { return common( t ); }
     77                        Type * postmutate( ZeroType * t ) { return common( t ); }
     78                };
    7479
    75                 switch ( opInfo.type ) {
    76                   case CodeGen::OT_INDEX:
    77                   case CodeGen::OT_CALL:
    78                   case CodeGen::OT_PREFIX:
    79                   case CodeGen::OT_POSTFIX:
    80                   case CodeGen::OT_INFIX:
    81                   case CodeGen::OT_PREFIXASSIGN:
    82                   case CodeGen::OT_POSTFIXASSIGN:
    83                   case CodeGen::OT_INFIXASSIGN:
    84                   case CodeGen::OT_CTOR:
    85                   case CodeGen::OT_DTOR:
    86                                 funcDecl->get_statements()->get_kids().push_back( new ReturnStmt( std::list< Label >(), newExpr ) );
    87                                 break;
    88                   case CodeGen::OT_CONSTANT:
    89                   case CodeGen::OT_LABELADDRESS:
    90                         // there are no intrinsic definitions of 0/1 or label addresses as functions
    91                         assert( false );
    92                 } // switch
    93         }
     80                void fixZeroOneType( FunctionDecl * origFuncDecl ) {
     81                        // find appropriate type to replace zero_t/one_t with
     82                        PassVisitor<TypeFinder> finder;
     83                        origFuncDecl->type->accept( finder );
     84                        // replace zero_t/one_t in function type
     85                        PassVisitor<ZeroOneReplacer> replacer( finder.pass.type );
     86                        origFuncDecl->type->acceptMutator( replacer );
     87                }
    9488
    95         void MakeLibCfa::visit( ObjectDecl* origObjDecl ) {
    96                 if ( origObjDecl->get_linkage() != LinkageSpec::Intrinsic ) return;
     89                void MakeLibCfa::postvisit( FunctionDecl* origFuncDecl ) {
     90                        // don't change non-intrinsic functions
     91                        if ( origFuncDecl->get_linkage() != LinkageSpec::Intrinsic ) return;
     92                        // replace zero_t/one_t with void */void (*)(void)
     93                        fixZeroOneType( origFuncDecl );
     94                        // skip functions already defined
     95                        if ( origFuncDecl->get_statements() ) return;
    9796
    98                 ObjectDecl *objDecl = origObjDecl->clone();
    99                 assert( ! objDecl->get_init() );
    100                 std::list< Expression* > noDesignators;
    101                 objDecl->set_init( new SingleInit( new NameExpr( objDecl->get_name() ), false ) ); // cannot be constructed
    102                 newDecls.push_back( objDecl );
    103         }
     97                        FunctionDecl *funcDecl = origFuncDecl->clone();
     98                        CodeGen::OperatorInfo opInfo;
     99                        bool lookResult = CodeGen::operatorLookup( funcDecl->get_name(), opInfo );
     100                        assert( lookResult );
     101                        assert( ! funcDecl->get_statements() );
     102                        // build a recursive call - this is okay, as the call will actually be codegen'd using operator syntax
     103                        UntypedExpr *newExpr = new UntypedExpr( new NameExpr( funcDecl->get_name() ) );
     104                        UniqueName paramNamer( "_p" );
     105                        std::list< DeclarationWithType* >::iterator param = funcDecl->get_functionType()->get_parameters().begin();
     106                        assert( param != funcDecl->get_functionType()->get_parameters().end() );
     107
     108                        for ( ; param != funcDecl->get_functionType()->get_parameters().end(); ++param ) {
     109                                // name each unnamed parameter
     110                                if ( (*param)->get_name() == "" ) {
     111                                        (*param)->set_name( paramNamer.newName() );
     112                                        (*param)->set_linkage( LinkageSpec::C );
     113                                }
     114                                // add parameter to the expression
     115                                newExpr->get_args().push_back( new VariableExpr( *param ) );
     116                        } // for
     117
     118                        funcDecl->set_statements( new CompoundStmt( std::list< Label >() ) );
     119                        newDecls.push_back( funcDecl );
     120
     121                        switch ( opInfo.type ) {
     122                          case CodeGen::OT_INDEX:
     123                          case CodeGen::OT_CALL:
     124                          case CodeGen::OT_PREFIX:
     125                          case CodeGen::OT_POSTFIX:
     126                          case CodeGen::OT_INFIX:
     127                          case CodeGen::OT_PREFIXASSIGN:
     128                          case CodeGen::OT_POSTFIXASSIGN:
     129                          case CodeGen::OT_INFIXASSIGN:
     130                          case CodeGen::OT_CTOR:
     131                          case CodeGen::OT_DTOR:
     132                                // return the recursive call
     133                                        funcDecl->get_statements()->get_kids().push_back( new ReturnStmt( std::list< Label >(), newExpr ) );
     134                                        break;
     135                          case CodeGen::OT_CONSTANT:
     136                          case CodeGen::OT_LABELADDRESS:
     137                                // there are no intrinsic definitions of 0/1 or label addresses as functions
     138                                assert( false );
     139                        } // switch
     140                }
     141        } // namespace
    104142} // namespace LibCfa
  • src/Makefile.in

    raf08051 r28e58fd  
    224224        SynTree/driver_cfa_cpp-PointerType.$(OBJEXT) \
    225225        SynTree/driver_cfa_cpp-ArrayType.$(OBJEXT) \
     226        SynTree/driver_cfa_cpp-ReferenceType.$(OBJEXT) \
    226227        SynTree/driver_cfa_cpp-FunctionType.$(OBJEXT) \
    227228        SynTree/driver_cfa_cpp-ReferenceToType.$(OBJEXT) \
     
    520521        SynTree/VoidType.cc SynTree/BasicType.cc \
    521522        SynTree/PointerType.cc SynTree/ArrayType.cc \
    522         SynTree/FunctionType.cc SynTree/ReferenceToType.cc \
    523         SynTree/TupleType.cc SynTree/TypeofType.cc SynTree/AttrType.cc \
     523        SynTree/ReferenceType.cc SynTree/FunctionType.cc \
     524        SynTree/ReferenceToType.cc SynTree/TupleType.cc \
     525        SynTree/TypeofType.cc SynTree/AttrType.cc \
    524526        SynTree/VarArgsType.cc SynTree/ZeroOneType.cc \
    525527        SynTree/Constant.cc SynTree/Expression.cc SynTree/TupleExpr.cc \
     
    867869SynTree/driver_cfa_cpp-ArrayType.$(OBJEXT): SynTree/$(am__dirstamp) \
    868870        SynTree/$(DEPDIR)/$(am__dirstamp)
     871SynTree/driver_cfa_cpp-ReferenceType.$(OBJEXT):  \
     872        SynTree/$(am__dirstamp) SynTree/$(DEPDIR)/$(am__dirstamp)
    869873SynTree/driver_cfa_cpp-FunctionType.$(OBJEXT):  \
    870874        SynTree/$(am__dirstamp) SynTree/$(DEPDIR)/$(am__dirstamp)
     
    10701074@AMDEP_TRUE@@am__include@ @am__quote@SynTree/$(DEPDIR)/driver_cfa_cpp-PointerType.Po@am__quote@
    10711075@AMDEP_TRUE@@am__include@ @am__quote@SynTree/$(DEPDIR)/driver_cfa_cpp-ReferenceToType.Po@am__quote@
     1076@AMDEP_TRUE@@am__include@ @am__quote@SynTree/$(DEPDIR)/driver_cfa_cpp-ReferenceType.Po@am__quote@
    10721077@AMDEP_TRUE@@am__include@ @am__quote@SynTree/$(DEPDIR)/driver_cfa_cpp-Statement.Po@am__quote@
    10731078@AMDEP_TRUE@@am__include@ @am__quote@SynTree/$(DEPDIR)/driver_cfa_cpp-TupleExpr.Po@am__quote@
     
    21672172@AMDEP_TRUE@@am__fastdepCXX_FALSE@      DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    21682173@am__fastdepCXX_FALSE@  $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -c -o SynTree/driver_cfa_cpp-ArrayType.obj `if test -f 'SynTree/ArrayType.cc'; then $(CYGPATH_W) 'SynTree/ArrayType.cc'; else $(CYGPATH_W) '$(srcdir)/SynTree/ArrayType.cc'; fi`
     2174
     2175SynTree/driver_cfa_cpp-ReferenceType.o: SynTree/ReferenceType.cc
     2176@am__fastdepCXX_TRUE@   $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -MT SynTree/driver_cfa_cpp-ReferenceType.o -MD -MP -MF SynTree/$(DEPDIR)/driver_cfa_cpp-ReferenceType.Tpo -c -o SynTree/driver_cfa_cpp-ReferenceType.o `test -f 'SynTree/ReferenceType.cc' || echo '$(srcdir)/'`SynTree/ReferenceType.cc
     2177@am__fastdepCXX_TRUE@   $(AM_V_at)$(am__mv) SynTree/$(DEPDIR)/driver_cfa_cpp-ReferenceType.Tpo SynTree/$(DEPDIR)/driver_cfa_cpp-ReferenceType.Po
     2178@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(AM_V_CXX)source='SynTree/ReferenceType.cc' object='SynTree/driver_cfa_cpp-ReferenceType.o' libtool=no @AMDEPBACKSLASH@
     2179@AMDEP_TRUE@@am__fastdepCXX_FALSE@      DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     2180@am__fastdepCXX_FALSE@  $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -c -o SynTree/driver_cfa_cpp-ReferenceType.o `test -f 'SynTree/ReferenceType.cc' || echo '$(srcdir)/'`SynTree/ReferenceType.cc
     2181
     2182SynTree/driver_cfa_cpp-ReferenceType.obj: SynTree/ReferenceType.cc
     2183@am__fastdepCXX_TRUE@   $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -MT SynTree/driver_cfa_cpp-ReferenceType.obj -MD -MP -MF SynTree/$(DEPDIR)/driver_cfa_cpp-ReferenceType.Tpo -c -o SynTree/driver_cfa_cpp-ReferenceType.obj `if test -f 'SynTree/ReferenceType.cc'; then $(CYGPATH_W) 'SynTree/ReferenceType.cc'; else $(CYGPATH_W) '$(srcdir)/SynTree/ReferenceType.cc'; fi`
     2184@am__fastdepCXX_TRUE@   $(AM_V_at)$(am__mv) SynTree/$(DEPDIR)/driver_cfa_cpp-ReferenceType.Tpo SynTree/$(DEPDIR)/driver_cfa_cpp-ReferenceType.Po
     2185@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(AM_V_CXX)source='SynTree/ReferenceType.cc' object='SynTree/driver_cfa_cpp-ReferenceType.obj' libtool=no @AMDEPBACKSLASH@
     2186@AMDEP_TRUE@@am__fastdepCXX_FALSE@      DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     2187@am__fastdepCXX_FALSE@  $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -c -o SynTree/driver_cfa_cpp-ReferenceType.obj `if test -f 'SynTree/ReferenceType.cc'; then $(CYGPATH_W) 'SynTree/ReferenceType.cc'; else $(CYGPATH_W) '$(srcdir)/SynTree/ReferenceType.cc'; fi`
    21692188
    21702189SynTree/driver_cfa_cpp-FunctionType.o: SynTree/FunctionType.cc
  • src/Parser/DeclarationNode.cc

    raf08051 r28e58fd  
    340340} // DeclarationNode::newTypeDecl
    341341
    342 DeclarationNode * DeclarationNode::newPointer( DeclarationNode * qualifiers ) {
    343         DeclarationNode * newnode = new DeclarationNode;
    344         newnode->type = new TypeData( TypeData::Pointer );
     342DeclarationNode * DeclarationNode::newPointer( DeclarationNode * qualifiers, OperKinds kind ) {
     343        DeclarationNode * newnode = new DeclarationNode;
     344        newnode->type = new TypeData( kind == OperKinds::PointTo ? TypeData::Pointer : TypeData::Reference );
    345345        if ( qualifiers ) {
    346346                return newnode->addQualifiers( qualifiers );
     
    759759DeclarationNode * DeclarationNode::addPointer( DeclarationNode * p ) {
    760760        if ( p ) {
    761                 assert( p->type->kind == TypeData::Pointer );
     761                assert( p->type->kind == TypeData::Pointer || TypeData::Reference );
    762762                setBase( p->type );
    763763                p->type = nullptr;
     
    781781DeclarationNode * DeclarationNode::addNewPointer( DeclarationNode * p ) {
    782782        if ( p ) {
    783                 assert( p->type->kind == TypeData::Pointer );
     783                assert( p->type->kind == TypeData::Pointer || p->type->kind == TypeData::Reference );
    784784                if ( type ) {
    785785                        switch ( type->kind ) {
  • src/Parser/ExpressionNode.cc

    raf08051 r28e58fd  
    314314Expression * build_unary_ptr( OperKinds op, ExpressionNode * expr_node ) {
    315315        std::list< Expression * > args;
    316         args.push_back( new AddressExpr( maybeMoveBuild< Expression >(expr_node) ) );
     316        args.push_back(  maybeMoveBuild< Expression >(expr_node) ); // xxx
    317317        return new UntypedExpr( new NameExpr( OperName[ (int)op ] ), args );
    318318} // build_unary_ptr
     
    327327Expression * build_binary_ptr( OperKinds op, ExpressionNode * expr_node1, ExpressionNode * expr_node2 ) {
    328328        std::list< Expression * > args;
    329         args.push_back( new AddressExpr( maybeMoveBuild< Expression >(expr_node1) ) );
     329        args.push_back( maybeMoveBuild< Expression >(expr_node1) );
    330330        args.push_back( maybeMoveBuild< Expression >(expr_node2) );
    331331        return new UntypedExpr( new NameExpr( OperName[ (int)op ] ), args );
  • src/Parser/ParseNode.h

    raf08051 r28e58fd  
    243243        static DeclarationNode * newTraitUse( const std::string * name, ExpressionNode * params );
    244244        static DeclarationNode * newTypeDecl( std::string * name, DeclarationNode * typeParams );
    245         static DeclarationNode * newPointer( DeclarationNode * qualifiers );
     245        static DeclarationNode * newPointer( DeclarationNode * qualifiers, OperKinds kind );
    246246        static DeclarationNode * newArray( ExpressionNode * size, DeclarationNode * qualifiers, bool isStatic );
    247247        static DeclarationNode * newVarArray( DeclarationNode * qualifiers );
  • src/Parser/TypeData.cc

    raf08051 r28e58fd  
    3535          case Unknown:
    3636          case Pointer:
     37          case Reference:
    3738          case EnumConstant:
    3839                // nothing else to initialize
     
    104105          case Unknown:
    105106          case Pointer:
     107          case Reference:
    106108          case EnumConstant:
    107109                // nothing to destroy
     
    170172          case EnumConstant:
    171173          case Pointer:
     174          case Reference:
    172175                // nothing else to copy
    173176                break;
     
    405408                        // add dtor:  void ^?{}(T *)
    406409                        FunctionType * dtorType = new FunctionType( Type::Qualifiers(), false );
    407                         dtorType->get_parameters().push_back( new ObjectDecl( "", Type::StorageClasses(), LinkageSpec::Cforall, nullptr, new PointerType( Type::Qualifiers(), new TypeInstType( Type::Qualifiers(), td->get_name(), *i ) ), nullptr ) );
     410                        dtorType->get_parameters().push_back( new ObjectDecl( "", Type::StorageClasses(), LinkageSpec::Cforall, nullptr, new ReferenceType( Type::Qualifiers(), new TypeInstType( Type::Qualifiers(), td->get_name(), *i ) ), nullptr ) );
    408411                        td->get_assertions().push_front( new FunctionDecl( "^?{}", Type::StorageClasses(), LinkageSpec::Cforall, dtorType, nullptr ) );
    409412
    410413                        // add copy ctor:  void ?{}(T *, T)
    411414                        FunctionType * copyCtorType = new FunctionType( Type::Qualifiers(), false );
    412                         copyCtorType->get_parameters().push_back( new ObjectDecl( "", Type::StorageClasses(), LinkageSpec::Cforall, nullptr, new PointerType( Type::Qualifiers(), new TypeInstType( Type::Qualifiers(), td->get_name(), *i ) ), nullptr ) );
     415                        copyCtorType->get_parameters().push_back( new ObjectDecl( "", Type::StorageClasses(), LinkageSpec::Cforall, nullptr, new ReferenceType( Type::Qualifiers(), new TypeInstType( Type::Qualifiers(), td->get_name(), *i ) ), nullptr ) );
    413416                        copyCtorType->get_parameters().push_back( new ObjectDecl( "", Type::StorageClasses(), LinkageSpec::Cforall, nullptr, new TypeInstType( Type::Qualifiers(), td->get_name(), *i ), nullptr ) );
    414417                        td->get_assertions().push_front( new FunctionDecl( "?{}", Type::StorageClasses(), LinkageSpec::Cforall, copyCtorType, nullptr ) );
     
    416419                        // add default ctor:  void ?{}(T *)
    417420                        FunctionType * ctorType = new FunctionType( Type::Qualifiers(), false );
    418                         ctorType->get_parameters().push_back( new ObjectDecl( "", Type::StorageClasses(), LinkageSpec::Cforall, nullptr, new PointerType( Type::Qualifiers(), new TypeInstType( Type::Qualifiers(), td->get_name(), *i ) ), nullptr ) );
     421                        ctorType->get_parameters().push_back( new ObjectDecl( "", Type::StorageClasses(), LinkageSpec::Cforall, nullptr, new ReferenceType( Type::Qualifiers(), new TypeInstType( Type::Qualifiers(), td->get_name(), *i ) ), nullptr ) );
    419422                        td->get_assertions().push_front( new FunctionDecl( "?{}", Type::StorageClasses(), LinkageSpec::Cforall, ctorType, nullptr ) );
    420423
    421424                        // add assignment operator:  T * ?=?(T *, T)
    422425                        FunctionType * assignType = new FunctionType( Type::Qualifiers(), false );
    423                         assignType->get_parameters().push_back( new ObjectDecl( "", Type::StorageClasses(), LinkageSpec::Cforall, nullptr, new PointerType( Type::Qualifiers(), new TypeInstType( Type::Qualifiers(), td->get_name(), *i ) ), nullptr ) );
     426                        assignType->get_parameters().push_back( new ObjectDecl( "", Type::StorageClasses(), LinkageSpec::Cforall, nullptr, new ReferenceType( Type::Qualifiers(), new TypeInstType( Type::Qualifiers(), td->get_name(), *i ) ), nullptr ) );
    424427                        assignType->get_parameters().push_back( new ObjectDecl( "", Type::StorageClasses(), LinkageSpec::Cforall, nullptr, new TypeInstType( Type::Qualifiers(), td->get_name(), *i ), nullptr ) );
    425428                        assignType->get_returnVals().push_back( new ObjectDecl( "", Type::StorageClasses(), LinkageSpec::Cforall, nullptr, new TypeInstType( Type::Qualifiers(), td->get_name(), *i ), nullptr ) );
     
    441444          case TypeData::Array:
    442445                return buildArray( td );
     446          case TypeData::Reference:
     447                return buildReference( td );
    443448          case TypeData::Function:
    444449                return buildFunction( td );
     
    619624        buildForall( td->forall, at->get_forall() );
    620625        return at;
    621 } // buildPointer
     626} // buildArray
     627
     628ReferenceType * buildReference( const TypeData * td ) {
     629        ReferenceType * rt;
     630        if ( td->base ) {
     631                rt = new ReferenceType( buildQualifiers( td ), typebuild( td->base ) );
     632        } else {
     633                rt = new ReferenceType( buildQualifiers( td ), new BasicType( Type::Qualifiers(), BasicType::SignedInt ) );
     634        } // if
     635        buildForall( td->forall, rt->get_forall() );
     636        return rt;
     637} // buildReference
    622638
    623639AggregateDecl * buildAggregate( const TypeData * td, std::list< Attribute * > attributes, LinkageSpec::Spec linkage ) {
  • src/Parser/TypeData.h

    raf08051 r28e58fd  
    2626
    2727struct TypeData {
    28         enum Kind { Basic, Pointer, Array, Function, Aggregate, AggregateInst, Enum, EnumConstant, Symbolic,
     28        enum Kind { Basic, Pointer, Array, Reference, Function, Aggregate, AggregateInst, Enum, EnumConstant, Symbolic,
    2929                                SymbolicInst, Tuple, Typeof, Builtin, Unknown };
    3030
     
    109109PointerType * buildPointer( const TypeData * );
    110110ArrayType * buildArray( const TypeData * );
     111ReferenceType * buildReference( const TypeData * );
    111112AggregateDecl * buildAggregate( const TypeData *, std::list< Attribute * > );
    112113ReferenceToType * buildComAggInst( const TypeData *, std::list< Attribute * > attributes, LinkageSpec::Spec linkage );
  • src/Parser/lex.ll

    raf08051 r28e58fd  
    1010 * Created On       : Sat Sep 22 08:58:10 2001
    1111 * Last Modified By : Peter A. Buhr
    12  * Last Modified On : Thu Jul 27 21:46:06 2017
    13  * Update Count     : 550
     12 * Last Modified On : Tue Aug 22 22:43:39 2017
     13 * Update Count     : 558
    1414 */
    1515
     
    4545#define NUMERIC_RETURN(x)       rm_underscore(); RETURN_VAL( x ) // numeric constant
    4646#define KEYWORD_RETURN(x)       RETURN_CHAR( x )                        // keyword
     47#define QKEYWORD_RETURN(x)      typedefTable.isKind( yytext ); RETURN_VAL(x); // quasi-keyword
    4748#define IDENTIFIER_RETURN()     RETURN_VAL( typedefTable.isKind( yytext ) )
    4849#define ATTRIBUTE_RETURN()      RETURN_VAL( ATTR_IDENTIFIER )
     
    236237__label__               { KEYWORD_RETURN(LABEL); }                              // GCC
    237238long                    { KEYWORD_RETURN(LONG); }
    238 lvalue                  { KEYWORD_RETURN(LVALUE); }                             // CFA
    239239monitor                 { KEYWORD_RETURN(MONITOR); }                    // CFA
    240240mutex                   { KEYWORD_RETURN(MUTEX); }                              // CFA
     
    261261throw                   { KEYWORD_RETURN(THROW); }                              // CFA
    262262throwResume             { KEYWORD_RETURN(THROWRESUME); }                // CFA
     263timeout                 { QKEYWORD_RETURN(TIMEOUT); }                   // CFA
    263264trait                   { KEYWORD_RETURN(TRAIT); }                              // CFA
    264265try                             { KEYWORD_RETURN(TRY); }                                // CFA
     
    277278__volatile              { KEYWORD_RETURN(VOLATILE); }                   // GCC
    278279__volatile__    { KEYWORD_RETURN(VOLATILE); }                   // GCC
     280waitfor                 { KEYWORD_RETURN(WAITFOR); }
     281or                              { QKEYWORD_RETURN(WOR); }                               // CFA
     282when                    { KEYWORD_RETURN(WHEN); }
    279283while                   { KEYWORD_RETURN(WHILE); }
    280284with                    { KEYWORD_RETURN(WITH); }                               // CFA
  • src/Parser/parser.yy

    raf08051 r28e58fd  
    1010// Created On       : Sat Sep  1 20:22:55 2001
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sun Aug 20 09:21:54 2017
    13 // Update Count     : 2573
     12// Last Modified On : Wed Aug 23 21:08:08 2017
     13// Update Count     : 2704
    1414//
    1515
     
    119119%token RESTRICT                                                                                 // C99
    120120%token ATOMIC                                                                                   // C11
    121 %token FORALL LVALUE MUTEX VIRTUAL                                              // CFA
     121%token FORALL MUTEX VIRTUAL                                             // CFA
    122122%token VOID CHAR SHORT INT LONG FLOAT DOUBLE SIGNED UNSIGNED
    123123%token BOOL COMPLEX IMAGINARY                                                   // C99
     
    131131%token ATTRIBUTE EXTENSION                                                              // GCC
    132132%token IF ELSE SWITCH CASE DEFAULT DO WHILE FOR BREAK CONTINUE GOTO RETURN
    133 %token CHOOSE DISABLE ENABLE FALLTHRU TRY CATCH CATCHRESUME FINALLY THROW THROWRESUME AT WITH // CFA
     133%token CHOOSE DISABLE ENABLE FALLTHRU TRY CATCH CATCHRESUME FINALLY THROW THROWRESUME AT WITH WHEN WAITFOR // CFA
    134134%token ASM                                                                                              // C99, extension ISO/IEC 9899:1999 Section J.5.10(1)
    135135%token ALIGNAS ALIGNOF GENERIC STATICASSERT                             // C11
     
    137137// names and constants: lexer differentiates between identifier and typedef names
    138138%token<tok> IDENTIFIER                  QUOTED_IDENTIFIER               TYPEDEFname                             TYPEGENname
     139%token<tok> TIMEOUT                             WOR
    139140%token<tok> ATTR_IDENTIFIER             ATTR_TYPEDEFname                ATTR_TYPEGENname
    140141%token<tok> INTEGERconstant             CHARACTERconstant               STRINGliteral
     
    161162%type<tok> identifier  no_attr_identifier
    162163%type<tok> identifier_or_type_name  no_attr_identifier_or_type_name  attr_name
     164%type<tok> quasi_keyword
    163165%type<constant> string_literal
    164166%type<str> string_literal_list
     
    190192%type<sn> iteration_statement                   jump_statement
    191193%type<sn> with_statement                                exception_statement                     asm_statement
     194%type<sn> when_clause_opt                               waitfor_statement                       waitfor_clause                          waitfor                         timeout
    192195%type<sn> fall_through_opt                              fall_through
    193196%type<sn> statement                                             statement_list
     
    197200%type<sn> case_clause                                   case_value_list                         case_label                                      case_label_list
    198201%type<sn> switch_clause_list_opt                switch_clause_list                      choose_clause_list_opt          choose_clause_list
    199 %type<sn> /* handler_list */                    handler_clause                          finally_clause
     202%type<sn> handler_clause                                finally_clause
    200203%type<catch_kind> handler_key
    201204
     
    295298// Handle single shift/reduce conflict for dangling else by shifting the ELSE token. For example, this string
    296299// is ambiguous:
    297 // .---------.                          matches IF '(' comma_expression ')' statement
     300// .---------.                          matches IF '(' comma_expression ')' statement . (reduce)
    298301// if ( C ) S1 else S2
    299 // `-----------------'          matches IF '(' comma_expression ')' statement ELSE statement */
    300 
    301 %nonassoc THEN  // rule precedence for IF '(' comma_expression ')' statement
    302 %nonassoc ELSE  // token precedence for start of else clause in IF statement
     302// `-----------------'          matches IF '(' comma_expression ')' statement . (shift) ELSE statement */
     303// Similar issues exit with the waitfor statement.
     304
     305// Order of these lines matters (low-to-high precedence). THEN is left associative over WOR/TIMEOUT/ELSE, WOR is left
     306// associative over TIMEOUT/ELSE, and TIMEOUT is left associative over ELSE.
     307%precedence THEN        // rule precedence for IF/WAITFOR statement
     308%precedence WOR         // token precedence for start of WOR in WAITFOR statement
     309%precedence TIMEOUT     // token precedence for start of TIMEOUT in WAITFOR statement
     310%precedence ELSE        // token precedence for start of else clause in IF/WAITFOR statement
    303311
    304312%start translation_unit                                                                 // parse-tree root
     
    353361        ;
    354362
     363quasi_keyword:                                                                                  // CFA
     364        TIMEOUT
     365        | WOR
     366        ;
     367
    355368identifier:
    356369        IDENTIFIER
    357370        | ATTR_IDENTIFIER                                                                       // CFA
     371        | quasi_keyword
    358372        ;
    359373
    360374no_attr_identifier:
    361375        IDENTIFIER
     376        | quasi_keyword
    362377        ;
    363378
     
    380395primary_expression:
    381396        IDENTIFIER                                                                                      // typedef name cannot be used as a variable name
     397                { $$ = new ExpressionNode( build_varref( $1 ) ); }
     398        | quasi_keyword
    382399                { $$ = new ExpressionNode( build_varref( $1 ) ); }
    383400        | tuple
     
    548565        | '&'                                                                           { $$ = OperKinds::AddressOf; }
    549566                // GCC, address of label must be handled by semantic check for ref,ref,label
    550 //      | ANDAND                                                                        { $$ = OperKinds::And; }
     567        | ANDAND                                                                        { $$ = OperKinds::And; }
    551568        ;
    552569
     
    670687        conditional_expression
    671688        | unary_expression assignment_operator assignment_expression
    672                 { $$ = new ExpressionNode( build_binary_ptr( $2, $1, $3 ) ); }
     689                { $$ = new ExpressionNode( build_binary_val( $2, $1, $3 ) ); }
    673690        ;
    674691
     
    736753        | jump_statement
    737754        | with_statement
     755        | waitfor_statement
    738756        | exception_statement
    739757        | asm_statement
     
    955973
    956974with_statement:
    957         WITH '(' tuple_expression_list ')' compound_statement
    958                 { $$ = (StatementNode *)0; }                                    // FIX ME
     975        WITH '(' tuple_expression_list ')' statement
     976                { $$ = nullptr; }                                                               // FIX ME
     977        ;
     978
     979when_clause_opt:
     980        // empty
     981                { $$ = nullptr; }                                                               // FIX ME
     982        | WHEN '(' comma_expression ')'
     983                { $$ = nullptr; }                                                               // FIX ME
     984        ;
     985
     986waitfor:
     987        WAITFOR '(' identifier ')'
     988                { $$ = nullptr; }                                                               // FIX ME
     989        | WAITFOR '(' identifier ',' argument_expression_list ')'
     990                { $$ = nullptr; }                                                               // FIX ME
     991        ;
     992
     993timeout:
     994        TIMEOUT '(' comma_expression ')'
     995                { $$ = nullptr; }                                                               // FIX ME
     996        ;
     997
     998waitfor_clause:
     999        when_clause_opt waitfor statement %prec THEN
     1000                { $$ = nullptr; }                                                               // FIX ME
     1001        | when_clause_opt waitfor statement WOR waitfor_clause
     1002                { $$ = nullptr; }                                                               // FIX ME
     1003        | when_clause_opt timeout statement %prec THEN
     1004                { $$ = nullptr; }                                                               // FIX ME
     1005        | when_clause_opt ELSE statement
     1006                { $$ = nullptr; }                                                               // FIX ME
     1007        | when_clause_opt timeout statement WOR when_clause_opt ELSE statement
     1008                { $$ = nullptr; }                                                               // FIX ME
     1009        ;
     1010
     1011waitfor_statement:
     1012        when_clause_opt waitfor statement %prec THEN
     1013                { $$ = nullptr; }                                                               // FIX ME
     1014        | when_clause_opt waitfor statement WOR waitfor_clause
     1015                { $$ = nullptr; }                                                               // FIX ME
    9591016        ;
    9601017
     
    9671024                { $$ = new StatementNode( build_try( $2, $3, $4 ) ); }
    9681025        ;
    969 
    970 //handler_list:
    971 //      handler_clause
    972 //              // ISO/IEC 9899:1999 Section 15.3(6 ) If present, a "..." handler shall be the last handler for its try block.
    973 //      | CATCH '(' ELLIPSIS ')' compound_statement
    974 //              { $$ = new StatementNode( build_catch( 0, $5, true ) ); }
    975 //      | handler_clause CATCH '(' ELLIPSIS ')' compound_statement
    976 //              { $$ = (StatementNode *)$1->set_last( new StatementNode( build_catch( 0, $6, true ) ) ); }
    977 //      | CATCHRESUME '(' ELLIPSIS ')' compound_statement
    978 //              { $$ = new StatementNode( build_catch( 0, $5, true ) ); }
    979 //      | handler_clause CATCHRESUME '(' ELLIPSIS ')' compound_statement
    980 //              { $$ = (StatementNode *)$1->set_last( new StatementNode( build_catch( 0, $6, true ) ) ); }
    981 //      ;
    9821026
    9831027handler_clause:
     
    14391483        | VOLATILE
    14401484                { $$ = DeclarationNode::newTypeQualifier( Type::Volatile ); }
    1441         | LVALUE                                                                                        // CFA
    1442                 { $$ = DeclarationNode::newTypeQualifier( Type::Lvalue ); }
    14431485        | MUTEX
    14441486                { $$ = DeclarationNode::newTypeQualifier( Type::Mutex ); }
     
    22412283with_clause_opt:
    22422284        // empty
    2243                 { $$ = (StatementNode *)0; }                                    // FIX ME
     2285                { $$ = nullptr; }                                                               // FIX ME
    22442286        | WITH '(' tuple_expression_list ')'
    2245                 { $$ = (StatementNode *)0; }                                    // FIX ME
     2287                { $$ = nullptr; }                                                               // FIX ME
    22462288        ;
    22472289
     
    23632405attr_name:                                                                                              // GCC
    23642406        IDENTIFIER
     2407        | quasi_keyword
    23652408        | TYPEDEFname
    23662409        | TYPEGENname
     
    24212464variable_ptr:
    24222465        ptrref_operator variable_declarator
    2423                 { $$ = $2->addPointer( DeclarationNode::newPointer( 0 ) ); }
     2466                { $$ = $2->addPointer( DeclarationNode::newPointer( 0, $1 ) ); }
    24242467        | ptrref_operator type_qualifier_list variable_declarator
    2425                 { $$ = $3->addPointer( DeclarationNode::newPointer( $2 ) ); }
     2468                { $$ = $3->addPointer( DeclarationNode::newPointer( $2, $1 ) ); }
    24262469        | '(' variable_ptr ')' attribute_list_opt
    24272470                { $$ = $2->addQualifiers( $4 ); }                               // redundant parenthesis
     
    24692512function_ptr:
    24702513        ptrref_operator function_declarator
    2471                 { $$ = $2->addPointer( DeclarationNode::newPointer( 0 ) ); }
     2514                { $$ = $2->addPointer( DeclarationNode::newPointer( 0, $1 ) ); }
    24722515        | ptrref_operator type_qualifier_list function_declarator
    2473                 { $$ = $3->addPointer( DeclarationNode::newPointer( $2 ) ); }
     2516                { $$ = $3->addPointer( DeclarationNode::newPointer( $2, $1 ) ); }
    24742517        | '(' function_ptr ')'
    24752518                { $$ = $2; }
     
    25092552KR_function_ptr:
    25102553        ptrref_operator KR_function_declarator
    2511                 { $$ = $2->addPointer( DeclarationNode::newPointer( 0 ) ); }
     2554                { $$ = $2->addPointer( DeclarationNode::newPointer( 0, $1 ) ); }
    25122555        | ptrref_operator type_qualifier_list KR_function_declarator
    2513                 { $$ = $3->addPointer( DeclarationNode::newPointer( $2 ) ); }
     2556                { $$ = $3->addPointer( DeclarationNode::newPointer( $2, $1 ) ); }
    25142557        | '(' KR_function_ptr ')'
    25152558                { $$ = $2; }
     
    25532596type_ptr:
    25542597        ptrref_operator variable_type_redeclarator
    2555                 { $$ = $2->addPointer( DeclarationNode::newPointer( 0 ) ); }
     2598                { $$ = $2->addPointer( DeclarationNode::newPointer( 0, $1 ) ); }
    25562599        | ptrref_operator type_qualifier_list variable_type_redeclarator
    2557                 { $$ = $3->addPointer( DeclarationNode::newPointer( $2 ) ); }
     2600                { $$ = $3->addPointer( DeclarationNode::newPointer( $2, $1 ) ); }
    25582601        | '(' type_ptr ')' attribute_list_opt
    25592602                { $$ = $2->addQualifiers( $4 ); }
     
    25972640identifier_parameter_ptr:
    25982641        ptrref_operator identifier_parameter_declarator
    2599                 { $$ = $2->addPointer( DeclarationNode::newPointer( 0 ) ); }
     2642                { $$ = $2->addPointer( DeclarationNode::newPointer( 0, $1 ) ); }
    26002643        | ptrref_operator type_qualifier_list identifier_parameter_declarator
    2601                 { $$ = $3->addPointer( DeclarationNode::newPointer( $2 ) ); }
     2644                { $$ = $3->addPointer( DeclarationNode::newPointer( $2, $1 ) ); }
    26022645        | '(' identifier_parameter_ptr ')' attribute_list_opt
    26032646                { $$ = $2->addQualifiers( $4 ); }
     
    26572700type_parameter_ptr:
    26582701        ptrref_operator type_parameter_redeclarator
    2659                 { $$ = $2->addPointer( DeclarationNode::newPointer( 0 ) ); }
     2702                { $$ = $2->addPointer( DeclarationNode::newPointer( 0, $1 ) ); }
    26602703        | ptrref_operator type_qualifier_list type_parameter_redeclarator
    2661                 { $$ = $3->addPointer( DeclarationNode::newPointer( $2 ) ); }
     2704                { $$ = $3->addPointer( DeclarationNode::newPointer( $2, $1 ) ); }
    26622705        | '(' type_parameter_ptr ')' attribute_list_opt
    26632706                { $$ = $2->addQualifiers( $4 ); }
     
    27002743abstract_ptr:
    27012744        ptrref_operator
    2702                 { $$ = DeclarationNode::newPointer( 0 ); }
     2745                { $$ = DeclarationNode::newPointer( 0, $1 ); }
    27032746        | ptrref_operator type_qualifier_list
    2704                 { $$ = DeclarationNode::newPointer( $2 ); }
     2747                { $$ = DeclarationNode::newPointer( $2, $1 ); }
    27052748        | ptrref_operator abstract_declarator
    2706                 { $$ = $2->addPointer( DeclarationNode::newPointer( 0 ) ); }
     2749                { $$ = $2->addPointer( DeclarationNode::newPointer( 0, $1 ) ); }
    27072750        | ptrref_operator type_qualifier_list abstract_declarator
    2708                 { $$ = $3->addPointer( DeclarationNode::newPointer( $2 ) ); }
     2751                { $$ = $3->addPointer( DeclarationNode::newPointer( $2, $1 ) ); }
    27092752        | '(' abstract_ptr ')' attribute_list_opt
    27102753                { $$ = $2->addQualifiers( $4 ); }
     
    27892832abstract_parameter_ptr:
    27902833        ptrref_operator
    2791                 { $$ = DeclarationNode::newPointer( nullptr ); }
     2834                { $$ = DeclarationNode::newPointer( nullptr, $1 ); }
    27922835        | ptrref_operator type_qualifier_list
    2793                 { $$ = DeclarationNode::newPointer( $2 ); }
     2836                { $$ = DeclarationNode::newPointer( $2, $1 ); }
    27942837        | ptrref_operator abstract_parameter_declarator
    2795                 { $$ = $2->addPointer( DeclarationNode::newPointer( nullptr ) ); }
     2838                { $$ = $2->addPointer( DeclarationNode::newPointer( nullptr, $1 ) ); }
    27962839        | ptrref_operator type_qualifier_list abstract_parameter_declarator
    2797                 { $$ = $3->addPointer( DeclarationNode::newPointer( $2 ) ); }
     2840                { $$ = $3->addPointer( DeclarationNode::newPointer( $2, $1 ) ); }
    27982841        | '(' abstract_parameter_ptr ')' attribute_list_opt
    27992842                { $$ = $2->addQualifiers( $4 ); }
     
    28682911variable_abstract_ptr:
    28692912        ptrref_operator
    2870                 { $$ = DeclarationNode::newPointer( 0 ); }
     2913                { $$ = DeclarationNode::newPointer( 0, $1 ); }
    28712914        | ptrref_operator type_qualifier_list
    2872                 { $$ = DeclarationNode::newPointer( $2 ); }
     2915                { $$ = DeclarationNode::newPointer( $2, $1 ); }
    28732916        | ptrref_operator variable_abstract_declarator
    2874                 { $$ = $2->addPointer( DeclarationNode::newPointer( 0 ) ); }
     2917                { $$ = $2->addPointer( DeclarationNode::newPointer( 0, $1 ) ); }
    28752918        | ptrref_operator type_qualifier_list variable_abstract_declarator
    2876                 { $$ = $3->addPointer( DeclarationNode::newPointer( $2 ) ); }
     2919                { $$ = $3->addPointer( DeclarationNode::newPointer( $2, $1 ) ); }
    28772920        | '(' variable_abstract_ptr ')' attribute_list_opt
    28782921                { $$ = $2->addQualifiers( $4 ); }
     
    29142957                // No SUE declaration in parameter list.
    29152958        ptrref_operator type_specifier_nobody
    2916                 { $$ = $2->addNewPointer( DeclarationNode::newPointer( 0 ) ); }
     2959                { $$ = $2->addNewPointer( DeclarationNode::newPointer( 0, $1 ) ); }
    29172960        | type_qualifier_list ptrref_operator type_specifier_nobody
    2918                 { $$ = $3->addNewPointer( DeclarationNode::newPointer( $1 ) ); }
     2961                { $$ = $3->addNewPointer( DeclarationNode::newPointer( $1, $2 ) ); }
    29192962        | ptrref_operator cfa_abstract_function
    2920                 { $$ = $2->addNewPointer( DeclarationNode::newPointer( 0 ) ); }
     2963                { $$ = $2->addNewPointer( DeclarationNode::newPointer( 0, $1 ) ); }
    29212964        | type_qualifier_list ptrref_operator cfa_abstract_function
    2922                 { $$ = $3->addNewPointer( DeclarationNode::newPointer( $1 ) ); }
     2965                { $$ = $3->addNewPointer( DeclarationNode::newPointer( $1, $2 ) ); }
    29232966        | ptrref_operator cfa_identifier_parameter_declarator_tuple
    2924                 { $$ = $2->addNewPointer( DeclarationNode::newPointer( 0 ) ); }
     2967                { $$ = $2->addNewPointer( DeclarationNode::newPointer( 0, $1 ) ); }
    29252968        | type_qualifier_list ptrref_operator cfa_identifier_parameter_declarator_tuple
    2926                 { $$ = $3->addNewPointer( DeclarationNode::newPointer( $1 ) ); }
     2969                { $$ = $3->addNewPointer( DeclarationNode::newPointer( $1, $2 ) ); }
    29272970        ;
    29282971
     
    30023045cfa_abstract_ptr:                                                                               // CFA
    30033046        ptrref_operator type_specifier
    3004                 { $$ = $2->addNewPointer( DeclarationNode::newPointer( 0 ) ); }
     3047                { $$ = $2->addNewPointer( DeclarationNode::newPointer( 0, $1 ) ); }
    30053048        | type_qualifier_list ptrref_operator type_specifier
    3006                 { $$ = $3->addNewPointer( DeclarationNode::newPointer( $1 ) ); }
     3049                { $$ = $3->addNewPointer( DeclarationNode::newPointer( $1, $2 ) ); }
    30073050        | ptrref_operator cfa_abstract_function
    3008                 { $$ = $2->addNewPointer( DeclarationNode::newPointer( 0 ) ); }
     3051                { $$ = $2->addNewPointer( DeclarationNode::newPointer( 0, $1 ) ); }
    30093052        | type_qualifier_list ptrref_operator cfa_abstract_function
    3010                 { $$ = $3->addNewPointer( DeclarationNode::newPointer( $1 ) ); }
     3053                { $$ = $3->addNewPointer( DeclarationNode::newPointer( $1, $2 ) ); }
    30113054        | ptrref_operator cfa_abstract_declarator_tuple
    3012                 { $$ = $2->addNewPointer( DeclarationNode::newPointer( 0 ) ); }
     3055                { $$ = $2->addNewPointer( DeclarationNode::newPointer( 0, $1 ) ); }
    30133056        | type_qualifier_list ptrref_operator cfa_abstract_declarator_tuple
    3014                 { $$ = $3->addNewPointer( DeclarationNode::newPointer( $1 ) ); }
     3057                { $$ = $3->addNewPointer( DeclarationNode::newPointer( $1, $2 ) ); }
    30153058        ;
    30163059
  • src/ResolvExpr/Alternative.cc

    raf08051 r28e58fd  
    3434                : cost( cost ), cvtCost( cvtCost ), expr( expr ), env( env ) {}
    3535
    36         Alternative::Alternative( const Alternative &other ) {
    37                 initialize( other, *this );
     36        Alternative::Alternative( const Alternative &other ) : cost( other.cost ), cvtCost( other.cvtCost ), expr( maybeClone( other.expr ) ), env( other.env ) {
    3837        }
    3938
    4039        Alternative &Alternative::operator=( const Alternative &other ) {
    4140                if ( &other == this ) return *this;
    42                 initialize( other, *this );
     41                delete expr;
     42                cost = other.cost;
     43                cvtCost = other.cvtCost;
     44                expr = maybeClone( other.expr );
     45                env = other.env;
    4346                return *this;
    4447        }
     
    5760                other.expr = nullptr;
    5861                return *this;
    59         }
    60 
    61         void Alternative::initialize( const Alternative &src, Alternative &dest ) {
    62                 dest.cost = src.cost;
    63                 dest.cvtCost = src.cvtCost;
    64                 dest.expr = maybeClone( src.expr );
    65                 dest.env = src.env;
    6662        }
    6763
  • src/ResolvExpr/Alternative.h

    raf08051 r28e58fd  
    3939                ~Alternative();
    4040
    41                 void initialize( const Alternative &src, Alternative &dest );
    42 
    4341                void print( std::ostream &os, int indent = 0 ) const;
    4442
  • src/ResolvExpr/AlternativeFinder.cc

    raf08051 r28e58fd  
    6767
    6868        Cost sumCost( const AltList &in ) {
    69                 Cost total;
     69                Cost total = Cost::zero;
    7070                for ( AltList::const_iterator i = in.begin(); i != in.end(); ++i ) {
    7171                        total += i->cost;
     
    144144                        expr->get_result()->accept( global_renamer );
    145145                }
    146         }
     146
     147                void referenceToRvalueConversion( Expression *& expr ) {
     148                        if ( dynamic_cast< ReferenceType * >( expr->get_result() ) ) {
     149                                // cast away reference from expr
     150                                expr = new CastExpr( expr, expr->get_result()->stripReferences()->clone() );
     151                        }
     152                }
     153        } // namespace
    147154
    148155        template< typename InputIterator, typename OutputIterator >
     
    186193                        if ( alternatives.begin() == oldBegin ) {
    187194                                std::ostringstream stream;
    188                                 stream << "Can't choose between " << alternatives.size() << " alternatives for expression ";
     195                                AltList winners;
     196                                findMinCost( alternatives.begin(), alternatives.end(), back_inserter( winners ) );
     197                                stream << "Can't choose between " << winners.size() << " alternatives for expression ";
    189198                                expr->print( stream );
    190199                                stream << "Alternatives are:";
    191                                 AltList winners;
    192                                 findMinCost( alternatives.begin(), alternatives.end(), back_inserter( winners ) );
    193200                                printAlts( winners, stream, 8 );
    194201                                throw SemanticError( stream.str() );
     
    213220        void AlternativeFinder::addAnonConversions( const Alternative & alt ) {
    214221                // adds anonymous member interpretations whenever an aggregate value type is seen.
    215                 Expression * expr = alt.expr->clone();
    216                 std::unique_ptr< Expression > manager( expr ); // RAII for expr
    217                 alt.env.apply( expr->get_result() );
    218                 if ( StructInstType *structInst = dynamic_cast< StructInstType* >( expr->get_result() ) ) {
     222                // it's okay for the aggregate expression to have reference type -- cast it to the base type to treat the aggregate as the referenced value
     223                std::unique_ptr<Expression> aggrExpr( alt.expr->clone() );
     224                alt.env.apply( aggrExpr->get_result() );
     225                Type * aggrType = aggrExpr->get_result();
     226                if ( dynamic_cast< ReferenceType * >( aggrType ) ) {
     227                        aggrType = aggrType->stripReferences();
     228                        aggrExpr.reset( new CastExpr( aggrExpr.release(), aggrType->clone() ) );
     229                }
     230
     231                if ( StructInstType *structInst = dynamic_cast< StructInstType* >( aggrExpr->get_result() ) ) {
    219232                        NameExpr nameExpr( "" );
    220                         addAggMembers( structInst, expr, alt.cost+Cost( 0, 0, 1 ), alt.env, &nameExpr );
    221                 } else if ( UnionInstType *unionInst = dynamic_cast< UnionInstType* >( expr->get_result() ) ) {
     233                        addAggMembers( structInst, aggrExpr.get(), alt.cost+Cost::safe, alt.env, &nameExpr );
     234                } else if ( UnionInstType *unionInst = dynamic_cast< UnionInstType* >( aggrExpr->get_result() ) ) {
    222235                        NameExpr nameExpr( "" );
    223                         addAggMembers( unionInst, expr, alt.cost+Cost( 0, 0, 1 ), alt.env, &nameExpr );
     236                        addAggMembers( unionInst, aggrExpr.get(), alt.cost+Cost::safe, alt.env, &nameExpr );
    224237                } // if
    225238        }
     
    228241        void AlternativeFinder::addAggMembers( StructOrUnionType *aggInst, Expression *expr, const Cost &newCost, const TypeEnvironment & env, Expression * member ) {
    229242                // by this point, member must be a name expr
    230                 NameExpr * nameExpr = safe_dynamic_cast< NameExpr * >( member );
     243                NameExpr * nameExpr = dynamic_cast< NameExpr * >( member );
     244                if ( ! nameExpr ) return;
    231245                const std::string & name = nameExpr->get_name();
    232246                std::list< Declaration* > members;
     
    250264                        // during parsing and reusing that information here.
    251265                        std::stringstream ss( constantExpr->get_constant()->get_value() );
    252                         int val;
     266                        int val = 0;
    253267                        std::string tmp;
    254268                        if ( ss >> val && ! (ss >> tmp) ) {
     
    277291                FunctionType *function = safe_dynamic_cast< FunctionType* >( pointer->get_base() );
    278292
    279                 Cost convCost( 0, 0, 0 );
     293                Cost convCost = Cost::zero;
    280294                std::list< DeclarationWithType* >& formals = function->get_parameters();
    281295                std::list< DeclarationWithType* >::iterator formal = formals.begin();
     
    290304                                actualType->print( std::cerr, 8 );
    291305                        )
    292                         Cost actualCost;
     306                        Cost actualCost = Cost::zero;
    293307                        if ( formal == formals.end() ) {
    294308                                if ( function->get_isVarArgs() ) {
    295                                         convCost += Cost( 1, 0, 0 );
     309                                        convCost.incUnsafe();
     310                                        // convert reference-typed expressions to value-typed expressions
     311                                        referenceToRvalueConversion( *actualExpr );
    296312                                        continue;
    297313                                } else {
     
    305321                                std::cerr << std::endl << " to ";
    306322                                formalType->print( std::cerr, 8 );
     323                                std::cerr << std::endl << "environment is: ";
     324                                alt.env.print( std::cerr, 8 );
     325                                std::cerr << std::endl;
    307326                        )
    308327                        Cost newCost = conversionCost( actualType, formalType, indexer, alt.env );
     
    316335                        convCost += newCost;
    317336                        actualCost += newCost;
    318                         if ( actualCost != Cost( 0, 0, 0 ) ) {
     337                        if ( actualCost != Cost::zero ) {
    319338                                Type *newType = formalType->clone();
    320339                                alt.env.apply( newType );
    321340                                *actualExpr = new CastExpr( *actualExpr, newType );
    322341                        }
    323                         convCost += Cost( 0, polyCost( formalType, alt.env, indexer ) + polyCost( actualType, alt.env, indexer ), 0 );
     342                        convCost.incPoly( polyCost( formalType, alt.env, indexer ) + polyCost( actualType, alt.env, indexer ) );
    324343                        ++formal; // can't be in for-loop update because of the continue
    325344                }
     
    343362                        }
    344363                        convCost += newCost;
    345                         convCost += Cost( 0, polyCost( assert->second.formalType, alt.env, indexer ) + polyCost( assert->second.actualType, alt.env, indexer ), 0 );
     364                        convCost.incPoly( polyCost( assert->second.formalType, alt.env, indexer ) + polyCost( assert->second.actualType, alt.env, indexer ) );
    346365                }
    347366
     
    400419                        Expression * actual = actualIt->expr;
    401420                        Type * actualType = actual->get_result();
     421
    402422                        PRINT(
    403423                                std::cerr << "formal type is ";
     
    408428                        )
    409429                        if ( ! unify( formalType, actualType, resultEnv, resultNeed, resultHave, openVars, indexer ) ) {
     430                                // std::cerr << "unify failed" << std::endl;
    410431                                return false;
    411432                        }
     
    452473                        // match flattened actuals with formal parameters - actuals will be grouped to match
    453474                        // with formals as appropriate
    454                         Cost cost;
     475                        Cost cost = Cost::zero;
    455476                        std::list< Expression * > newExprs;
    456477                        ObjectDecl * obj = safe_dynamic_cast< ObjectDecl * >( formal );
     
    613634                AssertionSet newNeed;
    614635                //AssertionParentSet needParents;
     636                PRINT(
     637                        std::cerr << "env is: " << std::endl;
     638                        newAlt.env.print( std::cerr, 0 );
     639                        std::cerr << std::endl;
     640                )
     641
    615642                inferRecursive( need.begin(), need.end(), newAlt, openVars, decls, newNeed, /*needParents,*/ 0, indexer, out );
    616643//      PRINT(
     
    643670                        makeExprList( instantiatedActuals, appExpr->get_args() );
    644671                        PRINT(
     672                                std::cerr << "instantiate function success: " << appExpr << std::endl;
    645673                                std::cerr << "need assertions:" << std::endl;
    646674                                printAssertionSet( resultNeed, std::cerr, 8 );
     
    663691                                UntypedExpr *vexpr = untypedExpr->clone();
    664692                                vexpr->set_result( pt.clone() );
    665                                 alternatives.push_back( Alternative( vexpr, env, Cost()) );
     693                                alternatives.push_back( Alternative( vexpr, env, Cost::zero) );
    666694                                return;
    667695                        }
     
    681709                AltList candidates;
    682710                SemanticError errors;
    683                 for ( AltList::const_iterator func = funcFinder.alternatives.begin(); func != funcFinder.alternatives.end(); ++func ) {
     711                for ( AltList::iterator func = funcFinder.alternatives.begin(); func != funcFinder.alternatives.end(); ++func ) {
    684712                        try {
    685713                                PRINT(
     
    688716                                )
    689717                                // check if the type is pointer to function
    690                                 PointerType *pointer;
    691                                 if ( ( pointer = dynamic_cast< PointerType* >( func->expr->get_result() ) ) ) {
     718                                if ( PointerType *pointer = dynamic_cast< PointerType* >( func->expr->get_result()->stripReferences() ) ) {
    692719                                        if ( FunctionType *function = dynamic_cast< FunctionType* >( pointer->get_base() ) ) {
     720                                                referenceToRvalueConversion( func->expr );
    693721                                                for ( std::list< AltList >::iterator actualAlt = possibilities.begin(); actualAlt != possibilities.end(); ++actualAlt ) {
    694722                                                        // XXX
     
    696724                                                        makeFunctionAlternatives( *func, function, *actualAlt, std::back_inserter( candidates ) );
    697725                                                }
    698                                         } else if ( TypeInstType *typeInst = dynamic_cast< TypeInstType* >( pointer->get_base() ) ) {
    699                                                 EqvClass eqvClass;
    700                                                 if ( func->env.lookup( typeInst->get_name(), eqvClass ) && eqvClass.type ) {
    701                                                         if ( FunctionType *function = dynamic_cast< FunctionType* >( eqvClass.type ) ) {
    702                                                                 for ( std::list< AltList >::iterator actualAlt = possibilities.begin(); actualAlt != possibilities.end(); ++actualAlt ) {
    703                                                                         makeFunctionAlternatives( *func, function, *actualAlt, std::back_inserter( candidates ) );
    704                                                                 } // for
    705                                                         } // if
     726                                        }
     727                                } else if ( TypeInstType *typeInst = dynamic_cast< TypeInstType* >( func->expr->get_result()->stripReferences() ) ) { // handle ftype (e.g. *? on function pointer)
     728                                        referenceToRvalueConversion( func->expr );
     729                                        EqvClass eqvClass;
     730                                        if ( func->env.lookup( typeInst->get_name(), eqvClass ) && eqvClass.type ) {
     731                                                if ( FunctionType *function = dynamic_cast< FunctionType* >( eqvClass.type ) ) {
     732                                                        for ( std::list< AltList >::iterator actualAlt = possibilities.begin(); actualAlt != possibilities.end(); ++actualAlt ) {
     733                                                                makeFunctionAlternatives( *func, function, *actualAlt, std::back_inserter( candidates ) );
     734                                                        } // for
    706735                                                } // if
    707736                                        } // if
     
    722751                                        }
    723752
    724                                         for ( AltList::const_iterator funcOp = funcOpFinder.alternatives.begin(); funcOp != funcOpFinder.alternatives.end(); ++funcOp ) {
     753                                        for ( AltList::iterator funcOp = funcOpFinder.alternatives.begin(); funcOp != funcOpFinder.alternatives.end(); ++funcOp ) {
    725754                                                // check if the type is pointer to function
    726                                                 PointerType *pointer;
    727                                                 if ( ( pointer = dynamic_cast< PointerType* >( funcOp->expr->get_result() ) ) ) {
     755                                                if ( PointerType *pointer = dynamic_cast< PointerType* >( funcOp->expr->get_result()->stripReferences() ) ) {
    728756                                                        if ( FunctionType *function = dynamic_cast< FunctionType* >( pointer->get_base() ) ) {
     757                                                                referenceToRvalueConversion( funcOp->expr );
    729758                                                                for ( std::list< AltList >::iterator actualAlt = possibilities.begin(); actualAlt != possibilities.end(); ++actualAlt ) {
    730759                                                                        AltList currentAlt;
     
    753782                                PointerType *pointer = safe_dynamic_cast< PointerType* >( appExpr->get_function()->get_result() );
    754783                                FunctionType *function = safe_dynamic_cast< FunctionType* >( pointer->get_base() );
    755                                 std::cerr << "Case +++++++++++++" << std::endl;
     784                                std::cerr << "Case +++++++++++++ " << appExpr->get_function() << std::endl;
    756785                                std::cerr << "formals are:" << std::endl;
    757786                                printAll( function->get_parameters(), std::cerr, 8 );
     
    796825        bool isLvalue( Expression *expr ) {
    797826                // xxx - recurse into tuples?
    798                 return expr->has_result() && expr->get_result()->get_lvalue();
     827                return expr->has_result() && ( expr->get_result()->get_lvalue() || dynamic_cast< ReferenceType * >( expr->get_result() ) );
    799828        }
    800829
     
    810839
    811840        Expression * restructureCast( Expression * argExpr, Type * toType ) {
    812                 if ( argExpr->get_result()->size() > 1 && ! toType->isVoid() ) {
    813                         // Argument expression is a tuple and the target type is not void. Cast each member of the tuple
    814                         // to its corresponding target type, producing the tuple of those cast expressions. If there are
    815                         // more components of the tuple than components in the target type, then excess components do not
    816                         // come out in the result expression (but UniqueExprs ensure that side effects will still be done).
    817                         if ( Tuples::maybeImpure( argExpr ) && ! dynamic_cast< UniqueExpr * >( argExpr ) ) {
     841                if ( argExpr->get_result()->size() > 1 && ! toType->isVoid() && ! dynamic_cast<ReferenceType *>( toType ) ) {
     842                        // Argument expression is a tuple and the target type is not void and not a reference type.
     843                        // Cast each member of the tuple to its corresponding target type, producing the tuple of those
     844                        // cast expressions. If there are more components of the tuple than components in the target type,
     845                        // then excess components do not come out in the result expression (but UniqueExprs ensure that
     846                        // side effects will still be done).
     847                        if ( Tuples::maybeImpureIgnoreUnique( argExpr ) ) {
    818848                                // expressions which may contain side effects require a single unique instance of the expression.
    819849                                argExpr = new UniqueExpr( argExpr );
     
    855885                        // that are cast directly.  The candidate is invalid if it has fewer results than there are types to cast
    856886                        // to.
    857                         int discardedValues = (*i).expr->get_result()->size() - castExpr->get_result()->size();
     887                        int discardedValues = i->expr->get_result()->size() - castExpr->get_result()->size();
    858888                        if ( discardedValues < 0 ) continue;
    859889                        // xxx - may need to go into tuple types and extract relevant types and use unifyList. Note that currently, this does not
    860890                        // allow casting a tuple to an atomic type (e.g. (int)([1, 2, 3]))
    861891                        // unification run for side-effects
    862                         unify( castExpr->get_result(), (*i).expr->get_result(), i->env, needAssertions, haveAssertions, openVars, indexer );
    863                         Cost thisCost = castCost( (*i).expr->get_result(), castExpr->get_result(), indexer, i->env );
     892                        unify( castExpr->get_result(), i->expr->get_result(), i->env, needAssertions, haveAssertions, openVars, indexer );
     893                        Cost thisCost = castCost( i->expr->get_result(), castExpr->get_result(), indexer, i->env );
    864894                        if ( thisCost != Cost::infinity ) {
    865895                                // count one safe conversion for each value that is thrown away
    866                                 thisCost += Cost( 0, 0, discardedValues );
     896                                thisCost.incSafe( discardedValues );
    867897
    868898                                candidates.push_back( Alternative( restructureCast( i->expr->clone(), toType ), i->env, i->cost, thisCost ) );
     
    895925                funcFinder.findWithAdjustment( memberExpr->get_aggregate() );
    896926                for ( AltList::const_iterator agg = funcFinder.alternatives.begin(); agg != funcFinder.alternatives.end(); ++agg ) {
    897                         if ( StructInstType *structInst = dynamic_cast< StructInstType* >( agg->expr->get_result() ) ) {
    898                                 addAggMembers( structInst, agg->expr, agg->cost, agg->env, memberExpr->get_member() );
    899                         } else if ( UnionInstType *unionInst = dynamic_cast< UnionInstType* >( agg->expr->get_result() ) ) {
    900                                 addAggMembers( unionInst, agg->expr, agg->cost, agg->env, memberExpr->get_member() );
    901                         } else if ( TupleType * tupleType = dynamic_cast< TupleType * >( agg->expr->get_result() ) ) {
    902                                 addTupleMembers( tupleType, agg->expr, agg->cost, agg->env, memberExpr->get_member() );
     927                        // it's okay for the aggregate expression to have reference type -- cast it to the base type to treat the aggregate as the referenced value
     928                        std::unique_ptr<Expression> aggrExpr( agg->expr->clone() );
     929                        Type * aggrType = aggrExpr->get_result();
     930                        if ( dynamic_cast< ReferenceType * >( aggrType ) ) {
     931                                aggrType = aggrType->stripReferences();
     932                                aggrExpr.reset( new CastExpr( aggrExpr.release(), aggrType->clone() ) );
     933                        }
     934                        // find member of the given type
     935                        if ( StructInstType *structInst = dynamic_cast< StructInstType* >( aggrExpr->get_result() ) ) {
     936                                addAggMembers( structInst, aggrExpr.get(), agg->cost, agg->env, memberExpr->get_member() );
     937                        } else if ( UnionInstType *unionInst = dynamic_cast< UnionInstType* >( aggrExpr->get_result() ) ) {
     938                                addAggMembers( unionInst, aggrExpr.get(), agg->cost, agg->env, memberExpr->get_member() );
     939                        } else if ( TupleType * tupleType = dynamic_cast< TupleType * >( aggrExpr->get_result() ) ) {
     940                                addTupleMembers( tupleType, aggrExpr.get(), agg->cost, agg->env, memberExpr->get_member() );
    903941                        } // if
    904942                } // for
     
    915953                for ( std::list< DeclarationWithType* >::iterator i = declList.begin(); i != declList.end(); ++i ) {
    916954                        VariableExpr newExpr( *i, nameExpr->get_argName() );
    917                         alternatives.push_back( Alternative( newExpr.clone(), env, Cost() ) );
     955                        alternatives.push_back( Alternative( newExpr.clone(), env, Cost::zero ) );
    918956                        PRINT(
    919957                                std::cerr << "decl is ";
     
    955993                        // return the lowest cost alternative for the argument
    956994                        Alternative &choice = winners.front();
     995                        referenceToRvalueConversion( choice.expr );
    957996                        alternatives.push_back( Alternative( new SizeofExpr( choice.expr->clone() ), choice.env, Cost::zero ) );
    958997                } // if
     
    9751014                        // return the lowest cost alternative for the argument
    9761015                        Alternative &choice = winners.front();
     1016                        referenceToRvalueConversion( choice.expr );
    9771017                        alternatives.push_back( Alternative( new AlignofExpr( choice.expr->clone() ), choice.env, Cost::zero ) );
    9781018                } // if
     
    10591099                        for ( std::list< DeclarationWithType* >::iterator i = attrList.begin(); i != attrList.end(); ++i ) {
    10601100                                VariableExpr newExpr( *i );
    1061                                 alternatives.push_back( Alternative( newExpr.clone(), env, Cost() ) );
     1101                                alternatives.push_back( Alternative( newExpr.clone(), env, Cost::zero ) );
    10621102                                renameTypes( alternatives.back().expr );
    10631103                        } // for
     
    12321272                                if ( thisCost != Cost::infinity ) {
    12331273                                        // count one safe conversion for each value that is thrown away
    1234                                         thisCost += Cost( 0, 0, discardedValues );
     1274                                        thisCost.incSafe( discardedValues );
    12351275                                        candidates.push_back( Alternative( new InitExpr( restructureCast( alt.expr->clone(), toType ), initAlt.designation->clone() ), newEnv, alt.cost, thisCost ) );
    12361276                                }
  • src/ResolvExpr/CastCost.cc

    raf08051 r28e58fd  
    4949                                assert( type );
    5050                                if ( type->get_base() ) {
    51                                         return castCost( src, type->get_base(), indexer, env ) + Cost( 0, 0, 1 );
     51                                        return castCost( src, type->get_base(), indexer, env ) + Cost::safe;
    5252                                } // if
    5353                        } // if
    5454                } // if
    5555                if ( typesCompatibleIgnoreQualifiers( src, dest, indexer, env ) ) {
    56                         return Cost( 0, 0, 0 );
     56                        return Cost::zero;
    5757                } else if ( dynamic_cast< VoidType* >( dest ) ) {
    58                         return Cost( 0, 0, 1 );
     58                        return Cost::safe;
     59                } else if ( ReferenceType * refType = dynamic_cast< ReferenceType * > ( dest ) ) {
     60                        return convertToReferenceCost( src, refType, indexer, env );
    5961                } else {
    6062                        CastCost converter( dest, indexer, env );
     
    6466                        } else {
    6567                                // xxx - why are we adding cost 0 here?
    66                                 return converter.get_cost() + Cost( 0, 0, 0 );
     68                                return converter.get_cost() + Cost::zero;
    6769                        } // if
    6870                } // if
     
    7779                if ( destAsPointer && basicType->isInteger() ) {
    7880                        // necessary for, e.g. unsigned long => void*
    79                         cost = Cost( 1, 0, 0 );
     81                        cost = Cost::unsafe;
    8082                } else {
    81                         ConversionCost::visit( basicType );
     83                        cost = conversionCost( basicType, dest, indexer, env );
    8284                } // if
    8385        }
     
    8688                if ( PointerType *destAsPtr = dynamic_cast< PointerType* >( dest ) ) {
    8789                        if ( pointerType->get_qualifiers() <= destAsPtr->get_qualifiers() && typesCompatibleIgnoreQualifiers( pointerType->get_base(), destAsPtr->get_base(), indexer, env ) ) {
    88                                 cost = Cost( 0, 0, 1 );
     90                                cost = Cost::safe;
    8991                        } else {
    9092                                TypeEnvironment newEnv( env );
     
    9395                                int castResult = ptrsCastable( pointerType->get_base(), destAsPtr->get_base(), newEnv, indexer );
    9496                                if ( castResult > 0 ) {
    95                                         cost = Cost( 0, 0, 1 );
     97                                        cost = Cost::safe;
    9698                                } else if ( castResult < 0 ) {
    9799                                        cost = Cost::infinity;
     
    101103                        if ( destAsBasic->isInteger() ) {
    102104                                // necessary for, e.g. void* => unsigned long
    103                                 cost = Cost( 1, 0, 0 );
     105                                cost = Cost::unsafe;
    104106                        } // if
    105107                }
  • src/ResolvExpr/CommonType.cc

    raf08051 r28e58fd  
    2626#include "typeops.h"                     // for isFtype
    2727
    28 
    29 /// #define DEBUG
     28// #define DEBUG
    3029
    3130namespace ResolvExpr {
     
    3938                virtual void visit( PointerType *pointerType );
    4039                virtual void visit( ArrayType *arrayType );
     40                virtual void visit( ReferenceType *refType );
    4141                virtual void visit( FunctionType *functionType );
    4242                virtual void visit( StructInstType *aggregateUseType );
     
    5050                virtual void visit( OneType *oneType );
    5151
    52                 void getCommonWithVoidPointer( PointerType* voidPointer, PointerType* otherPointer );
     52                template< typename Pointer > void getCommonWithVoidPointer( Pointer* voidPointer, Pointer* otherPointer );
     53                template< typename RefType > void handleRefType( RefType *inst, Type *other );
    5354
    5455                Type *result;
     
    6061        };
    6162
     63        Type * handleReference( ReferenceType * refType, Type * other, bool widenFirst, bool widenSecond, const SymTab::Indexer &indexer, TypeEnvironment & env, const OpenVarSet &openVars ) {
     64                Type * result = nullptr, * common = nullptr;
     65                AssertionSet have, need;
     66                OpenVarSet newOpen( openVars );
     67                // need unify to bind type variables
     68                if ( unify( refType->get_base(), other, env, have, need, newOpen, indexer, common ) ) {
     69                        // std::cerr << "unify success" << std::endl;
     70                        if ( widenSecond ) {
     71                                // std::cerr << "widen second" << std::endl;
     72                                if ( widenFirst || other->get_qualifiers() <= refType->get_qualifiers() ) {
     73                                        result = new ReferenceType( refType->get_qualifiers(), common ); // refType->clone();
     74                                        result->get_qualifiers() |= other->get_qualifiers();
     75                                }
     76                        } else if ( widenFirst ) {
     77                                // std::cerr << "widen first" << std::endl;
     78                                if ( widenSecond || refType->get_qualifiers() <= other->get_qualifiers() ) {
     79                                        result = common;
     80                                        result->get_qualifiers() |= refType->get_qualifiers();
     81                                }
     82                        }
     83                } else {
     84                        // std::cerr << "exact unify failed: " << refType << " " << other << std::endl;
     85                }
     86                // std::cerr << "common type of reference [" << refType << "] and non-reference [" << other << "] is [" << result << "]" << std::endl;
     87                return result;
     88        }
     89
    6290        Type *commonType( Type *type1, Type *type2, bool widenFirst, bool widenSecond, const SymTab::Indexer &indexer, TypeEnvironment &env, const OpenVarSet &openVars ) {
    6391                CommonType visitor( type2, widenFirst, widenSecond, indexer, env, openVars );
     92
     93                int depth1 = type1->referenceDepth();
     94                int depth2 = type2->referenceDepth();
     95                if ( depth1 > 0 || depth2 > 0 ) {
     96                        int diff = depth1-depth2;
     97                        // TODO: should it be possible for commonType to generate complicated conversions? I would argue no, only conversions that involve types of the same reference level or a difference of 1 should be allowed.
     98                        if ( diff > 1 || diff < -1 ) return nullptr;
     99
     100                        // special case where one type has a reference depth of 1 larger than the other
     101                        if ( diff > 0 ) {
     102                                return handleReference( safe_dynamic_cast<ReferenceType *>( type1 ), type2, widenFirst, widenSecond, indexer, env, openVars );
     103                        } else if ( diff < 0 ) {
     104                                return handleReference( safe_dynamic_cast<ReferenceType *>( type2 ), type1, widenSecond, widenFirst, indexer, env, openVars );
     105                        }
     106                        // otherwise, both are reference types of the same depth and this is handled by the CommonType visitor.
     107                }
     108
    64109                type1->accept( visitor );
    65110                Type *result = visitor.get_result();
     
    88133                } // if
    89134#ifdef DEBUG
    90                 std::cout << "============= commonType" << std::endl << "type1 is ";
    91                 type1->print( std::cout );
    92                 std::cout << " type2 is ";
    93                 type2->print( std::cout );
     135                std::cerr << "============= commonType" << std::endl << "type1 is ";
     136                type1->print( std::cerr );
     137                std::cerr << " type2 is ";
     138                type2->print( std::cerr );
    94139                if ( result ) {
    95                         std::cout << " common type is ";
    96                         result->print( std::cout );
     140                        std::cerr << " common type is ";
     141                        result->print( std::cerr );
    97142                } else {
    98                         std::cout << " no common type";
    99                 } // if
    100                 std::cout << std::endl;
     143                        std::cerr << " no common type";
     144                } // if
     145                std::cerr << std::endl;
    101146#endif
    102147                return result;
     
    150195        }
    151196
    152         void CommonType::getCommonWithVoidPointer( PointerType* voidPointer, PointerType* otherPointer ) {
     197        template< typename Pointer >
     198        void CommonType::getCommonWithVoidPointer( Pointer* voidPointer, Pointer* otherPointer ) {
    153199                if ( TypeInstType* var = dynamic_cast< TypeInstType* >( otherPointer->get_base() ) ) {
    154200                        OpenVarSet::const_iterator entry = openVars.find( var->get_name() );
     
    165211        void CommonType::visit( PointerType *pointerType ) {
    166212                if ( PointerType *otherPointer = dynamic_cast< PointerType* >( type2 ) ) {
     213                        // std::cerr << "commonType: two pointers: " << pointerType << " / " << otherPointer << std::endl;
    167214                        if ( widenFirst && dynamic_cast< VoidType* >( otherPointer->get_base() ) && ! isFtype(pointerType->get_base()) ) {
    168215                                getCommonWithVoidPointer( otherPointer, pointerType );
     
    171218                        } else if ( ( pointerType->get_base()->get_qualifiers() >= otherPointer->get_base()->get_qualifiers() || widenFirst )
    172219                                           && ( pointerType->get_base()->get_qualifiers() <= otherPointer->get_base()->get_qualifiers() || widenSecond ) ) {
     220                                // std::cerr << "middle case" << std::endl;
    173221                                Type::Qualifiers tq1 = pointerType->get_base()->get_qualifiers(), tq2 = otherPointer->get_base()->get_qualifiers();
    174222                                pointerType->get_base()->get_qualifiers() = Type::Qualifiers();
     
    177225                                OpenVarSet newOpen( openVars );
    178226                                if ( unifyExact( pointerType->get_base(), otherPointer->get_base(), env, have, need, newOpen, indexer ) ) {
     227                                        // std::cerr << "unifyExact success" << std::endl;
    179228                                        if ( tq1 < tq2 ) {
    180229                                                result = pointerType->clone();
     
    184233                                        result->get_qualifiers() = tq1 | tq2;
    185234                                } else {
    186                                         /// std::cout << "place for ptr-to-type" << std::endl;
     235                                        /// std::cerr << "place for ptr-to-type" << std::endl;
    187236                                } // if
    188237                                pointerType->get_base()->get_qualifiers() = tq1;
     
    196245
    197246        void CommonType::visit( __attribute((unused)) ArrayType *arrayType ) {}
     247
     248        void CommonType::visit( ReferenceType *refType ) {
     249                if ( ReferenceType *otherRef = dynamic_cast< ReferenceType* >( type2 ) ) {
     250                        // std::cerr << "commonType: both references: " << refType << " / " << otherRef << std::endl;
     251                        // std::cerr << ( refType->get_base()->get_qualifiers() >= otherRef->get_base()->get_qualifiers() || widenFirst ) << (refType->get_base()->get_qualifiers() <= otherRef->get_base()->get_qualifiers() || widenSecond) << std::endl;
     252                        if ( widenFirst && dynamic_cast< VoidType* >( otherRef->get_base() ) && ! isFtype(refType->get_base()) ) {
     253                                getCommonWithVoidPointer( otherRef, refType );
     254                        } else if ( widenSecond && dynamic_cast< VoidType* >( refType->get_base() ) && ! isFtype(otherRef->get_base()) ) {
     255                                getCommonWithVoidPointer( refType, otherRef );
     256                        } else if ( ( refType->get_base()->get_qualifiers() >= otherRef->get_base()->get_qualifiers() || widenFirst )
     257                                           && ( refType->get_base()->get_qualifiers() <= otherRef->get_base()->get_qualifiers() || widenSecond ) ) {
     258                                // std::cerr << "middle case" << std::endl;
     259                                Type::Qualifiers tq1 = refType->get_base()->get_qualifiers(), tq2 = otherRef->get_base()->get_qualifiers();
     260                                refType->get_base()->get_qualifiers() = Type::Qualifiers();
     261                                otherRef->get_base()->get_qualifiers() = Type::Qualifiers();
     262                                AssertionSet have, need;
     263                                OpenVarSet newOpen( openVars );
     264                                if ( unifyExact( refType->get_base(), otherRef->get_base(), env, have, need, newOpen, indexer ) ) {
     265                                        if ( tq1 < tq2 ) {
     266                                                result = refType->clone();
     267                                        } else {
     268                                                result = otherRef->clone();
     269                                        } // if
     270                                        result->get_qualifiers() = tq1 | tq2;
     271                                } else {
     272                                        /// std::cerr << "place for ptr-to-type" << std::endl;
     273                                } // if
     274                                refType->get_base()->get_qualifiers() = tq1;
     275                                otherRef->get_base()->get_qualifiers() = tq2;
     276                        } // if
     277                } else if ( widenSecond && dynamic_cast< ZeroType* >( type2 ) ) {
     278                        result = refType->clone();
     279                        result->get_qualifiers() |= type2->get_qualifiers();
     280                } // if
     281        }
     282
    198283        void CommonType::visit( __attribute((unused)) FunctionType *functionType ) {}
    199284        void CommonType::visit( __attribute((unused)) StructInstType *aggregateUseType ) {}
     
    203288                if ( dynamic_cast< BasicType * >( type2 ) || dynamic_cast< ZeroType* >( type2 ) || dynamic_cast< OneType* >( type2 ) ) {
    204289                        // reuse BasicType, EnumInstType code by swapping type2 with enumInstType
    205                         Type * temp = type2;
     290                        ValueGuard< Type * > temp( type2 );
    206291                        type2 = enumInstType;
    207                         temp->accept( *this );
    208                         type2 = temp;
     292                        temp.old->accept( *this );
    209293                } // if
    210294        }
  • src/ResolvExpr/ConversionCost.cc

    raf08051 r28e58fd  
    2828
    2929namespace ResolvExpr {
    30         const Cost Cost::zero = Cost( 0, 0, 0 );
    31         const Cost Cost::infinity = Cost( -1, -1, -1 );
     30        const Cost Cost::zero = Cost( 0, 0, 0, 0 );
     31        const Cost Cost::infinity = Cost( -1, -1, -1, -1 );
     32        const Cost Cost::unsafe = Cost( 1, 0, 0, 0 );
     33        const Cost Cost::poly = Cost( 0, 1, 0, 0 );
     34        const Cost Cost::safe = Cost( 0, 0, 1, 0 );
     35        const Cost Cost::reference = Cost( 0, 0, 0, 1 );
     36
     37#if 0
     38#define PRINT(x) x
     39#else
     40#define PRINT(x)
     41#endif
    3242
    3343        Cost conversionCost( Type *src, Type *dest, const SymTab::Indexer &indexer, const TypeEnvironment &env ) {
     
    3545                        EqvClass eqvClass;
    3646                        NamedTypeDecl *namedType;
    37 ///     std::cout << "type inst " << destAsTypeInst->get_name();
     47                        PRINT( std::cerr << "type inst " << destAsTypeInst->get_name(); )
    3848                        if ( env.lookup( destAsTypeInst->get_name(), eqvClass ) ) {
    3949                                if ( eqvClass.type ) {
     
    4353                                }
    4454                        } else if ( ( namedType = indexer.lookupType( destAsTypeInst->get_name() ) ) ) {
    45 ///       std::cout << " found" << std::endl;
     55                                PRINT( std::cerr << " found" << std::endl; )
    4656                                TypeDecl *type = dynamic_cast< TypeDecl* >( namedType );
    4757                                // all typedefs should be gone by this point
    4858                                assert( type );
    4959                                if ( type->get_base() ) {
    50                                         return conversionCost( src, type->get_base(), indexer, env ) + Cost( 0, 0, 1 );
     60                                        return conversionCost( src, type->get_base(), indexer, env ) + Cost::safe;
    5161                                } // if
    5262                        } // if
    53 ///     std::cout << " not found" << std::endl;
    54                 } // if
    55 ///   std::cout << "src is ";
    56 ///   src->print( std::cout );
    57 ///   std::cout << std::endl << "dest is ";
    58 ///   dest->print( std::cout );
    59 ///   std::cout << std::endl << "env is" << std::endl;
    60 ///   env.print( std::cout, 8 );
     63                        PRINT( std::cerr << " not found" << std::endl; )
     64                } // if
     65                PRINT(
     66                        std::cerr << "src is ";
     67                        src->print( std::cerr );
     68                        std::cerr << std::endl << "dest is ";
     69                        dest->print( std::cerr );
     70                        std::cerr << std::endl << "env is" << std::endl;
     71                        env.print( std::cerr, 8 );
     72                )
    6173                if ( typesCompatibleIgnoreQualifiers( src, dest, indexer, env ) ) {
    62 ///     std::cout << "compatible!" << std::endl;
    63                         return Cost( 0, 0, 0 );
     74                        PRINT( std::cerr << "compatible!" << std::endl; )
     75                        return Cost::zero;
    6476                } else if ( dynamic_cast< VoidType* >( dest ) ) {
    65                         return Cost( 0, 0, 1 );
     77                        return Cost::safe;
     78                } else if ( ReferenceType * refType = dynamic_cast< ReferenceType * > ( dest ) ) {
     79                        PRINT( std::cerr << "conversionCost: dest is reference" << std::endl; )
     80                        return convertToReferenceCost( src, refType, indexer, env );
    6681                } else {
    6782                        ConversionCost converter( dest, indexer, env );
     
    7085                                return Cost::infinity;
    7186                        } else {
    72                                 return converter.get_cost() + Cost( 0, 0, 0 );
    73                         } // if
    74                 } // if
     87                                return converter.get_cost() + Cost::zero;
     88                        } // if
     89                } // if
     90        }
     91
     92        Cost convertToReferenceCost( Type * src, Type * dest, int diff, const SymTab::Indexer & indexer, const TypeEnvironment & env ) {
     93                PRINT( std::cerr << "convert to reference cost..." << std::endl; )
     94                if ( diff > 0 ) {
     95                        // TODO: document this
     96                        Cost cost = convertToReferenceCost( safe_dynamic_cast< ReferenceType * >( src )->get_base(), dest, diff-1, indexer, env );
     97                        cost.incReference();
     98                        return cost;
     99                } else if ( diff < -1 ) {
     100                        // TODO: document this
     101                        Cost cost = convertToReferenceCost( src, safe_dynamic_cast< ReferenceType * >( dest )->get_base(), diff+1, indexer, env );
     102                        cost.incReference();
     103                        return cost;
     104                } else if ( diff == 0 ) {
     105                        ReferenceType * srcAsRef = dynamic_cast< ReferenceType * >( src );
     106                        ReferenceType * destAsRef = dynamic_cast< ReferenceType * >( dest );
     107                        if ( srcAsRef && destAsRef ) { // pointer-like conversions between references
     108                                PRINT( std::cerr << "converting between references" << std::endl; )
     109                                if ( srcAsRef->get_base()->get_qualifiers() <= destAsRef->get_base()->get_qualifiers() && typesCompatibleIgnoreQualifiers( srcAsRef->get_base(), destAsRef->get_base(), indexer, env ) ) {
     110                                        return Cost::safe;
     111                                } else {  // xxx - this discards reference qualifiers from consideration -- reducing qualifiers is a safe conversion; is this right?
     112                                        int assignResult = ptrsAssignable( srcAsRef->get_base(), destAsRef->get_base(), env );
     113                                        PRINT( std::cerr << "comparing references: " << assignResult << " " << srcAsRef << " " << destAsRef << std::endl; )
     114                                        if ( assignResult < 0 ) {
     115                                                return Cost::safe;
     116                                        } else if ( assignResult > 0 ) {
     117                                                return Cost::unsafe;
     118                                        } // if
     119                                } // if
     120                        } else {
     121                                PRINT( std::cerr << "reference to rvalue conversion" << std::endl; )
     122                                ConversionCost converter( dest, indexer, env );
     123                                src->accept( converter );
     124                                return converter.get_cost();
     125                        } // if
     126                } else {
     127                        ReferenceType * destAsRef = dynamic_cast< ReferenceType * >( dest );
     128                        assert( diff == -1 && destAsRef );
     129                        if ( typesCompatibleIgnoreQualifiers( src, destAsRef->get_base(), indexer, env ) ) {
     130                                PRINT( std::cerr << "converting compatible base type" << std::endl; )
     131                                if ( src->get_lvalue() ) {
     132                                        PRINT(
     133                                                std::cerr << "lvalue to reference conversion" << std::endl;
     134                                                std::cerr << src << " => " << destAsRef << std::endl;
     135                                        )
     136                                        // lvalue-to-reference conversion:  cv lvalue T => cv T &
     137                                        if ( src->get_qualifiers() == destAsRef->get_base()->get_qualifiers() ) {
     138                                                return Cost::reference; // cost needs to be non-zero to add cast
     139                                        } if ( src->get_qualifiers() < destAsRef->get_base()->get_qualifiers() ) {
     140                                                return Cost::safe; // cost needs to be higher than previous cast to differentiate adding qualifiers vs. keeping same
     141                                        } else {
     142                                                return Cost::unsafe;
     143                                        } // if
     144                                } else if ( destAsRef->get_base()->get_const() ) {
     145                                        PRINT( std::cerr << "rvalue to const ref conversion" << std::endl; )
     146                                        // rvalue-to-const-reference conversion: T => const T &
     147                                        return Cost::safe;
     148                                } else {
     149                                        PRINT( std::cerr << "rvalue to non-const reference conversion" << std::endl; )
     150                                        // rvalue-to-reference conversion: T => T &
     151                                        return Cost::unsafe;
     152                                } // if
     153                        } // if
     154                        PRINT( std::cerr << "attempting to convert from incompatible base type -- fail" << std::endl; )
     155                }
     156                return Cost::infinity;
     157        }
     158
     159        Cost convertToReferenceCost( Type * src, ReferenceType * dest, const SymTab::Indexer & indexer, const TypeEnvironment & env ) {
     160                int sdepth = src->referenceDepth(), ddepth = dest->referenceDepth();
     161                return convertToReferenceCost( src, dest, sdepth-ddepth, indexer, env );
    75162        }
    76163
     
    164251                        int tableResult = costMatrix[ basicType->get_kind() ][ destAsBasic->get_kind() ];
    165252                        if ( tableResult == -1 ) {
    166                                 cost = Cost( 1, 0, 0 );
    167                         } else {
    168                                 cost = Cost( 0, 0, tableResult );
     253                                cost = Cost::unsafe;
     254                        } else {
     255                                cost = Cost::zero;
     256                                cost.incSafe( tableResult );
    169257                        } // if
    170258                } else if ( dynamic_cast< EnumInstType *>( dest ) ) {
    171259                        // xxx - not positive this is correct, but appears to allow casting int => enum
    172                         cost = Cost( 1, 0, 0 );
     260                        cost = Cost::unsafe;
    173261                } else if ( dynamic_cast< ZeroType* >( dest ) != nullptr || dynamic_cast< OneType* >( dest ) != nullptr ) {
    174                         cost = Cost( 1, 0, 0 );
     262                        cost = Cost::unsafe;
    175263                } // if
    176264        }
     
    178266        void ConversionCost::visit(PointerType *pointerType) {
    179267                if ( PointerType *destAsPtr = dynamic_cast< PointerType* >( dest ) ) {
    180                         if ( pointerType->get_base()->get_qualifiers() <= destAsPtr->get_base()->get_qualifiers() && typesCompatibleIgnoreQualifiers( pointerType->get_base(), destAsPtr->get_base(), indexer, env ) ) {
    181                                 cost = Cost( 0, 0, 1 );
    182                         } else {
     268                        PRINT( std::cerr << pointerType << " ===> " << destAsPtr; )
     269                        Type::Qualifiers tq1 = pointerType->get_base()->get_qualifiers();
     270                        Type::Qualifiers tq2 = destAsPtr->get_base()->get_qualifiers();
     271                        if ( tq1 <= tq2 && typesCompatibleIgnoreQualifiers( pointerType->get_base(), destAsPtr->get_base(), indexer, env ) ) {
     272                                if ( tq1 == tq2 ) {
     273                                        // types are the same
     274                                        cost = Cost::zero;
     275                                } else {
     276                                        // types are the same, except otherPointer has more qualifiers
     277                                        PRINT( std::cerr << " :: compatible and good qualifiers" << std::endl; )
     278                                        cost = Cost::safe;
     279                                }
     280                        } else {  // xxx - this discards qualifiers from consideration -- reducing qualifiers is a safe conversion; is this right?
    183281                                int assignResult = ptrsAssignable( pointerType->get_base(), destAsPtr->get_base(), env );
    184                                 if ( assignResult < 0 ) {
    185                                         cost = Cost( 0, 0, 1 );
     282                                PRINT( std::cerr << " :: " << assignResult << std::endl; )
     283                                if ( assignResult < 0 && pointerType->get_base()->get_qualifiers() <= destAsPtr->get_qualifiers() ) {
     284                                        cost = Cost::safe;
    186285                                } else if ( assignResult > 0 ) {
    187                                         cost = Cost( 1, 0, 0 );
     286                                        cost = Cost::unsafe;
    188287                                } // if
     288                                // assignResult == 0 means Cost::Infinity
    189289                        } // if
    190290                } else if ( dynamic_cast< ZeroType* >( dest ) != nullptr || dynamic_cast< OneType* >( dest ) != nullptr ) {
    191                         cost = Cost( 1, 0, 0 );
     291                        cost = Cost::unsafe;
    192292                } // if
    193293        }
    194294
    195295        void ConversionCost::visit(__attribute((unused)) ArrayType *arrayType) {}
     296
     297        void ConversionCost::visit(ReferenceType *refType) {
     298                // Note: dest can never be a reference, since it would have been caught in an earlier check
     299                assert( ! dynamic_cast< ReferenceType * >( dest ) );
     300                // convert reference to rvalue: cv T1 & => T2
     301                // recursively compute conversion cost from T1 to T2.
     302                // cv can be safely dropped because of 'implicit dereference' behavior.
     303                refType->get_base()->accept( *this );
     304                if ( refType->get_base()->get_qualifiers() == dest->get_qualifiers() ) {
     305                        cost.incReference();  // prefer exact qualifiers
     306                } else if ( refType->get_base()->get_qualifiers() < dest->get_qualifiers() ) {
     307                        cost.incSafe(); // then gaining qualifiers
     308                } else {
     309                        cost.incUnsafe(); // lose qualifiers as last resort
     310                }
     311                PRINT( std::cerr << refType << " ==> " << dest << " " << cost << std::endl; )
     312        }
     313
    196314        void ConversionCost::visit(__attribute((unused)) FunctionType *functionType) {}
    197315
     
    215333                static Type::Qualifiers q;
    216334                static BasicType integer( q, BasicType::SignedInt );
    217                 integer.accept( *this );
    218                 if ( cost < Cost( 1, 0, 0 ) ) {
     335                integer.accept( *this );  // safe if dest >= int
     336                if ( cost < Cost::unsafe ) {
    219337                        cost.incSafe();
    220338                } // if
     
    238356                        assert( type );
    239357                        if ( type->get_base() ) {
    240                                 cost = conversionCost( type->get_base(), dest, indexer, env ) + Cost( 0, 0, 1 );
     358                                cost = conversionCost( type->get_base(), dest, indexer, env ) + Cost::safe;
    241359                        } // if
    242360                } // if
     
    244362
    245363        void ConversionCost::visit( __attribute((unused)) TupleType *tupleType) {
    246                 Cost c;
     364                Cost c = Cost::zero;
    247365                if ( TupleType *destAsTuple = dynamic_cast< TupleType* >( dest ) ) {
    248366                        std::list< Type* >::const_iterator srcIt = tupleType->get_types().begin();
     
    276394                        int tableResult = costMatrix[ BasicType::SignedInt ][ destAsBasic->get_kind() ];
    277395                        if ( tableResult == -1 ) {
    278                                 cost = Cost( 1, 0, 0 );
    279                         } else {
    280                                 cost = Cost( 0, 0, tableResult + 1 );
     396                                cost = Cost::unsafe;
     397                        } else {
     398                                cost = Cost::zero;
     399                                cost.incSafe( tableResult + 1 );
    281400                        }
    282401                } else if ( dynamic_cast< PointerType* >( dest ) ) {
    283                         cost = Cost( 0, 0, 1 );
     402                        cost = Cost::safe;
    284403                }
    285404        }
     
    292411                        int tableResult = costMatrix[ BasicType::SignedInt ][ destAsBasic->get_kind() ];
    293412                        if ( tableResult == -1 ) {
    294                                 cost = Cost( 1, 0, 0 );
    295                         } else {
    296                                 cost = Cost( 0, 0, tableResult + 1 );
     413                                cost = Cost::unsafe;
     414                        } else {
     415                                cost = Cost::zero;
     416                                cost.incSafe( tableResult + 1 );
    297417                        }
    298418                }
  • src/ResolvExpr/ConversionCost.h

    raf08051 r28e58fd  
    3737                virtual void visit(PointerType *pointerType);
    3838                virtual void visit(ArrayType *arrayType);
     39                virtual void visit(ReferenceType *refType);
    3940                virtual void visit(FunctionType *functionType);
    4041                virtual void visit(StructInstType *aggregateUseType);
     
    5354                const TypeEnvironment &env;
    5455        };
     56
     57        Cost convertToReferenceCost( Type * src, ReferenceType * dest, const SymTab::Indexer & indexer, const TypeEnvironment & env );
    5558} // namespace ResolvExpr
    5659
  • src/ResolvExpr/Cost.h

    raf08051 r28e58fd  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // Cost.h -- 
     7// Cost.h --
    88//
    99// Author           : Richard C. Bilson
     
    2020namespace ResolvExpr {
    2121        class Cost {
     22          private:
     23                Cost( int unsafeCost, int polyCost, int safeCost, int referenceCost );
     24
    2225          public:
    23                 Cost();
    24                 Cost( int unsafe, int poly, int safe );
    25  
    26                 void incUnsafe( int inc = 1 );
    27                 void incPoly( int inc = 1 );
    28                 void incSafe( int inc = 1 );
    29  
     26                Cost & incUnsafe( int inc = 1 );
     27                Cost & incPoly( int inc = 1 );
     28                Cost & incSafe( int inc = 1 );
     29                Cost & incReference( int inc = 1 );
     30
    3031                Cost operator+( const Cost &other ) const;
    3132                Cost operator-( const Cost &other ) const;
     
    3536                bool operator!=( const Cost &other ) const;
    3637                friend std::ostream &operator<<( std::ostream &os, const Cost &cost );
    37  
     38
    3839                static const Cost zero;
    3940                static const Cost infinity;
     41
     42                static const Cost unsafe;
     43                static const Cost poly;
     44                static const Cost safe;
     45                static const Cost reference;
    4046          private:
    4147                int compare( const Cost &other ) const;
    4248
    43                 int unsafe;
    44                 int poly;
    45                 int safe;
     49                int unsafeCost;
     50                int polyCost;
     51                int safeCost;
     52                int referenceCost;
    4653        };
    4754
    48         inline Cost::Cost() : unsafe( 0 ), poly( 0 ), safe( 0 ) {}
     55        inline Cost::Cost( int unsafeCost, int polyCost, int safeCost, int referenceCost ) : unsafeCost( unsafeCost ), polyCost( polyCost ), safeCost( safeCost ), referenceCost( referenceCost ) {}
    4956
    50         inline Cost::Cost( int unsafe, int poly, int safe ) : unsafe( unsafe ), poly( poly ), safe( safe ) {}
    51 
    52         inline void Cost::incUnsafe( int inc ) {
    53                 unsafe += inc;
     57        inline Cost & Cost::incUnsafe( int inc ) {
     58                if ( *this == infinity ) return *this;
     59                unsafeCost += inc;
     60                return *this;
    5461        }
    5562
    56         inline void Cost::incPoly( int inc ) {
    57                 poly += inc;
     63        inline Cost & Cost::incPoly( int inc ) {
     64                if ( *this == infinity ) return *this;
     65                polyCost += inc;
     66                return *this;
    5867        }
    5968
    60         inline void Cost::incSafe( int inc ) {
    61                 safe += inc;
     69        inline Cost & Cost::incSafe( int inc ) {
     70                if ( *this == infinity ) return *this;
     71                safeCost += inc;
     72                return *this;
     73        }
     74
     75        inline Cost & Cost::incReference( int inc ) {
     76                if ( *this == infinity ) return *this;
     77                referenceCost += inc;
     78                return *this;
    6279        }
    6380
    6481        inline Cost Cost::operator+( const Cost &other ) const {
    65                 return Cost( unsafe + other.unsafe, poly + other.poly, safe + other.safe );
     82                if ( *this == infinity || other == infinity ) return infinity;
     83                return Cost( unsafeCost + other.unsafeCost, polyCost + other.polyCost, safeCost + other.safeCost, referenceCost + other.referenceCost );
    6684        }
    6785
    6886        inline Cost Cost::operator-( const Cost &other ) const {
    69                 return Cost( unsafe - other.unsafe, poly - other.poly, safe - other.safe );
     87                if ( *this == infinity || other == infinity ) return infinity;
     88                return Cost( unsafeCost - other.unsafeCost, polyCost - other.polyCost, safeCost - other.safeCost, referenceCost - other.referenceCost );
    7089        }
    7190
    7291        inline Cost &Cost::operator+=( const Cost &other ) {
    73                 unsafe += other.unsafe;
    74                 poly += other.poly;
    75                 safe += other.safe;
     92                if ( *this == infinity ) return *this;
     93                if ( other == infinity ) {
     94                        *this = infinity;
     95                        return *this;
     96                }
     97                unsafeCost += other.unsafeCost;
     98                polyCost += other.polyCost;
     99                safeCost += other.safeCost;
     100                referenceCost += other.referenceCost;
    76101                return *this;
    77102        }
    78103
    79104        inline bool Cost::operator<( const Cost &other ) const {
    80             if ( *this == infinity ) return false;
    81             if ( other == infinity ) return true;
    82             if ( unsafe > other.unsafe ) {
     105                if ( *this == infinity ) return false;
     106                if ( other == infinity ) return true;
     107
     108                if ( unsafeCost > other.unsafeCost ) {
    83109                        return false;
    84             } else if ( unsafe < other.unsafe ) {
     110                } else if ( unsafeCost < other.unsafeCost ) {
    85111                        return true;
    86             } else if ( poly > other.poly ) {
     112                } else if ( polyCost > other.polyCost ) {
    87113                        return false;
    88             } else if ( poly < other.poly ) {
     114                } else if ( polyCost < other.polyCost ) {
    89115                        return true;
    90             } else if ( safe > other.safe ) {
     116                } else if ( safeCost > other.safeCost ) {
    91117                        return false;
    92             } else if ( safe < other.safe ) {
     118                } else if ( safeCost < other.safeCost ) {
    93119                        return true;
    94             } else {
     120                } else if ( referenceCost > other.referenceCost ) {
    95121                        return false;
    96             } // if
     122                } else if ( referenceCost < other.referenceCost ) {
     123                        return true;
     124                } else {
     125                        return false;
     126                } // if
    97127        }
    98128
    99129        inline bool Cost::operator==( const Cost &other ) const {
    100                 return unsafe == other.unsafe
    101                         && poly == other.poly
    102                         && safe == other.safe;
     130                return unsafeCost == other.unsafeCost
     131                        && polyCost == other.polyCost
     132                        && safeCost == other.safeCost
     133                        && referenceCost == other.referenceCost;
    103134        }
    104135
     
    108139
    109140        inline std::ostream &operator<<( std::ostream &os, const Cost &cost ) {
    110                 os << "( " << cost.unsafe << ", " << cost.poly << ", " << cost.safe << " )";
     141                os << "( " << cost.unsafeCost << ", " << cost.polyCost << ", " << cost.safeCost << ", " << cost.referenceCost << " )";
    111142                return os;
    112143        }
  • src/ResolvExpr/PtrsAssignable.cc

    raf08051 r28e58fd  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // PtrsAssignable.cc -- 
     7// PtrsAssignable.cc --
    88//
    99// Author           : Richard C. Bilson
     
    8282        void PtrsAssignable::visit(  __attribute__((unused)) UnionInstType *inst ) {}
    8383
    84         void PtrsAssignable::visit( EnumInstType *inst ) {
    85                 if ( dynamic_cast< EnumInstType* >( inst ) ) {
     84        void PtrsAssignable::visit( EnumInstType * ) {
     85                if ( dynamic_cast< EnumInstType* >( dest ) ) {
    8686                        result = 1;
    87                 } else if ( BasicType *bt = dynamic_cast< BasicType* >( inst ) ) {
     87                } else if ( BasicType *bt = dynamic_cast< BasicType* >( dest ) ) {
    8888                        result = bt->get_kind() == BasicType::SignedInt;
    8989                }
     
    104104        void PtrsAssignable::visit(  __attribute__((unused)) ZeroType *zeroType ) {}
    105105        void PtrsAssignable::visit(  __attribute__((unused)) OneType *oneType ) {}
    106        
     106
    107107} // namespace ResolvExpr
    108108
  • src/ResolvExpr/ResolveTypeof.cc

    raf08051 r28e58fd  
    6565                        assert( newExpr->has_result() && ! newExpr->get_result()->isVoid() );
    6666                        Type *newType = newExpr->get_result();
     67                        newExpr->set_result( nullptr );
    6768                        delete typeofType;
     69                        delete newExpr;
    6870                        return newType;
    6971                } // if
  • src/ResolvExpr/Unify.cc

    raf08051 r28e58fd  
    5353                virtual void visit(PointerType *pointerType);
    5454                virtual void visit(ArrayType *arrayType);
     55                virtual void visit(ReferenceType *refType);
    5556                virtual void visit(FunctionType *functionType);
    5657                virtual void visit(StructInstType *aggregateUseType);
     
    153154
    154155        bool bindVar( TypeInstType *typeInst, Type *other, const TypeDecl::Data & data, TypeEnvironment &env, AssertionSet &needAssertions, AssertionSet &haveAssertions, const OpenVarSet &openVars, WidenMode widenMode, const SymTab::Indexer &indexer ) {
     156                // remove references from other, so that type variables can only bind to value types
     157                other = other->stripReferences();
    155158                OpenVarSet::const_iterator tyvar = openVars.find( typeInst->get_name() );
    156159                assert( tyvar != openVars.end() );
     
    387390                                } // if
    388391                        } else {
     392                                common = type1->clone();
     393                                common->get_qualifiers() = tq1 | tq2;
    389394                                result = true;
    390395                        } // if
     
    436441                        markAssertions( haveAssertions, needAssertions, pointerType );
    437442                        markAssertions( haveAssertions, needAssertions, otherPointer );
     443                } // if
     444        }
     445
     446        void Unify::visit(ReferenceType *refType) {
     447                if ( ReferenceType *otherRef = dynamic_cast< ReferenceType* >( type2 ) ) {
     448                        result = unifyExact( refType->get_base(), otherRef->get_base(), env, needAssertions, haveAssertions, openVars, WidenMode( false, false ), indexer );
     449                        markAssertions( haveAssertions, needAssertions, refType );
     450                        markAssertions( haveAssertions, needAssertions, otherRef );
    438451                } // if
    439452        }
  • src/ResolvExpr/typeops.h

    raf08051 r28e58fd  
    6666        Cost castCost( Type *src, Type *dest, const SymTab::Indexer &indexer, const TypeEnvironment &env );
    6767
    68         template< typename SrcIterator, typename DestIterator >
    69         Cost castCostList( SrcIterator srcBegin, SrcIterator srcEnd, DestIterator destBegin, DestIterator destEnd, const SymTab::Indexer &indexer, const TypeEnvironment &env ) {
    70                 Cost ret;
    71                 if ( destBegin == destEnd ) {
    72                         if ( srcBegin == srcEnd ) {
    73                                 return Cost::zero;
    74                         } else {
    75                                 return Cost( 0, 0, 1 );
    76                         } // if
    77                 } // if
    78                 while ( srcBegin != srcEnd && destBegin != destEnd ) {
    79                         Cost thisCost = castCost( *srcBegin++, *destBegin++, indexer, env );
    80                         if ( thisCost == Cost::infinity ) {
    81                                 return Cost::infinity;
    82                         } // if
    83                         ret += thisCost;
    84                 } // while
    85                 if ( srcBegin == srcEnd && destBegin == destEnd ) {
    86                         return ret;
    87                 } else {
    88                         return Cost::infinity;
    89                 } // if
    90         }
    91 
    9268        // in ConversionCost.cc
    9369        Cost conversionCost( Type *src, Type *dest, const SymTab::Indexer &indexer, const TypeEnvironment &env );
    94 
    95         template< typename SrcIterator, typename DestIterator >
    96         Cost conversionCostList( SrcIterator srcBegin, SrcIterator srcEnd, DestIterator destBegin, DestIterator destEnd, const SymTab::Indexer &indexer, const TypeEnvironment &env ) {
    97                 Cost ret;
    98                 while ( srcBegin != srcEnd && destBegin != destEnd ) {
    99                         Cost thisCost = conversionCost( *srcBegin++, *destBegin++, indexer, env );
    100                         if ( thisCost == Cost::infinity ) {
    101                                 return Cost::infinity;
    102                         } // if
    103                         ret += thisCost;
    104                 } // while
    105                 if ( srcBegin == srcEnd && destBegin == destEnd ) {
    106                         return ret;
    107                 } else {
    108                         return Cost::infinity;
    109                 } // if
    110         }
    11170
    11271        // in PtrsAssignable.cc
  • src/SymTab/Autogen.cc

    raf08051 r28e58fd  
    1313// Update Count     : 62
    1414//
     15
    1516#include "Autogen.h"
    1617
     
    2425#include <vector>                  // for vector
    2526
    26 #include "AddVisit.h"             // for addVisit
    27 #include "Common/ScopedMap.h"     // for ScopedMap
    28 #include "GenPoly/DeclMutator.h"  // for DeclMutator
    29 #include "GenPoly/ScopedSet.h"    // for ScopedSet
    30 #include "Parser/LinkageSpec.h"   // for AutoGen, Intrinsic, Spec
    31 #include "SymTab/Mangler.h"       // for mangleType
    32 #include "SynTree/Statement.h"    // for SwitchStmt (ptr only), CompoundStmt
    33 #include "SynTree/Type.h"         // for Type, ArrayType, Type::StorageClasses
    34 #include "SynTree/Visitor.h"      // for Visitor
     27#include "AddVisit.h"              // for addVisit
     28#include "CodeGen/OperatorTable.h" // for isCtorDtor, isCtorDtorAssign
     29#include "Common/ScopedMap.h"      // for ScopedMap<>::const_iterator, Scope...
     30#include "Common/utility.h"        // for cloneAll, operator+
     31#include "GenPoly/DeclMutator.h"   // for DeclMutator
     32#include "GenPoly/ScopedSet.h"     // for ScopedSet, ScopedSet<>::iterator
     33#include "SymTab/Mangler.h"        // for Mangler
     34#include "SynTree/Attribute.h"     // For Attribute
     35#include "SynTree/Mutator.h"       // for maybeMutate
     36#include "SynTree/Statement.h"     // for CompoundStmt, ReturnStmt, ExprStmt
     37#include "SynTree/Type.h"          // for FunctionType, Type, TypeInstType
     38#include "SynTree/Visitor.h"       // for maybeAccept, Visitor, acceptAll
     39
     40class Attribute;
    3541
    3642namespace SymTab {
     
    130136        FunctionType * genDefaultType( Type * paramType ) {
    131137                FunctionType *ftype = new FunctionType( Type::Qualifiers(), false );
    132                 ObjectDecl *dstParam = new ObjectDecl( "_dst", Type::StorageClasses(), LinkageSpec::Cforall, nullptr, new PointerType( Type::Qualifiers(), paramType->clone() ), nullptr );
     138                ObjectDecl *dstParam = new ObjectDecl( "_dst", Type::StorageClasses(), LinkageSpec::Cforall, nullptr, new ReferenceType( Type::Qualifiers(), paramType->clone() ), nullptr );
    133139                ftype->get_parameters().push_back( dstParam );
    134140
     
    150156                ftype->get_returnVals().push_back( returnVal );
    151157                return ftype;
    152         }
    153 
    154         /// true if the aggregate's layout is dynamic
    155         template< typename AggrDecl >
    156         bool hasDynamicLayout( AggrDecl * aggregateDecl ) {
    157                 for ( TypeDecl * param : aggregateDecl->get_parameters() ) {
    158                         if ( param->isComplete() ) return true;
    159                 }
    160                 return false;
    161158        }
    162159
     
    181178                        FunctionType * ftype = funcDecl->get_functionType();
    182179                        assert( ! ftype->get_parameters().empty() );
    183                         Type * t = safe_dynamic_cast< PointerType * >( ftype->get_parameters().front()->get_type() )->get_base();
     180                        Type * t = InitTweak::getPointerBase( ftype->get_parameters().front()->get_type() );
     181                        assert( t );
    184182                        map.insert( Mangler::mangleType( t ), true );
    185183                }
     
    227225                        FunctionType * ftype = data.genType( refType );
    228226
    229                         if(concurrent_type && InitTweak::isDestructor( data.fname )) {
     227                        if(concurrent_type && CodeGen::isDestructor( data.fname )) {
    230228                                ftype->get_parameters().front()->get_type()->set_mutex( true );
    231229                        }
     
    279277                FunctionType *copyCtorType = genCopyType( refType->clone() );
    280278
     279                // add unused attribute to parameters of default constructor and destructor
     280                ctorType->get_parameters().front()->get_attributes().push_back( new Attribute( "unused" ) );
     281                dtorType->get_parameters().front()->get_attributes().push_back( new Attribute( "unused" ) );
     282
    281283                // xxx - should we also generate void ?{}(E *, int) and E ?{}(E *, E)?
    282284                // right now these cases work, but that might change.
     
    301303
    302304        /// generates a single struct member operation (constructor call, destructor call, assignment call)
    303         void makeStructMemberOp( ObjectDecl * dstParam, Expression * src, DeclarationWithType * field, FunctionDecl * func, bool isDynamicLayout, bool forward = true ) {
    304                 ObjectDecl * returnVal = NULL;
    305                 if ( ! func->get_functionType()->get_returnVals().empty() ) {
    306                         returnVal = dynamic_cast<ObjectDecl*>( func->get_functionType()->get_returnVals().front() );
    307                 }
    308 
     305        void makeStructMemberOp( ObjectDecl * dstParam, Expression * src, DeclarationWithType * field, FunctionDecl * func, bool forward = true ) {
    309306                InitTweak::InitExpander srcParam( src );
    310307
    311                 // assign to destination (and return value if generic)
    312                 UntypedExpr *derefExpr = UntypedExpr::createDeref( new VariableExpr( dstParam ) );
    313                 Expression *dstselect = new MemberExpr( field, derefExpr );
     308                // assign to destination
     309                Expression *dstselect = new MemberExpr( field, new CastExpr( new VariableExpr( dstParam ), safe_dynamic_cast< ReferenceType* >( dstParam->get_type() )->get_base()->clone() ) );
    314310                genImplicitCall( srcParam, dstselect, func->get_name(), back_inserter( func->get_statements()->get_kids() ), field, forward );
    315 
    316                 if ( isDynamicLayout && returnVal ) {
    317                         // xxx - there used to be a dereference on returnVal, but this seems to have been wrong?
    318                         Expression *retselect = new MemberExpr( field, new VariableExpr( returnVal ) );
    319                         genImplicitCall( srcParam, retselect, func->get_name(), back_inserter( func->get_statements()->get_kids() ), field, forward );
    320                 } // if
    321311        }
    322312
    323313        /// generates the body of a struct function by iterating the struct members (via parameters) - generates default ctor, copy ctor, assignment, and dtor bodies, but NOT field ctor bodies
    324314        template<typename Iterator>
    325         void makeStructFunctionBody( Iterator member, Iterator end, FunctionDecl * func, bool isDynamicLayout, bool forward = true ) {
     315        void makeStructFunctionBody( Iterator member, Iterator end, FunctionDecl * func, bool forward = true ) {
    326316                for ( ; member != end; ++member ) {
    327317                        if ( DeclarationWithType *field = dynamic_cast< DeclarationWithType * >( *member ) ) { // otherwise some form of type declaration, e.g. Aggregate
     
    359349
    360350                                Expression *srcselect = srcParam ? new MemberExpr( field, new VariableExpr( srcParam ) ) : NULL;
    361                                 makeStructMemberOp( dstParam, srcselect, field, func, isDynamicLayout, forward );
     351                                makeStructMemberOp( dstParam, srcselect, field, func, forward );
    362352                        } // if
    363353                } // for
     
    367357        /// void ?{}(A *, int) and void?{}(A *, int, int) for a struct A which has two int fields.
    368358        template<typename Iterator>
    369         void makeStructFieldCtorBody( Iterator member, Iterator end, FunctionDecl * func, bool isDynamicLayout ) {
     359        void makeStructFieldCtorBody( Iterator member, Iterator end, FunctionDecl * func ) {
    370360                FunctionType * ftype = func->get_functionType();
    371361                std::list<DeclarationWithType*> & params = ftype->get_parameters();
     
    393383                                        // matching parameter, initialize field with copy ctor
    394384                                        Expression *srcselect = new VariableExpr(*parameter);
    395                                         makeStructMemberOp( dstParam, srcselect, field, func, isDynamicLayout );
     385                                        makeStructMemberOp( dstParam, srcselect, field, func );
    396386                                        ++parameter;
    397387                                } else {
    398388                                        // no matching parameter, initialize field with default ctor
    399                                         makeStructMemberOp( dstParam, NULL, field, func, isDynamicLayout );
     389                                        makeStructMemberOp( dstParam, NULL, field, func );
    400390                                }
    401391                        }
     
    413403                // Make function polymorphic in same parameters as generic struct, if applicable
    414404                const std::list< TypeDecl* > & typeParams = aggregateDecl->get_parameters(); // List of type variables to be placed on the generated functions
    415                 bool isDynamicLayout = hasDynamicLayout( aggregateDecl );  // NOTE this flag is an incredibly ugly kludge; we should fix the assignment signature instead (ditto for union)
    416405
    417406                // generate each of the functions based on the supplied FuncData objects
     
    423412
    424413                // field ctors are only generated if default constructor and copy constructor are both generated
    425                 unsigned numCtors = std::count_if( newFuncs.begin(), newFuncs.end(), [](FunctionDecl * dcl) { return InitTweak::isConstructor( dcl->get_name() ); } );
     414                unsigned numCtors = std::count_if( newFuncs.begin(), newFuncs.end(), [](FunctionDecl * dcl) { return CodeGen::isConstructor( dcl->get_name() ); } );
    426415
    427416                if ( functionNesting == 0 ) {
     
    438427                        // generate appropriate calls to member ctor, assignment
    439428                        // destructor needs to do everything in reverse, so pass "forward" based on whether the function is a destructor
    440                         if ( ! InitTweak::isDestructor( dcl->get_name() ) ) {
    441                                 makeStructFunctionBody( aggregateDecl->get_members().begin(), aggregateDecl->get_members().end(), dcl, isDynamicLayout );
     429                        if ( ! CodeGen::isDestructor( dcl->get_name() ) ) {
     430                                makeStructFunctionBody( aggregateDecl->get_members().begin(), aggregateDecl->get_members().end(), dcl );
    442431                        } else {
    443                                 makeStructFunctionBody( aggregateDecl->get_members().rbegin(), aggregateDecl->get_members().rend(), dcl, isDynamicLayout, false );
    444                         }
    445                         if ( InitTweak::isAssignment( dcl->get_name() ) ) {
     432                                makeStructFunctionBody( aggregateDecl->get_members().rbegin(), aggregateDecl->get_members().rend(), dcl, false );
     433                        }
     434                        if ( CodeGen::isAssignment( dcl->get_name() ) ) {
    446435                                // assignment needs to return a value
    447436                                FunctionType * assignType = dcl->get_functionType();
     
    472461                                        // our inheritance model. I think the correct way to handle this is to
    473462                                        // cast the structure to the type of the member and let the resolver
    474                                         // figure out whether it's valid and have a pass afterwards that fixes
    475                                         // the assignment to use pointer arithmetic with the offset of the
    476                                         // member, much like how generic type members are handled.
     463                                        // figure out whether it's valid/choose the correct unnamed member
    477464                                        continue;
    478465                                }
    479466                                memCtorType->get_parameters().push_back( new ObjectDecl( member->get_name(), Type::StorageClasses(), LinkageSpec::Cforall, 0, member->get_type()->clone(), 0 ) );
    480467                                FunctionDecl * ctor = genFunc( "?{}", memCtorType->clone(), functionNesting );
    481                                 makeStructFieldCtorBody( aggregateDecl->get_members().begin(), aggregateDecl->get_members().end(), ctor, isDynamicLayout );
     468                                makeStructFieldCtorBody( aggregateDecl->get_members().begin(), aggregateDecl->get_members().end(), ctor );
    482469                                declsToAdd.push_back( ctor );
    483470                        }
     
    490477        void makeUnionFieldsAssignment( ObjectDecl * srcParam, ObjectDecl * dstParam, OutputIterator out ) {
    491478                UntypedExpr *copy = new UntypedExpr( new NameExpr( "__builtin_memcpy" ) );
    492                 copy->get_args().push_back( new VariableExpr( dstParam ) );
     479                copy->get_args().push_back( new AddressExpr( new VariableExpr( dstParam ) ) );
    493480                copy->get_args().push_back( new AddressExpr( new VariableExpr( srcParam ) ) );
    494481                copy->get_args().push_back( new SizeofExpr( srcParam->get_type()->clone() ) );
     
    502489                ObjectDecl * dstParam = safe_dynamic_cast< ObjectDecl * >( ftype->get_parameters().front() );
    503490                ObjectDecl * srcParam = safe_dynamic_cast< ObjectDecl * >( ftype->get_parameters().back() );
    504                 ObjectDecl * returnVal = nullptr;
    505                 if ( ! ftype->get_returnVals().empty() ) {
    506                         returnVal = safe_dynamic_cast< ObjectDecl * >( ftype->get_returnVals().front() );
    507                 }
    508491
    509492                makeUnionFieldsAssignment( srcParam, dstParam, back_inserter( funcDecl->get_statements()->get_kids() ) );
    510                 if ( returnVal ) {
     493                if ( CodeGen::isAssignment( funcDecl->get_name() ) ) {
     494                        // also generate return statement in assignment
    511495                        funcDecl->get_statements()->get_kids().push_back( new ReturnStmt( noLabels, new VariableExpr( srcParam ) ) );
    512496                }
     
    535519                cloneAll( typeParams, copyCtorType->get_forall() );
    536520                cloneAll( typeParams, assignType->get_forall() );
     521
     522                // add unused attribute to parameters of default constructor and destructor
     523                ctorType->get_parameters().front()->get_attributes().push_back( new Attribute( "unused" ) );
     524                dtorType->get_parameters().front()->get_attributes().push_back( new Attribute( "unused" ) );
    537525
    538526                // Routines at global scope marked "static" to prevent multiple definitions is separate translation units
  • src/SymTab/Autogen.h

    raf08051 r28e58fd  
    4040        extern Type * SizeType;
    4141
     42        /// intrinsic dereference operator for unqualified types - set when *? function is seen in FindSpecialDeclarations.
     43        /// Useful for creating dereference ApplicationExprs without a full resolver pass.
     44        extern FunctionDecl * dereferenceOperator;
     45
     46        // temporary
     47        FunctionType * genAssignType( Type * paramType );
     48
    4249        /// inserts into out a generated call expression to function fname with arguments dstParam and srcParam. Intended to be used with generated ?=?, ?{}, and ^?{} calls.
    4350        template< typename OutputIterator >
     
    4855        template< typename OutputIterator >
    4956        Statement * genScalarCall( InitTweak::InitExpander & srcParam, Expression *dstParam, const std::string & fname, OutputIterator out, Type * type, bool addCast = false ) {
    50         // want to be able to generate assignment, ctor, and dtor generically,
    51         // so fname is either ?=?, ?{}, or ^?{}
    52         UntypedExpr *fExpr = new UntypedExpr( new NameExpr( fname ) );
     57                // want to be able to generate assignment, ctor, and dtor generically,
     58                // so fname is either ?=?, ?{}, or ^?{}
     59                UntypedExpr *fExpr = new UntypedExpr( new NameExpr( fname ) );
    5360
    54         // do something special for unnamed members
    55         dstParam = new AddressExpr( dstParam );
    56         if ( addCast ) {
    57                 // cast to T* with qualifiers removed, so that qualified objects can be constructed
    58                 // and destructed with the same functions as non-qualified objects.
    59                 // unfortunately, lvalue is considered a qualifier. For AddressExpr to resolve, its argument
    60                 // must have an lvalue qualified type, so remove all qualifiers except lvalue. If we ever
    61                 // remove lvalue as a qualifier, this can change to
    62                 //   type->get_qualifiers() = Type::Qualifiers();
    63                 assert( type );
    64                 Type * castType = type->clone();
    65                 castType->get_qualifiers() -= Type::Qualifiers( Type::Const | Type::Volatile | Type::Restrict | Type::Atomic );
    66                 castType->set_lvalue( true ); // xxx - might not need this
    67                 dstParam = new CastExpr( dstParam, new PointerType( Type::Qualifiers(), castType ) );
    68         }
    69         fExpr->get_args().push_back( dstParam );
     61                if ( addCast ) {
     62                        // cast to T& with qualifiers removed, so that qualified objects can be constructed
     63                        // and destructed with the same functions as non-qualified objects.
     64                        // unfortunately, lvalue is considered a qualifier. For AddressExpr to resolve, its argument
     65                        // must have an lvalue qualified type, so remove all qualifiers except lvalue. If we ever
     66                        // remove lvalue as a qualifier, this can change to
     67                        //   type->get_qualifiers() = Type::Qualifiers();
     68                        assert( type );
     69                        Type * castType = type->clone();
     70                        castType->get_qualifiers() -= Type::Qualifiers( Type::Lvalue | Type::Const | Type::Volatile | Type::Restrict | Type::Atomic );
     71                        // castType->set_lvalue( true ); // xxx - might not need this
     72                        dstParam = new CastExpr( dstParam, new ReferenceType( Type::Qualifiers(), castType ) );
     73                }
     74                fExpr->get_args().push_back( dstParam );
    7075
    71         Statement * listInit = srcParam.buildListInit( fExpr );
     76                Statement * listInit = srcParam.buildListInit( fExpr );
    7277
    73         std::list< Expression * > args = *++srcParam;
    74         fExpr->get_args().splice( fExpr->get_args().end(), args );
     78                std::list< Expression * > args = *++srcParam;
     79                fExpr->get_args().splice( fExpr->get_args().end(), args );
    7580
    76         *out++ = new ExprStmt( noLabels, fExpr );
     81                *out++ = new ExprStmt( noLabels, fExpr );
    7782
    78         srcParam.clearArrayIndices();
     83                srcParam.clearArrayIndices();
    7984
    80         return listInit;
     85                return listInit;
    8186        }
    8287
     
    114119
    115120                UntypedExpr *inc = new UntypedExpr( update );
    116                 inc->get_args().push_back( new AddressExpr( new VariableExpr( index ) ) );
     121                inc->get_args().push_back( new VariableExpr( index ) );
    117122
    118123                UntypedExpr *dstIndex = new UntypedExpr( new NameExpr( "?[?]" ) );
  • src/SymTab/Indexer.cc

    raf08051 r28e58fd  
    2323#include <utility>                 // for pair, make_pair, move
    2424
     25#include "CodeGen/OperatorTable.h" // for isCtorDtor, isCtorDtorAssign
    2526#include "Common/SemanticError.h"  // for SemanticError
    2627#include "Common/utility.h"        // for cloneAll
     
    111112        void Indexer::removeSpecialOverrides( const std::string &id, std::list< DeclarationWithType * > & out ) const {
    112113                // only need to perform this step for constructors, destructors, and assignment functions
    113                 if ( ! InitTweak::isCtorDtorAssign( id ) ) return;
     114                if ( ! CodeGen::isCtorDtorAssign( id ) ) return;
    114115
    115116                // helpful data structure
     
    139140                                decls.push_back( DeclBall{ function, isUserDefinedFunc, isDefaultCtor, isDtor, isCopyFunc } );
    140141                                existsUserDefinedFunc = existsUserDefinedFunc || isUserDefinedFunc;
    141                                 existsUserDefinedCtor = existsUserDefinedCtor || (isUserDefinedFunc && InitTweak::isConstructor( function->get_name() ) );
     142                                existsUserDefinedCtor = existsUserDefinedCtor || (isUserDefinedFunc && CodeGen::isConstructor( function->get_name() ) );
    142143                                existsUserDefinedDtor = existsUserDefinedDtor || (isUserDefinedFunc && isDtor);
    143144                                existsUserDefinedCopyFunc = existsUserDefinedCopyFunc || (isUserDefinedFunc && isCopyFunc);
     
    157158                                assert( ! params.empty() );
    158159                                // use base type of pointer, so that qualifiers on the pointer type aren't considered.
    159                                 Type * base = safe_dynamic_cast< PointerType * >( params.front()->get_type() )->get_base();
     160                                Type * base = InitTweak::getPointerBase( params.front()->get_type() );
     161                                assert( base );
    160162                                funcMap[ Mangler::mangle( base ) ] += function;
    161163                        } else {
  • src/SymTab/Mangler.cc

    raf08051 r28e58fd  
    132132                mangleName << "A0";
    133133                maybeAccept( arrayType->get_base(), *this );
     134        }
     135
     136        void Mangler::visit( ReferenceType *refType ) {
     137                printQualifiers( refType );
     138                mangleName << "R";
     139                maybeAccept( refType->get_base(), *this );
    134140        }
    135141
     
    303309                // Removed due to restrict not affecting function compatibility in GCC
    304310//              if ( type->get_isRestrict() ) {
    305 //                      mangleName << "R";
     311//                      mangleName << "E";
    306312//              } // if
    307313                if ( type->get_lvalue() ) {
  • src/SymTab/Mangler.h

    raf08051 r28e58fd  
    4242                virtual void visit( PointerType *pointerType );
    4343                virtual void visit( ArrayType *arrayType );
     44                virtual void visit( ReferenceType *refType );
    4445                virtual void visit( FunctionType *functionType );
    4546                virtual void visit( StructInstType *aggregateUseType );
  • src/SymTab/Validate.cc

    raf08051 r28e58fd  
    4747
    4848#include "CodeGen/CodeGenerator.h"     // for genName
     49#include "CodeGen/OperatorTable.h"     // for isCtorDtor, isCtorDtorAssign
    4950#include "Common/PassVisitor.h"        // for PassVisitor, WithDeclsToAdd
    5051#include "Common/ScopedMap.h"          // for ScopedMap
     
    239240        };
    240241
     242
     243        FunctionDecl * dereferenceOperator = nullptr;
     244        struct FindSpecialDeclarations final {
     245                void previsit( FunctionDecl * funcDecl );
     246        };
     247
    241248        void validate( std::list< Declaration * > &translationUnit, bool doDebug ) {
    242249                PassVisitor<EnumAndPointerDecay> epc;
     
    245252                PassVisitor<CompoundLiteral> compoundliteral;
    246253                PassVisitor<ValidateGenericParameters> genericParams;
     254                PassVisitor<FindSpecialDeclarations> finder;
    247255
    248256                EliminateTypedef::eliminateTypedef( translationUnit );
     
    261269                acceptAll( translationUnit, fpd );
    262270                ArrayLength::computeLength( translationUnit );
     271                acceptAll( translationUnit, finder );
    263272        }
    264273
     
    821830                std::list< DeclarationWithType * > &params = funcType->get_parameters();
    822831
    823                 if ( InitTweak::isCtorDtorAssign( funcDecl->get_name() ) ) {
     832                if ( CodeGen::isCtorDtorAssign( funcDecl->get_name() ) ) { // TODO: also check /=, etc.
    824833                        if ( params.size() == 0 ) {
    825834                                throw SemanticError( "Constructors, destructors, and assignment functions require at least one parameter ", funcDecl );
    826835                        }
    827                         PointerType * ptrType = dynamic_cast< PointerType * >( params.front()->get_type() );
    828                         if ( ! ptrType || ptrType->is_array() ) {
    829                                 throw SemanticError( "First parameter of a constructor, destructor, or assignment function must be a pointer ", funcDecl );
     836                        ReferenceType * refType = dynamic_cast< ReferenceType * >( params.front()->get_type() );
     837                        if ( ! refType ) {
     838                                throw SemanticError( "First parameter of a constructor, destructor, or assignment function must be a reference ", funcDecl );
    830839                        }
    831                         if ( InitTweak::isCtorDtor( funcDecl->get_name() ) && returnVals.size() != 0 ) {
     840                        if ( CodeGen::isCtorDtor( funcDecl->get_name() ) && returnVals.size() != 0 ) {
    832841                                throw SemanticError( "Constructors and destructors cannot have explicit return values ", funcDecl );
    833842                        }
     
    945954                }
    946955        }
     956
     957        void FindSpecialDeclarations::previsit( FunctionDecl * funcDecl ) {
     958                if ( ! dereferenceOperator ) {
     959                        if ( funcDecl->get_name() == "*?" && funcDecl->get_linkage() == LinkageSpec::Intrinsic ) {
     960                                FunctionType * ftype = funcDecl->get_functionType();
     961                                if ( ftype->get_parameters().size() == 1 && ftype->get_parameters().front()->get_type()->get_qualifiers() == Type::Qualifiers() ) {
     962                                        dereferenceOperator = funcDecl;
     963                                }
     964                        }
     965                }
     966        }
    947967} // namespace SymTab
    948968
  • src/SynTree/AddressExpr.cc

    raf08051 r28e58fd  
    2121#include "Type.h"            // for PointerType, Type, Type::Qualifiers
    2222
     23// Address expressions are typed based on the following inference rules:
     24//    E : lvalue T  &..& (n references)
     25//   &E :        T *&..& (n references)
     26//
     27//    E : T  &..&        (m references)
     28//   &E : T *&..&        (m-1 references)
     29//
     30// That is, lvalues becomes
     31
     32namespace {
     33        Type * addrType( Type * type ) {
     34                if ( ReferenceType * refType = dynamic_cast< ReferenceType * >( type ) ) {
     35                        return new ReferenceType( refType->get_qualifiers(), addrType( refType->get_base() ) );
     36                } else {
     37                        return new PointerType( Type::Qualifiers(), type->clone() );
     38                }
     39        }
     40}
     41
    2342AddressExpr::AddressExpr( Expression *arg, Expression *_aname ) : Expression( _aname ), arg( arg ) {
    2443        if ( arg->has_result() ) {
    25                 set_result( new PointerType( Type::Qualifiers(), arg->get_result()->clone() ) );
     44                if ( arg->get_result()->get_lvalue() ) {
     45                        // lvalue, retains all layers of reference and gains a pointer inside the references
     46                        set_result( addrType( arg->get_result() ) );
     47                } else {
     48                        // taking address of non-lvalue -- must be a reference, loses one layer of reference
     49                        ReferenceType * refType = safe_dynamic_cast< ReferenceType * >( arg->get_result() );
     50                        set_result( addrType( refType->get_base() ) );
     51                }
     52                // result of & is never an lvalue
     53                get_result()->set_lvalue( false );
    2654        }
    2755}
  • src/SynTree/ApplicationExpr.cc

    raf08051 r28e58fd  
    4949}
    5050
    51 ApplicationExpr::ApplicationExpr( Expression *funcExpr, const std::list< Expression * > & argList ) : function( funcExpr ), args( argList ) {
     51ApplicationExpr::ApplicationExpr( Expression *funcExpr, const std::list<Expression *> & args ) : function( funcExpr ), args( args ) {
    5252        PointerType *pointer = safe_dynamic_cast< PointerType* >( funcExpr->get_result() );
    5353        FunctionType *function = safe_dynamic_cast< FunctionType* >( pointer->get_base() );
  • src/SynTree/Declaration.h

    raf08051 r28e58fd  
    109109        virtual DeclarationWithType *acceptMutator( Mutator &m ) = 0;
    110110
    111         virtual Type *get_type() const = 0;
     111        virtual Type * get_type() const = 0;
    112112        virtual void set_type(Type *) = 0;
    113113
     
    128128        virtual ~ObjectDecl();
    129129
    130         virtual Type *get_type() const { return type; }
     130        virtual Type * get_type() const { return type; }
    131131        virtual void set_type(Type *newType) { type = newType; }
    132132
     
    155155        virtual ~FunctionDecl();
    156156
    157         Type *get_type() const;
     157        Type * get_type() const;
    158158        virtual void set_type(Type *);
    159159
    160         FunctionType *get_functionType() const { return type; }
     160        FunctionType * get_functionType() const { return type; }
    161161        void set_functionType( FunctionType *newValue ) { type = newValue; }
    162162        CompoundStmt *get_statements() const { return statements; }
  • src/SynTree/Expression.cc

    raf08051 r28e58fd  
    3131#include "TypeSubstitution.h"        // for TypeSubstitution
    3232
     33#include "GenPoly/Lvalue.h"
    3334
    3435Expression::Expression( Expression *_aname ) : result( 0 ), env( 0 ), argName( _aname ) {}
     
    8990}
    9091
     92VariableExpr * VariableExpr::functionPointer( FunctionDecl * func ) {
     93        VariableExpr * funcExpr = new VariableExpr( func );
     94        funcExpr->set_result( new PointerType( Type::Qualifiers(), funcExpr->get_result() ) );
     95        return funcExpr;
     96}
     97
    9198void VariableExpr::print( std::ostream &os, int indent ) const {
    9299        os << "Variable Expression: ";
     
    149156
    150157void AlignofExpr::print( std::ostream &os, int indent) const {
    151         os << std::string( indent, ' ' ) << "Alignof Expression on: ";
     158        os << "Alignof Expression on: ";
    152159
    153160        if (isType)
     
    258265
    259266void AttrExpr::print( std::ostream &os, int indent) const {
    260         os << std::string( indent, ' ' ) << "Attr ";
     267        os << "Attr ";
    261268        attr->print( os, indent + 2 );
    262269        if ( isType || expr ) {
     
    357364namespace {
    358365        TypeSubstitution makeSub( Type * t ) {
    359                 if ( StructInstType * aggInst = dynamic_cast< StructInstType * >( t ) ) {
     366                if ( ReferenceType * refType = dynamic_cast< ReferenceType * >( t ) ) {
     367                        return makeSub( refType->get_base() );
     368                } else if ( StructInstType * aggInst = dynamic_cast< StructInstType * >( t ) ) {
    360369                        return TypeSubstitution( aggInst->get_baseParameters()->begin(), aggInst->get_baseParameters()->end(), aggInst->get_parameters().begin() );
    361370                } else if ( UnionInstType * aggInst = dynamic_cast< UnionInstType * >( t ) ) {
     
    422431        if ( Type * type = expr->get_result() ) {
    423432                Type * base = InitTweak::getPointerBase( type );
    424                 if ( ! base ) {
    425                         std::cerr << type << std::endl;
     433                assertf( base, "expected pointer type in dereference (type was %s)", toString( type ).c_str() );
     434                ret->set_result( base->clone() );
     435                if ( GenPoly::referencesPermissable() ) {
     436                        // if references are still allowed in the AST, dereference returns a reference
     437                        ret->set_result( new ReferenceType( Type::Qualifiers(), ret->get_result() ) );
     438                } else {
     439                        // references have been removed, in which case dereference returns an lvalue of the base type.
     440                        ret->get_result()->set_lvalue( true );
    426441                }
    427                 assertf( base, "expected pointer type in dereference\n" );
    428                 ret->set_result( maybeClone( base ) );
    429442        }
    430443        return ret;
     
    490503
    491504void LogicalExpr::print( std::ostream &os, int indent )const {
    492         os << std::string( indent, ' ' ) << "Short-circuited operation (" << (isAnd?"and":"or") << ") on: ";
     505        os << "Short-circuited operation (" << (isAnd?"and":"or") << ") on: ";
    493506        arg1->print(os);
    494507        os << " and ";
     
    595608CompoundLiteralExpr::CompoundLiteralExpr( Type * type, Initializer * initializer ) : initializer( initializer ) {
    596609        assert( type && initializer );
     610        type->set_lvalue( true );
    597611        set_result( type );
    598612}
  • src/SynTree/Expression.h

    raf08051 r28e58fd  
    284284        void set_var( DeclarationWithType * newValue ) { var = newValue; }
    285285
     286        static VariableExpr * functionPointer( FunctionDecl * decl );
     287
    286288        virtual VariableExpr * clone() const { return new VariableExpr( * this ); }
    287289        virtual void accept( Visitor & v ) { v.visit( this ); }
  • src/SynTree/Mutator.cc

    raf08051 r28e58fd  
    484484}
    485485
     486Type *Mutator::mutate( ReferenceType *refType ) {
     487        mutateAll( refType->get_forall(), *this );
     488        refType->set_base( maybeMutate( refType->get_base(), *this ) );
     489        return refType;
     490}
     491
    486492Type *Mutator::mutate( FunctionType *functionType ) {
    487493        mutateAll( functionType->get_forall(), *this );
  • src/SynTree/Mutator.h

    raf08051 r28e58fd  
    9292        virtual Type* mutate( PointerType *pointerType );
    9393        virtual Type* mutate( ArrayType *arrayType );
     94        virtual Type* mutate( ReferenceType *refType );
    9495        virtual Type* mutate( FunctionType *functionType );
    9596        virtual Type* mutate( StructInstType *aggregateUseType );
  • src/SynTree/SynTree.h

    raf08051 r28e58fd  
    101101class PointerType;
    102102class ArrayType;
     103class ReferenceType;
    103104class FunctionType;
    104105class ReferenceToType;
  • src/SynTree/TupleExpr.cc

    raf08051 r28e58fd  
    6767        assertf( type->size() > index, "TupleIndexExpr index out of bounds: tuple size %d, requested index %d in expr %s", type->size(), index, toString( tuple ).c_str() );
    6868        set_result( (*std::next( type->get_types().begin(), index ))->clone() );
    69         get_result()->set_lvalue( type->get_lvalue() );
     69        // like MemberExpr, TupleIndexExpr is always an lvalue
     70        get_result()->set_lvalue( true );
    7071}
    7172
  • src/SynTree/Type.cc

    raf08051 r28e58fd  
    6464const char * Type::QualifiersNames[] = { "const", "restrict", "volatile", "lvalue", "mutex", "_Atomic" };
    6565
    66 Type *Type::stripDeclarator() {
     66Type * Type::stripDeclarator() {
    6767        Type * type = this;
    6868        while ( Type * at = InitTweak::getPointerBase( type ) ) {
     
    7171        return type;
    7272}
     73
     74Type * Type::stripReferences() {
     75        Type * type = this;
     76        while ( ReferenceType * ref = dynamic_cast<ReferenceType *>( type ) ) {
     77                type = ref->get_base();
     78        }
     79        return type;
     80}
     81
     82int Type::referenceDepth() const { return 0; }
    7383
    7484void Type::print( std::ostream &os, int indent ) const {
  • src/SynTree/Type.h

    raf08051 r28e58fd  
    168168
    169169        /// return type without outer pointers and arrays
    170         Type *stripDeclarator();
     170        Type * stripDeclarator();
     171
     172        /// return type without outer references
     173        Type * stripReferences();
     174
     175        /// return the number of references occuring consecutively on the outermost layer of this type (i.e. do not count references nested within other types)
     176        virtual int referenceDepth() const;
    171177
    172178        virtual bool isComplete() const { return true; }
     
    262268        bool is_array() const { return isStatic || isVarLen || dimension; }
    263269
     270        virtual bool isComplete() const { return ! isVarLen; }
     271
    264272        virtual PointerType *clone() const { return new PointerType( *this ); }
    265273        virtual void accept( Visitor & v ) { v.visit( this ); }
     
    296304};
    297305
     306class ReferenceType : public Type {
     307public:
     308        Type *base;
     309
     310        ReferenceType( const Type::Qualifiers & tq, Type *base, const std::list< Attribute * > & attributes = std::list< Attribute * >() );
     311        ReferenceType( const ReferenceType & );
     312        virtual ~ReferenceType();
     313
     314        Type *get_base() { return base; }
     315        void set_base( Type *newValue ) { base = newValue; }
     316
     317        virtual int referenceDepth() const;
     318
     319        // Since reference types act like value types, their size is the size of the base.
     320        // This makes it simple to cast the empty tuple to a reference type, since casts that increase
     321        // the number of values are disallowed.
     322        virtual unsigned size() const { return base->size(); }
     323
     324        virtual ReferenceType *clone() const { return new ReferenceType( *this ); }
     325        virtual void accept( Visitor & v ) { v.visit( this ); }
     326        virtual Type *acceptMutator( Mutator & m ) { return m.mutate( this ); }
     327        virtual void print( std::ostream & os, int indent = 0 ) const;
     328};
     329
    298330class FunctionType : public Type {
    299331  public:
  • src/SynTree/TypeExpr.cc

    raf08051 r28e58fd  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // TypeExpr.cc -- 
     7// TypeExpr.cc --
    88//
    99// Author           : Richard C. Bilson
  • src/SynTree/TypeSubstitution.h

    raf08051 r28e58fd  
    117117                                } // if
    118118                        } else {
    119                                 throw SemanticError( "Attempt to provide non-type parameter for type parameter", formal );
     119                                throw SemanticError( toString( "Attempt to provide non-type parameter: ", toString( *actualIt ).c_str(), " for type parameter " ), formal );
    120120                        } // if
    121121                } else {
  • src/SynTree/Visitor.cc

    raf08051 r28e58fd  
    373373void Visitor::visit( PointerType *pointerType ) {
    374374        acceptAll( pointerType->get_forall(), *this );
     375        // xxx - should PointerType visit/mutate dimension?
    375376        maybeAccept( pointerType->get_base(), *this );
    376377}
     
    380381        maybeAccept( arrayType->get_dimension(), *this );
    381382        maybeAccept( arrayType->get_base(), *this );
     383}
     384
     385void Visitor::visit( ReferenceType *refType ) {
     386        acceptAll( refType->get_forall(), *this );
     387        maybeAccept( refType->get_base(), *this );
    382388}
    383389
  • src/SynTree/Visitor.h

    raf08051 r28e58fd  
    9494        virtual void visit( PointerType *pointerType );
    9595        virtual void visit( ArrayType *arrayType );
     96        virtual void visit( ReferenceType *refType );
    9697        virtual void visit( FunctionType *functionType );
    9798        virtual void visit( StructInstType *aggregateUseType );
  • src/SynTree/module.mk

    raf08051 r28e58fd  
    2020       SynTree/PointerType.cc \
    2121       SynTree/ArrayType.cc \
     22       SynTree/ReferenceType.cc \
    2223       SynTree/FunctionType.cc \
    2324       SynTree/ReferenceToType.cc \
  • src/Tuples/Explode.cc

    raf08051 r28e58fd  
    1515
    1616#include "Explode.h"
     17#include <list>                  // for list
    1718
    18 #include <list>               // for list
    19 
    20 #include "SynTree/Mutator.h"  // for Mutator
     19#include "SynTree/Mutator.h"     // for Mutator
     20#include "Common/PassVisitor.h"  // for PassVisitor
    2121
    2222namespace Tuples {
    2323        namespace {
    24                 struct AddrExploder : public Mutator {
     24                // remove one level of reference from a reference type -- may be useful elsewhere.
     25                Type * getReferenceBase( Type * t ) {
     26                        if ( ReferenceType * refType = dynamic_cast<ReferenceType *>( t ) ) {
     27                                return refType->get_base();
     28                        } else {
     29                                // for the moment, I want to know immediately if a non-reference type is ever passed in here.
     30                                assertf( false, "getReferenceBase for non-ref: %s", toString( refType ).c_str() );
     31                                return nullptr;
     32                        }
     33                }
     34
     35                struct CastExploder {
     36                        bool castAdded = false;
    2537                        bool foundUniqueExpr = false;
    26                         Expression * applyAddr( Expression * expr, bool first = true ) {
     38                        Expression * applyCast( Expression * expr, bool first = true ) {
    2739                                if ( TupleExpr * tupleExpr = dynamic_cast< TupleExpr * >( expr ) ){
    2840                                        foundUniqueExpr = true;
    2941                                        std::list< Expression * > exprs;
    3042                                        for ( Expression *& expr : tupleExpr->get_exprs() ) {
    31                                                 // move & into tuple exprs
    32                                                 exprs.push_back( applyAddr( expr, false ) );
     43                                                // move cast into tuple exprs
     44                                                exprs.push_back( applyCast( expr, false ) );
    3345                                        }
    34                                         // want the top-level expression to be address-taken, but not nested
     46                                        // want the top-level expression to be cast to reference type, but not nested
    3547                                        // tuple expressions
    3648                                        if ( first ) {
    37                                                 return new AddressExpr( new TupleExpr( exprs ) );
     49                                                castAdded = true;
     50                                                Expression * tupleExpr = new TupleExpr( exprs );
     51                                                return new CastExpr( tupleExpr, new ReferenceType( Type::Qualifiers(), tupleExpr->result->clone() ) );
    3852                                        } else {
    3953                                                return new TupleExpr( exprs );
    4054                                        }
    4155                                }
    42                                 // anything else should be address-taken as normal
    43                                 return new AddressExpr( expr->clone() );
     56                                if ( dynamic_cast<ReferenceType*>( expr->result ) ) {
     57                                        // don't need to cast reference type to another reference type
     58                                        return expr->clone();
     59                                } else {
     60                                        // anything else should be cast to reference as normal
     61                                        castAdded = true;
     62                                        return new CastExpr( expr->clone(), new ReferenceType( Type::Qualifiers(), expr->result->clone() ) );
     63                                }
    4464                        }
    4565
    46                         virtual Expression * mutate( UniqueExpr * uniqueExpr ) {
    47                                 // move & into unique expr so that the unique expr has type T* rather than
     66                        Expression * postmutate( UniqueExpr * uniqueExpr ) {
     67                                // move cast into unique expr so that the unique expr has type T& rather than
    4868                                // type T. In particular, this transformation helps with generating the
    49                                 // correct code for address-taken member tuple expressions, since the result
    50                                 // should now be a tuple of addresses rather than the address of a tuple.
     69                                // correct code for reference-cast member tuple expressions, since the result
     70                                // should now be a tuple of references rather than a reference to a tuple.
    5171                                // Still, this code is a bit awkward, and could use some improvement.
    52                                 if ( dynamic_cast< AddressExpr * > ( uniqueExpr->get_expr() ) ) {
    53                                         // this unique expression has already been mutated or otherwise shouldn't be (can't take the address-of an address-of expression)
    54                                         return uniqueExpr;
     72                                UniqueExpr * newUniqueExpr = new UniqueExpr( applyCast( uniqueExpr->get_expr() ), uniqueExpr->get_id() );
     73                                delete uniqueExpr;
     74                                if ( castAdded ) {
     75                                        // if a cast was added by applyCast, then unique expr now has one more layer of reference
     76                                        // than it had coming into this function. To ensure types still match correctly, need to cast
     77                                        //  to reference base so that outer expressions are still correct.
     78                                        castAdded = false;
     79                                        Type * toType = getReferenceBase( newUniqueExpr->result );
     80                                        return new CastExpr( newUniqueExpr, toType->clone() );
    5581                                }
    56                                 UniqueExpr * newUniqueExpr = new UniqueExpr( applyAddr( uniqueExpr->get_expr() ), uniqueExpr->get_id() );
    57                                 delete uniqueExpr;
    58                                 UntypedExpr * deref = UntypedExpr::createDeref( Mutator::mutate( newUniqueExpr ) );
    59                                 return deref;
     82                                return newUniqueExpr;
    6083                        }
    6184
    62                         virtual Expression * mutate( TupleIndexExpr * tupleExpr ) {
     85
     86                        Expression * postmutate( TupleIndexExpr * tupleExpr ) {
    6387                                // tuple index expr needs to be rebuilt to ensure that the type of the
    6488                                // field is consistent with the type of the tuple expr, since the field
    65                                 // may have changed from type T to T*.
    66                                 Expression * expr = tupleExpr->get_tuple()->acceptMutator( *this );
     89                                // may have changed from type T to T&.
     90                                Expression * expr = tupleExpr->get_tuple();
    6791                                tupleExpr->set_tuple( nullptr );
    6892                                TupleIndexExpr * ret = new TupleIndexExpr( expr, tupleExpr->get_index() );
     
    7397        } // namespace
    7498
    75         Expression * distributeAddr( Expression * expr ) {
    76                 AddrExploder addrExploder;
    77                 expr = expr->acceptMutator( addrExploder );
    78                 if ( ! addrExploder.foundUniqueExpr ) {
    79                         expr = new AddressExpr( expr );
     99        Expression * distributeReference( Expression * expr ) {
     100                PassVisitor<CastExploder> exploder;
     101                expr = expr->acceptMutator( exploder );
     102                if ( ! exploder.pass.foundUniqueExpr ) {
     103                        // if a UniqueExpr was found, then the cast has already been added inside the UniqueExpr as appropriate
     104                        expr = new CastExpr( expr, new ReferenceType( Type::Qualifiers(), expr->result->clone() ) );
    80105                }
    81106                return expr;
  • src/Tuples/Explode.h

    raf08051 r28e58fd  
    2828
    2929namespace Tuples {
    30         /// helper function used by explode to properly distribute
    31         /// '&' across a tuple expression
    32         Expression * distributeAddr( Expression * expr );
     30        Expression * distributeReference( Expression * );
    3331
    3432        /// helper function used by explode
     
    3634        void explodeUnique( Expression * expr, const ResolvExpr::Alternative & alt, const SymTab::Indexer & indexer, OutputIterator out, bool isTupleAssign ) {
    3735                if ( isTupleAssign ) {
    38                         // tuple assignment needs AddressExprs to be recursively exploded to easily get at all of the components
    39                         if ( AddressExpr * addrExpr = dynamic_cast< AddressExpr * >( expr ) ) {
     36                        // tuple assignment needs CastExprs to be recursively exploded to easily get at all of the components
     37                        if ( CastExpr * castExpr = dynamic_cast< CastExpr * >( expr ) ) {
    4038                                ResolvExpr::AltList alts;
    41                                 explodeUnique( addrExpr->get_arg(), alt, indexer, back_inserter( alts ), isTupleAssign );
     39                                explodeUnique( castExpr->get_arg(), alt, indexer, back_inserter( alts ), isTupleAssign );
    4240                                for ( ResolvExpr::Alternative & alt : alts ) {
    43                                         // distribute '&' over all components
    44                                         alt.expr = distributeAddr( alt.expr );
     41                                        // distribute reference cast over all components
     42                                        alt.expr = distributeReference( alt.expr );
    4543                                        *out++ = alt;
    4644                                }
     
    4947                        }
    5048                }
    51                 Type * res = expr->get_result();
     49                Type * res = expr->get_result()->stripReferences();
    5250                if ( TupleType * tupleType = dynamic_cast< TupleType * > ( res ) ) {
    5351                        if ( TupleExpr * tupleExpr = dynamic_cast< TupleExpr * >( expr ) ) {
     
    5755                                }
    5856                        } else {
    59                                 // tuple type, but not tuple expr - recursively index into its components
     57                                // tuple type, but not tuple expr - recursively index into its components.
     58                                // if expr type is reference, convert to value type
    6059                                Expression * arg = expr->clone();
    61                                 if ( Tuples::maybeImpure( arg ) && ! dynamic_cast< UniqueExpr * >( arg ) ) {
     60                                if ( Tuples::maybeImpureIgnoreUnique( arg ) ) {
    6261                                        // expressions which may contain side effects require a single unique instance of the expression.
    6362                                        arg = new UniqueExpr( arg );
     63                                }
     64                                // cast reference to value type to facilitate further explosion
     65                                if ( dynamic_cast<ReferenceType *>( arg->get_result() ) ) {
     66                                        arg = new CastExpr( arg, tupleType->clone() );
    6467                                }
    6568                                for ( unsigned int i = 0; i < tupleType->size(); i++ ) {
  • src/Tuples/TupleAssignment.cc

    raf08051 r28e58fd  
    2121#include <string>                          // for string
    2222
     23#include "CodeGen/OperatorTable.h"
    2324#include "Common/UniqueName.h"             // for UniqueName
    2425#include "Common/utility.h"                // for zipWith
     
    8485                if ( ! expr ) return false;
    8586                assert( expr->has_result() );
    86                 return dynamic_cast< TupleType * >( expr->get_result() );
     87                return dynamic_cast< TupleType * >( expr->get_result()->stripReferences() );
    8788        }
    8889
     
    9697        }
    9798
    98         bool pointsToTuple( Expression *expr ) {
     99        bool refToTuple( Expression *expr ) {
     100                assert( expr->get_result() );
    99101                // also check for function returning tuple of reference types
    100102                if ( CastExpr * castExpr = dynamic_cast< CastExpr * >( expr ) ) {
    101                         return pointsToTuple( castExpr->get_arg() );
    102                 } else if ( AddressExpr *addr = dynamic_cast< AddressExpr * >( expr) ) {
    103                         return isTuple( addr->get_arg() );
     103                        return refToTuple( castExpr->get_arg() );
     104                } else {
     105                        return isTuple( expr );
    104106                }
    105107                return false;
     
    116118        void TupleAssignSpotter::spot( UntypedExpr * expr, const std::list<ResolvExpr::AltList> &possibilities ) {
    117119                if (  NameExpr *op = dynamic_cast< NameExpr * >(expr->get_function()) ) {
    118                         if ( InitTweak::isCtorDtorAssign( op->get_name() ) ) {
     120                        if ( CodeGen::isCtorDtorAssign( op->get_name() ) ) {
    119121                                fname = op->get_name();
    120122                                for ( std::list<ResolvExpr::AltList>::const_iterator ali = possibilities.begin(); ali != possibilities.end(); ++ali ) {
    121123                                        if ( ali->size() == 0 ) continue; // AlternativeFinder will natrually handle this case, if it's legal
    122                                         if ( ali->size() <= 1 && InitTweak::isAssignment( op->get_name() ) ) {
     124                                        if ( ali->size() <= 1 && CodeGen::isAssignment( op->get_name() ) ) {
    123125                                                // what does it mean if an assignment takes 1 argument? maybe someone defined such a function, in which case AlternativeFinder will naturally handle it
    124126                                                continue;
     
    129131                                        const ResolvExpr::Alternative & alt1 = ali->front();
    130132                                        auto begin = std::next(ali->begin(), 1), end = ali->end();
    131                                         if ( pointsToTuple(alt1.expr) ) {
     133                                        if ( refToTuple(alt1.expr) ) {
    132134                                                if ( isMultAssign( begin, end ) ) {
    133135                                                        matcher.reset( new MultipleAssignMatcher( *this, *ali ) );
     
    187189
    188190                ResolvExpr::Alternative lhsAlt = alts.front();
    189                 // peel off the cast that exists on ctor/dtor expressions
    190                 bool isCast = false;
    191                 if ( CastExpr * castExpr = dynamic_cast< CastExpr * >( lhsAlt.expr ) ) {
    192                         lhsAlt.expr = castExpr->get_arg();
    193                         castExpr->set_arg( nullptr );
    194                         delete castExpr;
    195                         isCast = true;
     191                // explode is aware of casts - ensure every LHS expression is sent into explode with a reference cast
     192                if ( ! dynamic_cast< CastExpr * >( lhsAlt.expr ) ) {
     193                        lhsAlt.expr = new CastExpr( lhsAlt.expr, new ReferenceType( Type::Qualifiers(), lhsAlt.expr->get_result()->clone() ) );
    196194                }
    197195
     
    199197                explode( lhsAlt, spotter.currentFinder.get_indexer(), back_inserter(lhs), true );
    200198
    201                 // and finally, re-add the cast to each lhs expr, so that qualified tuple fields can be constructed
    202                 if ( isCast ) {
    203                         for ( ResolvExpr::Alternative & alt : lhs ) {
    204                                 Expression *& expr = alt.expr;
    205                                 Type * castType = expr->get_result()->clone();
    206                                 Type * type = InitTweak::getPointerBase( castType );
    207                                 assert( type );
    208                                 type->get_qualifiers() -= Type::Qualifiers( Type::Const | Type::Volatile | Type::Restrict | Type::Atomic );
    209                                 type->set_lvalue( true ); // xxx - might not need this
    210                                 expr = new CastExpr( expr, castType );
     199                for ( ResolvExpr::Alternative & alt : lhs ) {
     200                        // every LHS value must be a reference - some come in with a cast expression, if it doesn't just cast to reference here.
     201                        if ( ! dynamic_cast< ReferenceType * >( alt.expr->get_result() ) ) {
     202                                alt.expr = new CastExpr( alt.expr, new ReferenceType( Type::Qualifiers(), alt.expr->get_result()->clone() ) );
    211203                        }
    212204                }
     
    228220                assert( left );
    229221                std::list< Expression * > args;
    230                 args.push_back( new AddressExpr( UntypedExpr::createDeref( new VariableExpr( left ) ) ) );
     222                args.push_back( new VariableExpr( left ) );
    231223                // args.push_back( new AddressExpr( new VariableExpr( left ) ) );
    232224                if ( right ) args.push_back( new VariableExpr( right ) );
     
    248240                assert( expr->has_result() && ! expr->get_result()->isVoid() );
    249241                ObjectDecl * ret = new ObjectDecl( namer.newName(), Type::StorageClasses(), LinkageSpec::Cforall, nullptr, expr->get_result()->clone(), new SingleInit( expr->clone() ) );
    250                 ConstructorInit * ctorInit = InitTweak::genCtorInit( ret );
    251                 ret->set_init( ctorInit );
    252                 ResolvExpr::resolveCtorInit( ctorInit, spotter.currentFinder.get_indexer() ); // resolve ctor/dtors for the new object
    253                 EnvRemover rm; // remove environments from subexpressions of StmtExprs
    254                 ctorInit->accept( rm );
     242                // if expression type is a reference, don't need to construct anything, a simple initializer is sufficient.
     243                if ( ! dynamic_cast< ReferenceType * >( expr->get_result() ) ) {
     244                        ConstructorInit * ctorInit = InitTweak::genCtorInit( ret );
     245                        ret->set_init( ctorInit );
     246                        ResolvExpr::resolveCtorInit( ctorInit, spotter.currentFinder.get_indexer() ); // resolve ctor/dtors for the new object
     247                        EnvRemover rm; // remove environments from subexpressions of StmtExprs
     248                        ctorInit->accept( rm );
     249                }
    255250                return ret;
    256251        }
  • src/Tuples/TupleExpansion.cc

    raf08051 r28e58fd  
    3737namespace Tuples {
    3838        namespace {
    39                 class MemberTupleExpander final : public Mutator {
    40                 public:
     39                struct MemberTupleExpander final : public Mutator {
    4140                        typedef Mutator Parent;
    4241                        using Parent::mutate;
     
    4544                };
    4645
    47                 class UniqueExprExpander final : public GenPoly::DeclMutator {
    48                 public:
    49                         typedef GenPoly::DeclMutator Parent;
    50                         using Parent::mutate;
    51 
    52                         virtual Expression * mutate( UniqueExpr * unqExpr ) override;
     46                struct UniqueExprExpander final : public WithDeclsToAdd {
     47                        Expression * postmutate( UniqueExpr * unqExpr );
    5348
    5449                        std::map< int, Expression * > decls; // not vector, because order added may not be increasing order
     
    6156                };
    6257
    63                 class TupleAssignExpander : public Mutator {
    64                 public:
    65                         typedef Mutator Parent;
    66                         using Parent::mutate;
    67 
    68                         virtual Expression * mutate( TupleAssignExpr * tupleExpr );
     58                struct TupleAssignExpander {
     59                        Expression * postmutate( TupleAssignExpr * tupleExpr );
    6960                };
    7061
     
    7970                };
    8071
    81                 class TupleIndexExpander {
    82                 public:
     72                struct TupleIndexExpander {
    8373                        Expression * postmutate( TupleIndexExpr * tupleExpr );
    8474                };
    8575
    86                 class TupleExprExpander final : public Mutator {
    87                 public:
    88                         typedef Mutator Parent;
    89                         using Parent::mutate;
    90 
    91                         virtual Expression * mutate( TupleExpr * tupleExpr ) override;
     76                struct TupleExprExpander final {
     77                        Expression * postmutate( TupleExpr * tupleExpr );
    9278                };
    9379        }
     
    9985
    10086        void expandUniqueExpr( std::list< Declaration * > & translationUnit ) {
    101                 UniqueExprExpander unqExpander;
    102                 unqExpander.mutateDeclarationList( translationUnit );
     87                PassVisitor<UniqueExprExpander> unqExpander;
     88                mutateAll( translationUnit, unqExpander );
    10389        }
    10490
    10591        void expandTuples( std::list< Declaration * > & translationUnit ) {
    106                 TupleAssignExpander assnExpander;
     92                PassVisitor<TupleAssignExpander> assnExpander;
    10793                mutateAll( translationUnit, assnExpander );
    10894
     
    11399                mutateAll( translationUnit, idxExpander );
    114100
    115                 TupleExprExpander exprExpander;
     101                PassVisitor<TupleExprExpander> exprExpander;
    116102                mutateAll( translationUnit, exprExpander );
    117103        }
     
    146132                        // aggregate expressions which might be impure must be wrapped in unique expressions
    147133                        // xxx - if there's a member-tuple expression nested in the aggregate, this currently generates the wrong code if a UniqueExpr is not used, and it's purely an optimization to remove the UniqueExpr
    148                         // if ( Tuples::maybeImpure( memberExpr->get_aggregate() ) ) aggr = new UniqueExpr( aggr );
     134                        // if ( Tuples::maybeImpureIgnoreUnique( memberExpr->get_aggregate() ) ) aggr = new UniqueExpr( aggr );
    149135                        aggr = new UniqueExpr( aggr );
    150136                        for ( Expression *& expr : tupleExpr->get_exprs() ) {
     
    164150        }
    165151
    166         Expression * UniqueExprExpander::mutate( UniqueExpr * unqExpr ) {
    167                 unqExpr = safe_dynamic_cast< UniqueExpr * > ( Parent::mutate( unqExpr ) );
     152        Expression * UniqueExprExpander::postmutate( UniqueExpr * unqExpr ) {
    168153                const int id = unqExpr->get_id();
    169154
     
    175160                        if ( unqExpr->get_object() ) {
    176161                                // an object was generated to represent this unique expression -- it should be added to the list of declarations now
    177                                 addDeclaration( unqExpr->get_object() );
     162                                declsToAddBefore.push_back( unqExpr->get_object() );
    178163                                unqExpr->set_object( nullptr );
    179164                                // steal the expr from the unqExpr
     
    189174                        ObjectDecl * finished = new ObjectDecl( toString( "_unq", id, "_finished_" ), Type::StorageClasses(), LinkageSpec::Cforall, nullptr, new BasicType( Type::Qualifiers(), BasicType::Bool ),
    190175                                                                                                        new SingleInit( new ConstantExpr( Constant::from_int( 0 ) ) ) );
    191                         addDeclaration( finished );
     176                        declsToAddBefore.push_back( finished );
    192177                        // (finished ? _unq_expr_N : (_unq_expr_N = <unqExpr->get_expr()>, finished = 1, _unq_expr_N))
    193178                        // This pattern ensures that each unique expression is evaluated once, regardless of evaluation order of the generated C code.
     
    203188        }
    204189
    205         Expression * TupleAssignExpander::mutate( TupleAssignExpr * assnExpr ) {
    206                 assnExpr = safe_dynamic_cast< TupleAssignExpr * >( Parent::mutate( assnExpr ) );
     190        Expression * TupleAssignExpander::postmutate( TupleAssignExpr * assnExpr ) {
    207191                StmtExpr * ret = assnExpr->get_stmtExpr();
    208192                assnExpr->set_stmtExpr( nullptr );
     
    238222                for ( auto p : group_iterate( tupleType->get_types(), decl->get_parameters() ) ) {
    239223                        Type * t = std::get<0>(p);
    240                         TypeDecl * td = std::get<1>(p);
    241224                        newType->get_parameters().push_back( new TypeExpr( t->clone() ) );
    242                         if ( env ) {
    243                                 // add bindings to the type environment.
    244                                 // xxx - This may not be sufficient, it may be necessary to rename type variables on StructInstType?
    245                                 env->add( td->get_name(), t->clone() );
    246                         }
    247225                }
    248226                delete tupleType;
     
    293271        }
    294272
    295         Expression * TupleExprExpander::mutate( TupleExpr * tupleExpr ) {
    296                 // recursively expand sub-tuple-expressions
    297                 tupleExpr = safe_dynamic_cast<TupleExpr *>(Parent::mutate(tupleExpr));
     273        Expression * TupleExprExpander::postmutate( TupleExpr * tupleExpr ) {
    298274                Type * result = tupleExpr->get_result();
    299275                std::list< Expression * > exprs = tupleExpr->get_exprs();
     
    342318                class ImpurityDetector : public Visitor {
    343319                public:
     320                        ImpurityDetector( bool ignoreUnique ) : ignoreUnique( ignoreUnique ) {}
     321
    344322                        typedef Visitor Parent;
    345323                        virtual void visit( ApplicationExpr * appExpr ) {
     
    355333                                maybeImpure = true;
    356334                        }
    357                         virtual void visit( __attribute__((unused)) UntypedExpr * untypedExpr ) { maybeImpure = true; }
     335                        virtual void visit( UntypedExpr * ) { maybeImpure = true; }
     336                        virtual void visit( UniqueExpr * unq ) {
     337                                if ( ignoreUnique ) {
     338                                        // bottom out at unique expression.
     339                                        // The existence of a unique expression doesn't change the purity of an expression.
     340                                        // That is, even if the wrapped expression is impure, the wrapper protects the rest of the expression.
     341                                        return;
     342                                }
     343                                maybeAccept( unq->expr, *this );
     344                        }
     345
    358346                        bool maybeImpure = false;
     347                        bool ignoreUnique;
    359348                };
    360349        } // namespace
    361350
    362351        bool maybeImpure( Expression * expr ) {
    363                 ImpurityDetector detector;
     352                ImpurityDetector detector( false );
     353                expr->accept( detector );
     354                return detector.maybeImpure;
     355        }
     356
     357        bool maybeImpureIgnoreUnique( Expression * expr ) {
     358                ImpurityDetector detector( true );
    364359                expr->accept( detector );
    365360                return detector.maybeImpure;
  • src/Tuples/Tuples.h

    raf08051 r28e58fd  
    4646        /// returns true if the expression may contain side-effects.
    4747        bool maybeImpure( Expression * expr );
     48
     49        /// returns true if the expression may contain side-effect, ignoring the presence of unique expressions.
     50        bool maybeImpureIgnoreUnique( Expression * expr );
    4851} // namespace Tuples
    4952
  • src/benchmark/csv-data.c

    raf08051 r28e58fd  
    88coroutine GreatSuspender {};
    99
    10 void ?{}( GreatSuspender * this ) {
     10void ?{}( GreatSuspender & this ) {
    1111        prime(this);
    1212}
    1313
    14 void main( GreatSuspender * this )
     14void main( GreatSuspender & this )
    1515{
    1616        while( true ) {
     
    2121void resumer( GreatSuspender * this, const unsigned int NoOfTimes ) {
    2222        for ( volatile unsigned int i = 0; i < NoOfTimes; i += 1 ) {
    23                 resume( this );
     23                resume( *this );
    2424        }
    2525}
     
    5858// single monitor entry
    5959monitor mon_t {};
    60 void dummy( mon_t * mutex m ) {}
     60void dummy( mon_t & mutex m ) {}
    6161
    6262long long int measure_1_monitor_entry() {
     
    6767        StartTime = Time();
    6868        for ( volatile unsigned int i = 0; i < NoOfTimes; i += 1 ) {
    69                 dummy( &mon );
     69                dummy( mon );
    7070        }
    7171        EndTime = Time();
     
    7676//-----------------------------------------------------------------------------
    7777// multi monitor entry
    78 void dummy( mon_t * mutex m1,  mon_t * mutex m2 ) {}
     78void dummy( mon_t & mutex m1,  mon_t & mutex m2 ) {}
    7979
    8080long long int measure_2_monitor_entry() {
     
    8585        StartTime = Time();
    8686        for ( volatile unsigned int i = 0; i < NoOfTimes; i += 1 ) {
    87                 dummy( &mon1, &mon2 );
     87                dummy( mon1, mon2 );
    8888        }
    8989        EndTime = Time();
     
    102102thread thrd1b {};
    103103
    104 void ?{}( thrd1a * this, long long int * out ) {
    105         this->out = out;
    106 }
    107 
    108 void side1A( mon_t * mutex a, long long int * out ) {
     104void ?{}( thrd1a & this, long long int * out ) {
     105        this.out = out;
     106}
     107
     108void side1A( mon_t & mutex a, long long int * out ) {
    109109        long long int StartTime, EndTime;
    110110
     
    120120}
    121121
    122 void side1B( mon_t * mutex a ) {
     122void side1B( mon_t & mutex a ) {
    123123        for( int i = 0;; i++ ) {
    124124                signal(&cond1b);
     
    128128}
    129129
    130 void main( thrd1a * this ) { side1A( &mon1, this->out ); }
    131 void main( thrd1b * this ) { side1B( &mon1 ); }
     130void main( thrd1a & this ) { side1A( mon1, this.out ); }
     131void main( thrd1b & this ) { side1B( mon1 ); }
    132132
    133133long long int measure_1_sched_int() {
     
    150150thread thrd2b {};
    151151
    152 void ?{}( thrd2a * this, long long int * out ) {
    153         this->out = out;
    154 }
    155 
    156 void side2A( mon_t * mutex a, mon_t * mutex b, long long int * out ) {
     152void ?{}( thrd2a & this, long long int * out ) {
     153        this.out = out;
     154}
     155
     156void side2A( mon_t & mutex a, mon_t & mutex b, long long int * out ) {
    157157        long long int StartTime, EndTime;
    158158
     
    168168}
    169169
    170 void side2B( mon_t * mutex a, mon_t * mutex b ) {
     170void side2B( mon_t & mutex a, mon_t & mutex b ) {
    171171        for( int i = 0;; i++ ) {
    172172                signal(&cond2b);
     
    176176}
    177177
    178 void main( thrd2a * this ) { side2A( &mon1, &mon2, this->out ); }
    179 void main( thrd2b * this ) { side2B( &mon1, &mon2 ); }
     178void main( thrd2a & this ) { side2A( mon1, mon2, this.out ); }
     179void main( thrd2b & this ) { side2B( mon1, mon2 ); }
    180180
    181181long long int measure_2_sched_int() {
  • src/libcfa/Makefile.am

    raf08051 r28e58fd  
    3636         ${AM_V_GEN}@BACKEND_CC@ @CFA_FLAGS@ -D__CFA_DEBUG__ -O0 -c -o $@ $<
    3737
    38 EXTRA_FLAGS = -g -Wall -Werror -Wno-unused-function -imacros libcfa-prelude.c @CFA_FLAGS@
     38EXTRA_FLAGS = -g -Wall -Wno-unused-function -imacros libcfa-prelude.c @CFA_FLAGS@
    3939
    4040AM_CCASFLAGS = @CFA_FLAGS@
  • src/libcfa/Makefile.in

    raf08051 r28e58fd  
    416416ARFLAGS = cr
    417417lib_LIBRARIES = $(am__append_1) $(am__append_2)
    418 EXTRA_FLAGS = -g -Wall -Werror -Wno-unused-function -imacros libcfa-prelude.c @CFA_FLAGS@
     418EXTRA_FLAGS = -g -Wall -Wno-unused-function -imacros libcfa-prelude.c @CFA_FLAGS@
    419419AM_CCASFLAGS = @CFA_FLAGS@
    420420headers = fstream iostream iterator limits rational stdlib \
  • src/libcfa/concurrency/alarm.c

    raf08051 r28e58fd  
    4040__cfa_time_t zero_time = { 0 };
    4141
    42 void ?{}( __cfa_time_t * this ) { this->val = 0; }
    43 void ?{}( __cfa_time_t * this, zero_t zero ) { this->val = 0; }
    44 
    45 void ?{}( itimerval * this, __cfa_time_t * alarm ) {
    46         this->it_value.tv_sec = alarm->val / one_second;                        // seconds
    47         this->it_value.tv_usec = max( (alarm->val % one_second) / one_microsecond, 1000 ); // microseconds
    48         this->it_interval.tv_sec = 0;
    49         this->it_interval.tv_usec = 0;
    50 }
    51 
    52 
    53 void ?{}( __cfa_time_t * this, timespec * curr ) {
     42void ?{}( __cfa_time_t & this ) { this.val = 0; }
     43void ?{}( __cfa_time_t & this, zero_t zero ) { this.val = 0; }
     44
     45void ?{}( itimerval & this, __cfa_time_t * alarm ) {
     46        this.it_value.tv_sec = alarm->val / one_second;                 // seconds
     47        this.it_value.tv_usec = max( (alarm->val % one_second) / one_microsecond, 1000 ); // microseconds
     48        this.it_interval.tv_sec = 0;
     49        this.it_interval.tv_usec = 0;
     50}
     51
     52
     53void ?{}( __cfa_time_t & this, timespec * curr ) {
    5454        uint64_t secs  = curr->tv_sec;
    5555        uint64_t nsecs = curr->tv_nsec;
    56         this->val = (secs * one_second) + nsecs;
    57 }
    58 
    59 __cfa_time_t ?=?( __cfa_time_t * this, zero_t rhs ) {
    60         this->val = 0;
    61         return *this;
     56        this.val = (secs * one_second) + nsecs;
     57}
     58
     59__cfa_time_t ?=?( __cfa_time_t & this, zero_t rhs ) {
     60        this.val = 0;
     61        return this;
    6262}
    6363
     
    8686//=============================================================================================
    8787
    88 void ?{}( alarm_node_t * this, thread_desc * thrd, __cfa_time_t alarm = zero_time, __cfa_time_t period = zero_time ) {
    89         this->thrd = thrd;
    90         this->alarm = alarm;
    91         this->period = period;
    92         this->next = 0;
    93         this->set = false;
    94         this->kernel_alarm = false;
    95 }
    96 
    97 void ?{}( alarm_node_t * this, processor   * proc, __cfa_time_t alarm = zero_time, __cfa_time_t period = zero_time ) {
    98         this->proc = proc;
    99         this->alarm = alarm;
    100         this->period = period;
    101         this->next = 0;
    102         this->set = false;
    103         this->kernel_alarm = true;
    104 }
    105 
    106 void ^?{}( alarm_node_t * this ) {
    107         if( this->set ) {
    108                 unregister_self( this );
     88void ?{}( alarm_node_t & this, thread_desc * thrd, __cfa_time_t alarm = zero_time, __cfa_time_t period = zero_time ) {
     89        this.thrd = thrd;
     90        this.alarm = alarm;
     91        this.period = period;
     92        this.next = 0;
     93        this.set = false;
     94        this.kernel_alarm = false;
     95}
     96
     97void ?{}( alarm_node_t & this, processor   * proc, __cfa_time_t alarm = zero_time, __cfa_time_t period = zero_time ) {
     98        this.proc = proc;
     99        this.alarm = alarm;
     100        this.period = period;
     101        this.next = 0;
     102        this.set = false;
     103        this.kernel_alarm = true;
     104}
     105
     106void ^?{}( alarm_node_t & this ) {
     107        if( this.set ) {
     108                unregister_self( &this );
    109109        }
    110110}
  • src/libcfa/concurrency/alarm.h

    raf08051 r28e58fd  
    3636
    3737// ctors
    38 void ?{}( __cfa_time_t * this );
    39 void ?{}( __cfa_time_t * this, zero_t zero );
    40 void ?{}( __cfa_time_t * this, timespec * curr );
    41 void ?{}( itimerval * this, __cfa_time_t * alarm );
     38void ?{}( __cfa_time_t & this );
     39void ?{}( __cfa_time_t & this, zero_t zero );
     40void ?{}( __cfa_time_t & this, timespec * curr );
     41void ?{}( itimerval & this, __cfa_time_t * alarm );
    4242
    43 __cfa_time_t ?=?( __cfa_time_t * this, zero_t rhs );
     43__cfa_time_t ?=?( __cfa_time_t & this, zero_t rhs );
    4444
    4545// logical ops
     
    105105typedef alarm_node_t ** __alarm_it_t;
    106106
    107 void ?{}( alarm_node_t * this, thread_desc * thrd, __cfa_time_t alarm = zero_time, __cfa_time_t period = zero_time );
    108 void ?{}( alarm_node_t * this, processor   * proc, __cfa_time_t alarm = zero_time, __cfa_time_t period = zero_time );
    109 void ^?{}( alarm_node_t * this );
     107void ?{}( alarm_node_t & this, thread_desc * thrd, __cfa_time_t alarm = zero_time, __cfa_time_t period = zero_time );
     108void ?{}( alarm_node_t & this, processor   * proc, __cfa_time_t alarm = zero_time, __cfa_time_t period = zero_time );
     109void ^?{}( alarm_node_t & this );
    110110
    111111struct alarm_list_t {
     
    114114};
    115115
    116 static inline void ?{}( alarm_list_t * this ) {
    117         this->head = 0;
    118         this->tail = &this->head;
     116static inline void ?{}( alarm_list_t & this ) {
     117        this.head = 0;
     118        this.tail = &this.head;
    119119}
    120120
  • src/libcfa/concurrency/coroutine

    raf08051 r28e58fd  
    2525// Anything that is resumed is a coroutine.
    2626trait is_coroutine(dtype T) {
    27       void main(T * this);
    28       coroutine_desc * get_coroutine(T * this);
     27      void main(T & this);
     28      coroutine_desc * get_coroutine(T & this);
    2929};
    3030
    31 #define DECL_COROUTINE(X) static inline coroutine_desc* get_coroutine(X* this) { return &this->__cor; } void main(X* this)
     31#define DECL_COROUTINE(X) static inline coroutine_desc* get_coroutine(X& this) { return &this.__cor; } void main(X& this)
    3232
    3333//-----------------------------------------------------------------------------
    3434// Ctors and dtors
    35 void ?{}(coStack_t * this);
    36 void ?{}(coroutine_desc * this);
    37 void ?{}(coroutine_desc * this, const char * name);
    38 void ^?{}(coStack_t * this);
    39 void ^?{}(coroutine_desc * this);
     35void ?{}(coStack_t & this);
     36void ?{}(coroutine_desc & this);
     37void ?{}(coroutine_desc & this, const char * name);
     38void ^?{}(coStack_t & this);
     39void ^?{}(coroutine_desc & this);
    4040
    4141//-----------------------------------------------------------------------------
     
    4444
    4545forall(dtype T | is_coroutine(T))
    46 static inline void resume(T * cor);
     46static inline void resume(T & cor);
    4747
    4848forall(dtype T | is_coroutine(T))
    49 void prime(T * cor);
     49void prime(T & cor);
    5050
    5151//-----------------------------------------------------------------------------
     
    8686// Resume implementation inlined for performance
    8787forall(dtype T | is_coroutine(T))
    88 static inline void resume(T * cor) {
     88static inline void resume(T & cor) {
    8989        coroutine_desc * src = this_coroutine;          // optimization
    9090        coroutine_desc * dst = get_coroutine(cor);
     
    9292        if( unlikely(!dst->stack.base) ) {
    9393                create_stack(&dst->stack, dst->stack.size);
    94                 CtxStart(cor, CtxInvokeCoroutine);
     94                CtxStart(&cor, CtxInvokeCoroutine);
    9595        }
    9696
  • src/libcfa/concurrency/coroutine.c

    raf08051 r28e58fd  
    4040//-----------------------------------------------------------------------------
    4141// Coroutine ctors and dtors
    42 void ?{}(coStack_t* this) {
    43         this->size              = 65000;        // size of stack
    44         this->storage   = NULL; // pointer to stack
    45         this->limit             = NULL; // stack grows towards stack limit
    46         this->base              = NULL; // base of stack
    47         this->context   = NULL; // address of cfa_context_t
    48         this->top               = NULL; // address of top of storage
    49         this->userStack = false;
     42void ?{}(coStack_t& this) {
     43        this.size               = 65000;        // size of stack
     44        this.storage    = NULL; // pointer to stack
     45        this.limit              = NULL; // stack grows towards stack limit
     46        this.base               = NULL; // base of stack
     47        this.context    = NULL; // address of cfa_context_t
     48        this.top                = NULL; // address of top of storage
     49        this.userStack  = false;
    5050}
    5151
    52 void ?{}(coStack_t* this, size_t size) {
     52void ?{}(coStack_t& this, size_t size) {
    5353        this{};
    54         this->size = size;
     54        this.size = size;
    5555
    56         create_stack(this, this->size);
     56        create_stack(&this, this.size);
    5757}
    5858
    59 void ?{}(coroutine_desc* this) {
     59void ?{}(coroutine_desc& this) {
    6060        this{ "Anonymous Coroutine" };
    6161}
    6262
    63 void ?{}(coroutine_desc* this, const char * name) {
    64         this->name = name;
    65         this->errno_ = 0;
    66         this->state = Start;
    67         this->starter = NULL;
    68         this->last = NULL;
     63void ?{}(coroutine_desc& this, const char * name) {
     64        this.name = name;
     65        this.errno_ = 0;
     66        this.state = Start;
     67        this.starter = NULL;
     68        this.last = NULL;
    6969}
    7070
    71 void ?{}(coroutine_desc* this, size_t size) {
     71void ?{}(coroutine_desc& this, size_t size) {
    7272        this{};
    73         (&this->stack){size};
     73        (this.stack){size};
    7474}
    7575
    76 void ^?{}(coStack_t* this) {
    77         if ( ! this->userStack ) {
     76void ^?{}(coStack_t& this) {
     77        if ( ! this.userStack ) {
    7878                LIB_DEBUG_DO(
    79                         if ( mprotect( this->storage, pageSize, PROT_READ | PROT_WRITE ) == -1 ) {
    80                                 abortf( "(coStack_t *)%p.^?{}() : internal error, mprotect failure, error(%d) %s.", this, errno, strerror( errno ) );
     79                        if ( mprotect( this.storage, pageSize, PROT_READ | PROT_WRITE ) == -1 ) {
     80                                abortf( "(coStack_t *)%p.^?{}() : internal error, mprotect failure, error(%d) %s.", &this, errno, strerror( errno ) );
    8181                        }
    8282                );
    83                 free( this->storage );
     83                free( this.storage );
    8484        }
    8585}
    8686
    87 void ^?{}(coroutine_desc* this) {}
     87void ^?{}(coroutine_desc& this) {}
    8888
    8989// Part of the Public API
    9090// Not inline since only ever called once per coroutine
    9191forall(dtype T | is_coroutine(T))
    92 void prime(T* cor) {
     92void prime(T& cor) {
    9393        coroutine_desc* this = get_coroutine(cor);
    9494        assert(this->state == Start);
  • src/libcfa/concurrency/invoke.h

    raf08051 r28e58fd  
    4747      #ifdef __CFORALL__
    4848      extern "Cforall" {
    49             void ?{}( struct __thread_queue_t * );
     49            void ?{}( struct __thread_queue_t & );
    5050            void append( struct __thread_queue_t *, struct thread_desc * );
    5151            struct thread_desc * pop_head( struct __thread_queue_t * );
    5252
    53             void ?{}( struct __condition_stack_t * );
     53            void ?{}( struct __condition_stack_t & );
    5454            void push( struct __condition_stack_t *, struct __condition_criterion_t * );
    5555            struct __condition_criterion_t * pop( struct __condition_stack_t * );
    5656
    57             void ?{}(spinlock * this);
    58             void ^?{}(spinlock * this);
     57            void ?{}(spinlock & this);
     58            void ^?{}(spinlock & this);
    5959      }
    6060      #endif
  • src/libcfa/concurrency/kernel

    raf08051 r28e58fd  
    3737};
    3838
    39 void  ?{}(semaphore * this, int count = 1);
    40 void ^?{}(semaphore * this);
     39void  ?{}(semaphore & this, int count = 1);
     40void ^?{}(semaphore & this);
    4141void P(semaphore * this);
    4242void V(semaphore * this);
     
    5151};
    5252
    53 void ?{}(cluster * this);
    54 void ^?{}(cluster * this);
     53void ?{}(cluster & this);
     54void ^?{}(cluster & this);
    5555
    5656//-----------------------------------------------------------------------------
     
    6868        unsigned short thrd_count;
    6969};
    70 static inline void ?{}(FinishAction * this) {
    71         this->action_code = No_Action;
    72         this->thrd = NULL;
    73         this->lock = NULL;
     70static inline void ?{}(FinishAction & this) {
     71        this.action_code = No_Action;
     72        this.thrd = NULL;
     73        this.lock = NULL;
    7474}
    75 static inline void ^?{}(FinishAction * this) {}
     75static inline void ^?{}(FinishAction & this) {}
    7676
    7777// Processor
     
    9999};
    100100
    101 void ?{}(processor * this);
    102 void ?{}(processor * this, cluster * cltr);
    103 void ^?{}(processor * this);
     101void ?{}(processor & this);
     102void ?{}(processor & this, cluster * cltr);
     103void ^?{}(processor & this);
    104104
    105105// Local Variables: //
  • src/libcfa/concurrency/kernel.c

    raf08051 r28e58fd  
    7373};
    7474
    75 void ?{}( current_stack_info_t * this ) {
    76         CtxGet( this->ctx );
    77         this->base = this->ctx.FP;
    78         this->storage = this->ctx.SP;
     75void ?{}( current_stack_info_t & this ) {
     76        CtxGet( this.ctx );
     77        this.base = this.ctx.FP;
     78        this.storage = this.ctx.SP;
    7979
    8080        rlimit r;
    8181        getrlimit( RLIMIT_STACK, &r);
    82         this->size = r.rlim_cur;
    83 
    84         this->limit = (void *)(((intptr_t)this->base) - this->size);
    85         this->context = &storage_mainThreadCtx;
    86         this->top = this->base;
    87 }
    88 
    89 void ?{}( coStack_t * this, current_stack_info_t * info) {
    90         this->size = info->size;
    91         this->storage = info->storage;
    92         this->limit = info->limit;
    93         this->base = info->base;
    94         this->context = info->context;
    95         this->top = info->top;
    96         this->userStack = true;
    97 }
    98 
    99 void ?{}( coroutine_desc * this, current_stack_info_t * info) {
    100         (&this->stack){ info };
    101         this->name = "Main Thread";
    102         this->errno_ = 0;
    103         this->state = Start;
    104 }
    105 
    106 void ?{}( thread_desc * this, current_stack_info_t * info) {
    107         (&this->cor){ info };
     82        this.size = r.rlim_cur;
     83
     84        this.limit = (void *)(((intptr_t)this.base) - this.size);
     85        this.context = &storage_mainThreadCtx;
     86        this.top = this.base;
     87}
     88
     89void ?{}( coStack_t & this, current_stack_info_t * info) {
     90        this.size = info->size;
     91        this.storage = info->storage;
     92        this.limit = info->limit;
     93        this.base = info->base;
     94        this.context = info->context;
     95        this.top = info->top;
     96        this.userStack = true;
     97}
     98
     99void ?{}( coroutine_desc & this, current_stack_info_t * info) {
     100        (this.stack){ info };
     101        this.name = "Main Thread";
     102        this.errno_ = 0;
     103        this.state = Start;
     104}
     105
     106void ?{}( thread_desc & this, current_stack_info_t * info) {
     107        (this.cor){ info };
    108108}
    109109
    110110//-----------------------------------------------------------------------------
    111111// Processor coroutine
    112 void ?{}(processorCtx_t * this, processor * proc) {
    113         (&this->__cor){ "Processor" };
    114         this->proc = proc;
    115         proc->runner = this;
    116 }
    117 
    118 void ?{}(processorCtx_t * this, processor * proc, current_stack_info_t * info) {
    119         (&this->__cor){ info };
    120         this->proc = proc;
    121         proc->runner = this;
    122 }
    123 
    124 void ?{}(processor * this) {
     112void ?{}(processorCtx_t & this, processor * proc) {
     113        (this.__cor){ "Processor" };
     114        this.proc = proc;
     115        proc->runner = &this;
     116}
     117
     118void ?{}(processorCtx_t & this, processor * proc, current_stack_info_t * info) {
     119        (this.__cor){ info };
     120        this.proc = proc;
     121        proc->runner = &this;
     122}
     123
     124void ?{}(processor & this) {
    125125        this{ mainCluster };
    126126}
    127127
    128 void ?{}(processor * this, cluster * cltr) {
    129         this->cltr = cltr;
    130         (&this->terminated){ 0 };
    131         this->do_terminate = false;
    132         this->preemption_alarm = NULL;
    133         this->pending_preemption = false;
    134 
    135         start( this );
    136 }
    137 
    138 void ?{}(processor * this, cluster * cltr, processorCtx_t * runner) {
    139         this->cltr = cltr;
    140         (&this->terminated){ 0 };
    141         this->do_terminate = false;
    142         this->preemption_alarm = NULL;
    143         this->pending_preemption = false;
    144         this->kernel_thread = pthread_self();
    145 
    146         this->runner = runner;
    147         LIB_DEBUG_PRINT_SAFE("Kernel : constructing main processor context %p\n", runner);
    148         runner{ this };
    149 }
    150 
    151 void ^?{}(processor * this) {
    152         if( ! this->do_terminate ) {
    153                 LIB_DEBUG_PRINT_SAFE("Kernel : core %p signaling termination\n", this);
    154                 this->do_terminate = true;
    155                 P( &this->terminated );
    156                 pthread_join( this->kernel_thread, NULL );
    157         }
    158 }
    159 
    160 void ?{}(cluster * this) {
    161         ( &this->ready_queue ){};
    162         ( &this->ready_queue_lock ){};
    163 
    164         this->preemption = default_preemption();
    165 }
    166 
    167 void ^?{}(cluster * this) {
     128void ?{}(processor & this, cluster * cltr) {
     129        this.cltr = cltr;
     130        (this.terminated){ 0 };
     131        this.do_terminate = false;
     132        this.preemption_alarm = NULL;
     133        this.pending_preemption = false;
     134
     135        start( &this );
     136}
     137
     138void ?{}(processor & this, cluster * cltr, processorCtx_t & runner) {
     139        this.cltr = cltr;
     140        (this.terminated){ 0 };
     141        this.do_terminate = false;
     142        this.preemption_alarm = NULL;
     143        this.pending_preemption = false;
     144        this.kernel_thread = pthread_self();
     145
     146        this.runner = &runner;
     147        LIB_DEBUG_PRINT_SAFE("Kernel : constructing main processor context %p\n", &runner);
     148        runner{ &this };
     149}
     150
     151void ^?{}(processor & this) {
     152        if( ! this.do_terminate ) {
     153                LIB_DEBUG_PRINT_SAFE("Kernel : core %p signaling termination\n", &this);
     154                this.do_terminate = true;
     155                P( &this.terminated );
     156                pthread_join( this.kernel_thread, NULL );
     157        }
     158}
     159
     160void ?{}(cluster & this) {
     161        ( this.ready_queue ){};
     162        ( this.ready_queue_lock ){};
     163
     164        this.preemption = default_preemption();
     165}
     166
     167void ^?{}(cluster & this) {
    168168
    169169}
     
    173173//=============================================================================================
    174174//Main of the processor contexts
    175 void main(processorCtx_t * runner) {
    176         processor * this = runner->proc;
     175void main(processorCtx_t & runner) {
     176        processor * this = runner.proc;
    177177
    178178        LIB_DEBUG_PRINT_SAFE("Kernel : core %p starting\n", this);
     
    219219// from the processor coroutine to the target thread
    220220void runThread(processor * this, thread_desc * dst) {
    221         coroutine_desc * proc_cor = get_coroutine(this->runner);
     221        coroutine_desc * proc_cor = get_coroutine(*this->runner);
    222222        coroutine_desc * thrd_cor = get_coroutine(dst);
    223223
     
    301301        // appropriate stack.
    302302        proc_cor_storage.__cor.state = Active;
    303         main( &proc_cor_storage );
     303        main( proc_cor_storage );
    304304        proc_cor_storage.__cor.state = Halted;
    305305
     
    441441        mainThread = (thread_desc *)&storage_mainThread;
    442442        current_stack_info_t info;
    443         mainThread{ &info };
     443        (*mainThread){ &info };
    444444
    445445        LIB_DEBUG_PRINT_SAFE("Kernel : Main thread ready\n");
     
    447447        // Initialize the main cluster
    448448        mainCluster = (cluster *)&storage_mainCluster;
    449         mainCluster{};
     449        (*mainCluster){};
    450450
    451451        LIB_DEBUG_PRINT_SAFE("Kernel : main cluster ready\n");
     
    454454        // (the coroutine that contains the processing control flow)
    455455        mainProcessor = (processor *)&storage_mainProcessor;
    456         mainProcessor{ mainCluster, (processorCtx_t *)&storage_mainProcessorCtx };
     456        (*mainProcessor){ mainCluster, *(processorCtx_t *)&storage_mainProcessorCtx };
    457457
    458458        //initialize the global state variables
     
    471471        // context. Hence, the main thread does not begin through CtxInvokeThread, like all other threads. The trick here is that
    472472        // mainThread is on the ready queue when this call is made.
    473         resume( mainProcessor->runner );
     473        resume( *mainProcessor->runner );
    474474
    475475
     
    499499        // Destroy the main processor and its context in reverse order of construction
    500500        // These were manually constructed so we need manually destroy them
    501         ^(mainProcessor->runner){};
     501        ^(*mainProcessor->runner){};
    502502        ^(mainProcessor){};
    503503
     
    567567//-----------------------------------------------------------------------------
    568568// Locks
    569 void ?{}( spinlock * this ) {
    570         this->lock = 0;
    571 }
    572 void ^?{}( spinlock * this ) {
     569void ?{}( spinlock & this ) {
     570        this.lock = 0;
     571}
     572void ^?{}( spinlock & this ) {
    573573
    574574}
     
    604604}
    605605
    606 void  ?{}( semaphore * this, int count = 1 ) {
    607         (&this->lock){};
    608         this->count = count;
    609         (&this->waiting){};
    610 }
    611 void ^?{}(semaphore * this) {}
     606void  ?{}( semaphore & this, int count = 1 ) {
     607        (this.lock){};
     608        this.count = count;
     609        (this.waiting){};
     610}
     611void ^?{}(semaphore & this) {}
    612612
    613613void P(semaphore * this) {
     
    643643//-----------------------------------------------------------------------------
    644644// Queues
    645 void ?{}( __thread_queue_t * this ) {
    646         this->head = NULL;
    647         this->tail = &this->head;
     645void ?{}( __thread_queue_t & this ) {
     646        this.head = NULL;
     647        this.tail = &this.head;
    648648}
    649649
     
    666666}
    667667
    668 void ?{}( __condition_stack_t * this ) {
    669         this->top = NULL;
     668void ?{}( __condition_stack_t & this ) {
     669        this.top = NULL;
    670670}
    671671
  • src/libcfa/concurrency/monitor

    raf08051 r28e58fd  
    2222#include "stdlib"
    2323
    24 static inline void ?{}(monitor_desc * this) {
    25         this->owner = NULL;
    26         this->recursion = 0;
     24static inline void ?{}(monitor_desc & this) {
     25        this.owner = NULL;
     26        this.recursion = 0;
    2727}
    2828
     
    3838}
    3939
    40 void ?{}( monitor_guard_t * this, monitor_desc ** m, int count );
    41 void ^?{}( monitor_guard_t * this );
     40void ?{}( monitor_guard_t & this, monitor_desc ** m, int count );
     41void ^?{}( monitor_guard_t & this );
    4242
    4343//-----------------------------------------------------------------------------
     
    6464};
    6565
    66 void ?{}( __condition_blocked_queue_t * );
     66void ?{}( __condition_blocked_queue_t & );
    6767void append( __condition_blocked_queue_t *, __condition_node_t * );
    6868__condition_node_t * pop_head( __condition_blocked_queue_t * );
     
    7474};
    7575
    76 static inline void ?{}( condition * this ) {
    77         this->monitors = NULL;
    78         this->monitor_count = 0;
     76static inline void ?{}( condition & this ) {
     77        this.monitors = NULL;
     78        this.monitor_count = 0;
    7979}
    8080
    81 static inline void ^?{}( condition * this ) {
    82         free( this->monitors );
     81static inline void ^?{}( condition & this ) {
     82        free( this.monitors );
    8383}
    8484
  • src/libcfa/concurrency/monitor.c

    raf08051 r28e58fd  
    139139}
    140140
    141 void ?{}( monitor_guard_t * this, monitor_desc ** m, int count ) {
    142         this->m = m;
    143         this->count = count;
    144         qsort(this->m, count);
    145         enter( this->m, this->count );
    146 
    147         this->prev_mntrs = this_thread->current_monitors;
    148         this->prev_count = this_thread->current_monitor_count;
     141void ?{}( monitor_guard_t & this, monitor_desc ** m, int count ) {
     142        this.m = m;
     143        this.count = count;
     144        qsort(this.m, count);
     145        enter( this.m, this.count );
     146
     147        this.prev_mntrs = this_thread->current_monitors;
     148        this.prev_count = this_thread->current_monitor_count;
    149149
    150150        this_thread->current_monitors      = m;
     
    152152}
    153153
    154 void ^?{}( monitor_guard_t * this ) {
    155         leave( this->m, this->count );
    156 
    157         this_thread->current_monitors      = this->prev_mntrs;
    158         this_thread->current_monitor_count = this->prev_count;
    159 }
    160 
    161 void ?{}(__condition_node_t * this, thread_desc * waiting_thread, unsigned short count, uintptr_t user_info ) {
    162         this->waiting_thread = waiting_thread;
    163         this->count = count;
    164         this->next = NULL;
    165         this->user_info = user_info;
    166 }
    167 
    168 void ?{}(__condition_criterion_t * this ) {
    169         this->ready  = false;
    170         this->target = NULL;
    171         this->owner  = NULL;
    172         this->next   = NULL;
    173 }
    174 
    175 void ?{}(__condition_criterion_t * this, monitor_desc * target, __condition_node_t * owner ) {
    176         this->ready  = false;
    177         this->target = target;
    178         this->owner  = owner;
    179         this->next   = NULL;
     154void ^?{}( monitor_guard_t & this ) {
     155        leave( this.m, this.count );
     156
     157        this_thread->current_monitors      = this.prev_mntrs;
     158        this_thread->current_monitor_count = this.prev_count;
     159}
     160
     161void ?{}(__condition_node_t & this, thread_desc * waiting_thread, unsigned short count, uintptr_t user_info ) {
     162        this.waiting_thread = waiting_thread;
     163        this.count = count;
     164        this.next = NULL;
     165        this.user_info = user_info;
     166}
     167
     168void ?{}(__condition_criterion_t & this ) {
     169        this.ready  = false;
     170        this.target = NULL;
     171        this.owner  = NULL;
     172        this.next   = NULL;
     173}
     174
     175void ?{}(__condition_criterion_t & this, monitor_desc * target, __condition_node_t * owner ) {
     176        this.ready  = false;
     177        this.target = target;
     178        this.owner  = owner;
     179        this.next   = NULL;
    180180}
    181181
     
    202202        __condition_criterion_t criteria[count];
    203203        for(int i = 0; i < count; i++) {
    204                 (&criteria[i]){ this->monitors[i], &waiter };
     204                (criteria[i]){ this->monitors[i], &waiter };
    205205                // LIB_DEBUG_PRINT_SAFE( "Criterion %p\n", &criteria[i] );
    206206        }
     
    314314        __condition_criterion_t criteria[count];
    315315        for(int i = 0; i < count; i++) {
    316                 (&criteria[i]){ this->monitors[i], &waiter };
     316                (criteria[i]){ this->monitors[i], &waiter };
    317317                // LIB_DEBUG_PRINT_SAFE( "Criterion %p\n", &criteria[i] );
    318318                push( &criteria[i].target->signal_stack, &criteria[i] );
     
    505505}
    506506
    507 void ?{}( __condition_blocked_queue_t * this ) {
    508         this->head = NULL;
    509         this->tail = &this->head;
     507void ?{}( __condition_blocked_queue_t & this ) {
     508        this.head = NULL;
     509        this.tail = &this.head;
    510510}
    511511
  • src/libcfa/concurrency/preemption.c

    raf08051 r28e58fd  
    7171static pthread_t alarm_thread;                        // pthread handle to alarm thread
    7272
    73 void ?{}(event_kernel_t * this) {
    74         (&this->alarms){};
    75         (&this->lock){};
     73void ?{}(event_kernel_t & this) {
     74        (this.alarms){};
     75        (this.lock){};
    7676}
    7777
     
    240240        // Initialize the event kernel
    241241        event_kernel = (event_kernel_t *)&storage_event_kernel;
    242         event_kernel{};
     242        (*event_kernel){};
    243243
    244244        // Setup proper signal handlers
     
    276276// Raii ctor/dtor for the preemption_scope
    277277// Used by thread to control when they want to receive preemption signals
    278 void ?{}( preemption_scope * this, processor * proc ) {
    279         (&this->alarm){ proc, zero_time, zero_time };
    280         this->proc = proc;
    281         this->proc->preemption_alarm = &this->alarm;
    282 
    283         update_preemption( this->proc, from_us(this->proc->cltr->preemption) );
    284 }
    285 
    286 void ^?{}( preemption_scope * this ) {
     278void ?{}( preemption_scope & this, processor * proc ) {
     279        (this.alarm){ proc, zero_time, zero_time };
     280        this.proc = proc;
     281        this.proc->preemption_alarm = &this.alarm;
     282
     283        update_preemption( this.proc, from_us(this.proc->cltr->preemption) );
     284}
     285
     286void ^?{}( preemption_scope & this ) {
    287287        disable_interrupts();
    288288
    289         update_preemption( this->proc, zero_time );
     289        update_preemption( this.proc, zero_time );
    290290}
    291291
  • src/libcfa/concurrency/preemption.h

    raf08051 r28e58fd  
    3030};
    3131
    32 void ?{}( preemption_scope * this, processor * proc );
    33 void ^?{}( preemption_scope * this );
     32void ?{}( preemption_scope & this, processor * proc );
     33void ^?{}( preemption_scope & this );
    3434
    3535// Local Variables: //
  • src/libcfa/concurrency/thread

    raf08051 r28e58fd  
    2727// Anything that is resumed is a coroutine.
    2828trait is_thread(dtype T) {
    29       void ^?{}(T* mutex this);
    30       void main(T* this);
    31       thread_desc* get_thread(T* this);
     29      void ^?{}(T& mutex this);
     30      void main(T& this);
     31      thread_desc* get_thread(T& this);
    3232};
    3333
    34 #define DECL_THREAD(X) thread_desc* get_thread(X* this) { return &this->__thrd; } void main(X* this)
     34#define DECL_THREAD(X) thread_desc* get_thread(X& this) { return &this.__thrd; } void main(X& this)
    3535
    3636forall( dtype T | is_thread(T) )
    37 static inline coroutine_desc* get_coroutine(T* this) {
     37static inline coroutine_desc* get_coroutine(T & this) {
    3838        return &get_thread(this)->cor;
    3939}
    4040
    4141forall( dtype T | is_thread(T) )
    42 static inline monitor_desc* get_monitor(T * this) {
     42static inline monitor_desc* get_monitor(T & this) {
    4343        return &get_thread(this)->mon;
    4444}
     
    5555
    5656forall( dtype T | is_thread(T) )
    57 void __thrd_start( T* this );
     57void __thrd_start( T & this );
    5858
    5959//-----------------------------------------------------------------------------
    6060// Ctors and dtors
    61 void ?{}(thread_desc* this);
    62 void ^?{}(thread_desc* this);
     61void ?{}(thread_desc& this);
     62void ^?{}(thread_desc& this);
    6363
    6464//-----------------------------------------------------------------------------
     
    7070};
    7171
    72 forall( dtype T | sized(T) | is_thread(T) | { void ?{}(T*); } )
    73 void ?{}( scoped(T)* this );
     72forall( dtype T | sized(T) | is_thread(T) | { void ?{}(T&); } )
     73void ?{}( scoped(T)& this );
    7474
    75 forall( dtype T, ttype P | sized(T) | is_thread(T) | { void ?{}(T*, P); } )
    76 void ?{}( scoped(T)* this, P params );
     75forall( dtype T, ttype P | sized(T) | is_thread(T) | { void ?{}(T&, P); } )
     76void ?{}( scoped(T)& this, P params );
    7777
    7878forall( dtype T | sized(T) | is_thread(T) )
    79 void ^?{}( scoped(T)* this );
     79void ^?{}( scoped(T)& this );
    8080
    8181void yield();
  • src/libcfa/concurrency/thread.c

    raf08051 r28e58fd  
    3232// Thread ctors and dtors
    3333
    34 void ?{}(thread_desc* this) {
    35         (&this->cor){};
    36         this->cor.name = "Anonymous Coroutine";
    37         this->mon.owner = this;
    38         this->mon.recursion = 1;
    39         this->next = NULL;
     34void ?{}(thread_desc& this) {
     35        (this.cor){};
     36        this.cor.name = "Anonymous Coroutine";
     37        this.mon.owner = &this;
     38        this.mon.recursion = 1;
     39        this.next = NULL;
    4040
    41         this->current_monitors      = &this->mon;
    42         this->current_monitor_count = 1;
     41        this.current_monitors      = &this.mon;
     42        this.current_monitor_count = 1;
    4343}
    4444
    45 void ^?{}(thread_desc* this) {
    46         ^(&this->cor){};
     45void ^?{}(thread_desc& this) {
     46        ^(this.cor){};
    4747}
    4848
    49 forall( dtype T | sized(T) | is_thread(T) | { void ?{}(T*); } )
    50 void ?{}( scoped(T)* this ) {
    51         (&this->handle){};
    52         __thrd_start(&this->handle);
     49forall( dtype T | sized(T) | is_thread(T) | { void ?{}(T&); } )
     50void ?{}( scoped(T)& this ) {
     51        (this.handle){};
     52        __thrd_start(this.handle);
    5353}
    5454
    55 forall( dtype T, ttype P | sized(T) | is_thread(T) | { void ?{}(T*, P); } )
    56 void ?{}( scoped(T)* this, P params ) {
    57         (&this->handle){ params };
    58         __thrd_start(&this->handle);
     55forall( dtype T, ttype P | sized(T) | is_thread(T) | { void ?{}(T&, P); } )
     56void ?{}( scoped(T)& this, P params ) {
     57        (this.handle){ params };
     58        __thrd_start(this.handle);
    5959}
    6060
    6161forall( dtype T | sized(T) | is_thread(T) )
    62 void ^?{}( scoped(T)* this ) {
    63         ^(&this->handle){};
     62void ^?{}( scoped(T)& this ) {
     63        ^(this.handle){};
    6464}
    6565
     
    6767// Starting and stopping threads
    6868forall( dtype T | is_thread(T) )
    69 void __thrd_start( T* this ) {
     69void __thrd_start( T& this ) {
    7070        coroutine_desc* thrd_c = get_coroutine(this);
    7171        thread_desc*  thrd_h = get_thread   (this);
     
    7777        create_stack(&thrd_c->stack, thrd_c->stack.size);
    7878        this_coroutine = thrd_c;
    79         CtxStart(this, CtxInvokeThread);
     79        CtxStart(&this, CtxInvokeThread);
    8080        assert( thrd_c->last->stack.context );
    8181        CtxSwitch( thrd_c->last->stack.context, thrd_c->stack.context );
  • src/libcfa/containers/maybe

    raf08051 r28e58fd  
    2727
    2828forall(otype T)
    29 void ?{}(maybe(T) * this);
     29void ?{}(maybe(T) & this);
    3030
    3131forall(otype T)
    32 void ?{}(maybe(T) * this, T value);
     32void ?{}(maybe(T) & this, T value);
    3333
    3434forall(otype T)
    35 void ?{}(maybe(T) * this, maybe(T) other);
     35void ?{}(maybe(T) & this, maybe(T) other);
    3636
    3737forall(otype T)
    38 void ^?{}(maybe(T) * this);
     38void ^?{}(maybe(T) & this);
    3939
    4040forall(otype T)
    41 maybe(T) ?=?(maybe(T) * this, maybe(T) other);
     41maybe(T) ?=?(maybe(T) & this, maybe(T) other);
    4242
    4343forall(otype T)
  • src/libcfa/containers/maybe.c

    raf08051 r28e58fd  
    1919
    2020forall(otype T)
    21 void ?{}(maybe(T) * this) {
    22         this->has_value = false;
     21void ?{}(maybe(T) & this) {
     22        this.has_value = false;
    2323}
    2424
    2525forall(otype T)
    26 void ?{}(maybe(T) * this, T value) {
    27         this->has_value = true;
    28         (&this->value){value};
     26void ?{}(maybe(T) & this, T value) {
     27        this.has_value = true;
     28        (this.value){value};
    2929}
    3030
    3131forall(otype T)
    32 void ?{}(maybe(T) * this, maybe(T) other) {
    33         this->has_value = other.has_value;
     32void ?{}(maybe(T) & this, maybe(T) other) {
     33        this.has_value = other.has_value;
    3434        if (other.has_value) {
    35                 (&this->value){other.value};
     35                (this.value){other.value};
    3636        }
    3737}
    3838
    3939forall(otype T)
    40 maybe(T) ?=?(maybe(T) * this, maybe(T) that) {
    41         if (this->has_value & that.has_value) {
    42                 this->value = that.value;
    43         } else if (this->has_value) {
    44                 ^(&this->value){};
    45                 this->has_value = false;
     40maybe(T) ?=?(maybe(T) & this, maybe(T) that) {
     41        if (this.has_value & that.has_value) {
     42                this.value = that.value;
     43        } else if (this.has_value) {
     44                ^(this.value){};
     45                this.has_value = false;
    4646        } else if (that.has_value) {
    47                 this->has_value = true;
    48                 (&this->value){that.value};
     47                this.has_value = true;
     48                (this.value){that.value};
    4949        }
     50        return this;
    5051}
    5152
    5253forall(otype T)
    53 void ^?{}(maybe(T) * this) {
    54         if (this->has_value) {
    55                 ^(&this->value){};
     54void ^?{}(maybe(T) & this) {
     55        if (this.has_value) {
     56                ^(this.value){};
    5657        }
    5758}
     
    8990        } else {
    9091                this->has_value = true;
    91                 (&this->value){value};
     92                (this->value){value};
    9293        }
    9394}
     
    9798        if (this->has_value) {
    9899                this->has_value = false;
    99                 ^(&this->value){};
     100                ^(this->value){};
    100101        }
    101102}
  • src/libcfa/containers/result

    raf08051 r28e58fd  
    3333
    3434forall(otype T, otype E)
    35 void ?{}(result(T, E) * this);
     35void ?{}(result(T, E) & this);
    3636
    3737forall(otype T, otype E)
    38 void ?{}(result(T, E) * this, one_t, T value);
     38void ?{}(result(T, E) & this, one_t, T value);
    3939
    4040forall(otype T, otype E)
    41 void ?{}(result(T, E) * this, zero_t, E error);
     41void ?{}(result(T, E) & this, zero_t, E error);
    4242
    4343forall(otype T, otype E)
    44 void ?{}(result(T, E) * this, result(T, E) other);
     44void ?{}(result(T, E) & this, result(T, E) other);
    4545
    4646forall(otype T, otype E)
    47 void ^?{}(result(T, E) * this);
     47void ^?{}(result(T, E) & this);
    4848
    4949forall(otype T, otype E)
    50 result(T, E) ?=?(result(T, E) * this, result(T, E) other);
     50result(T, E) ?=?(result(T, E) & this, result(T, E) other);
    5151
    5252forall(otype T, otype E)
  • src/libcfa/containers/result.c

    raf08051 r28e58fd  
    1919
    2020forall(otype T, otype E)
    21 void ?{}(result(T, E) * this) {
    22         this->has_value = false;
    23         (&this->error){};
     21void ?{}(result(T, E) & this) {
     22        this.has_value = false;
     23        (this.error){};
    2424}
    2525
    2626forall(otype T, otype E)
    27 void ?{}(result(T, E) * this, one_t, T value) {
    28         this->has_value = true;
    29         (&this->value){value};
     27void ?{}(result(T, E) & this, one_t, T value) {
     28        this.has_value = true;
     29        (this.value){value};
    3030}
    3131
    3232forall(otype T, otype E)
    33 void ?{}(result(T, E) * this, zero_t, E error) {
    34         this->has_value = false;
    35         (&this->error){error};
     33void ?{}(result(T, E) & this, zero_t, E error) {
     34        this.has_value = false;
     35        (this.error){error};
    3636}
    3737
    3838forall(otype T, otype E)
    39 void ?{}(result(T, E) * this, result(T, E) other) {
    40         this->has_value = other.has_value;
     39void ?{}(result(T, E) & this, result(T, E) other) {
     40        this.has_value = other.has_value;
    4141        if (other.has_value) {
    42                 (&this->value){other.value};
     42                (this.value){other.value};
    4343        } else {
    44                 (&this->error){other.error};
     44                (this.error){other.error};
    4545        }
    4646}
    4747
    4848forall(otype T, otype E)
    49 result(T, E) ?=?(result(T, E) * this, result(T, E) that) {
    50         if (this->has_value & that.has_value) {
    51                 this->value = that.value;
    52         } else if (this->has_value) {
    53                 ^(&this->value){};
    54                 this->has_value = false;
    55                 (&this->error){that.error};
     49result(T, E) ?=?(result(T, E) & this, result(T, E) that) {
     50        if (this.has_value & that.has_value) {
     51                this.value = that.value;
     52        } else if (this.has_value) {
     53                ^(this.value){};
     54                this.has_value = false;
     55                (this.error){that.error};
    5656        } else if (that.has_value) {
    57                 ^(&this->error){};
    58                 this->has_value = true;
    59                 (&this->value){that.value};
     57                ^(this.error){};
     58                this.has_value = true;
     59                (this.value){that.value};
    6060        } else {
    61                 this->error = that.error;
     61                this.error = that.error;
    6262        }
    6363}
    6464
    6565forall(otype T, otype E)
    66 void ^?{}(result(T, E) * this) {
    67         if (this->has_value) {
    68                 ^(&this->value){};
     66void ^?{}(result(T, E) & this) {
     67        if (this.has_value) {
     68                ^(this.value){};
    6969        } else {
    70                 ^(&this->error){};
     70                ^(this.error){};
    7171        }
    7272}
     
    109109                this->value = value;
    110110        } else {
    111                 ^(&this->error){};
     111                ^(this->error){};
    112112                this->has_value = true;
    113                 (&this->value){value};
     113                (this->value){value};
    114114        }
    115115}
     
    118118void set_error(result(T, E) * this, E error) {
    119119        if (this->has_value) {
    120                 ^(&this->value){};
     120                ^(this->value){};
    121121                this->has_value = false;
    122                 (&this->error){error};
     122                (this->error){error};
    123123        } else {
    124124                this->error = error;
  • src/libcfa/containers/vector

    raf08051 r28e58fd  
    3030
    3131forall(otype T)
    32 void ?{}(heap_allocator(T)* this);
     32void ?{}(heap_allocator(T)& this);
    3333
    3434forall(otype T)
    35 void ?{}(heap_allocator(T)* this, heap_allocator(T) rhs);
     35void ?{}(heap_allocator(T)& this, heap_allocator(T) rhs);
    3636
    3737forall(otype T)
    38 heap_allocator(T) ?=?(heap_allocator(T)* this, heap_allocator(T) rhs);
     38heap_allocator(T) ?=?(heap_allocator(T)& this, heap_allocator(T) rhs);
    3939
    4040forall(otype T)
    41 void ^?{}(heap_allocator(T)* this);
     41void ^?{}(heap_allocator(T)& this);
    4242
    4343forall(otype T)
     
    6464//Initialization
    6565forall(otype T, otype allocator_t | allocator_c(T, allocator_t))
    66 void ?{}(vector(T, allocator_t)* this);
     66void ?{}(vector(T, allocator_t)& this);
    6767
    6868forall(otype T, otype allocator_t | allocator_c(T, allocator_t))
    69 void ?{}(vector(T, allocator_t)* this, vector(T, allocator_t) rhs);
     69void ?{}(vector(T, allocator_t)& this, vector(T, allocator_t) rhs);
    7070
    7171forall(otype T, otype allocator_t | allocator_c(T, allocator_t))
    72 vector(T, allocator_t) ?=?(vector(T, allocator_t)* this, vector(T, allocator_t) rhs);
     72vector(T, allocator_t) ?=?(vector(T, allocator_t)& this, vector(T, allocator_t) rhs);
    7373
    7474forall(otype T, otype allocator_t | allocator_c(T, allocator_t))
    75 void ^?{}(vector(T, allocator_t)* this);
     75void ^?{}(vector(T, allocator_t)& this);
    7676
    7777forall(otype T, otype allocator_t = heap_allocator(T) | allocator_c(T, allocator_t))
  • src/libcfa/containers/vector.c

    raf08051 r28e58fd  
    2424//Initialization
    2525forall(otype T, otype allocator_t | allocator_c(T, allocator_t))
    26 void ?{}(vector(T, allocator_t)* this)
     26void ?{}(vector(T, allocator_t)& this)
    2727{
    28         (&this->storage){};
    29         this->size = 0;
     28        (this.storage){};
     29        this.size = 0;
    3030}
    3131
    3232forall(otype T, otype allocator_t | allocator_c(T, allocator_t))
    33 void ?{}(vector(T, allocator_t)* this, vector(T, allocator_t) rhs)
     33void ?{}(vector(T, allocator_t)& this, vector(T, allocator_t) rhs)
    3434{
    35         (&this->storage){ rhs.storage };
    36         copy_internal(this, &rhs);
     35        (this.storage){ rhs.storage };
     36        copy_internal(&this, &rhs);
    3737}
    3838
     
    4646
    4747forall(otype T, otype allocator_t | allocator_c(T, allocator_t))
    48 void ^?{}(vector(T, allocator_t)* this)
     48void ^?{}(vector(T, allocator_t)& this)
    4949{
    50         clear(this);
    51         ^(&this->storage){};
     50        clear(&this);
     51        ^(this.storage){};
    5252}
    5353
     
    6666{
    6767        this->size--;
    68         ^(&data(&this->storage)[this->size]){};
     68        ^(data(&this->storage)[this->size]){};
    6969}
    7070
     
    7474        for(size_t i = 0; i < this->size; i++)
    7575        {
    76                 ^(&data(&this->storage)[this->size]){};
     76                ^(data(&this->storage)[this->size]){};
    7777        }
    7878        this->size = 0;
     
    8787        this->size = other->size;
    8888        for(size_t i = 0; i < this->size; i++) {
    89                 (&data(&this->storage)[this->size]){ data(&other->storage)[other->size] };
     89                (data(&this->storage)[this->size]){ data(&other->storage)[other->size] };
    9090        }
    9191}
     
    9494//Allocator
    9595forall(otype T)
    96 void ?{}(heap_allocator(T)* this)
     96void ?{}(heap_allocator(T)& this)
    9797{
    98         this->storage = 0;
    99         this->capacity = 0;
     98        this.storage = 0;
     99        this.capacity = 0;
    100100}
    101101
    102102forall(otype T)
    103 void ?{}(heap_allocator(T)* this, heap_allocator(T) rhs)
     103void ?{}(heap_allocator(T)& this, heap_allocator(T) rhs)
    104104{
    105         this->capacity = rhs.capacity;
    106         this->storage = (T*)realloc((void*)this->storage, this->capacity * sizeof(T));
     105        this.capacity = rhs.capacity;
     106        this.storage = (T*)realloc((void*)this.storage, this.capacity * sizeof(T));
    107107}
    108108
    109109forall(otype T)
    110 heap_allocator(T) ?=?(heap_allocator(T)* this, heap_allocator(T) rhs)
     110heap_allocator(T) ?=?(heap_allocator(T)& this, heap_allocator(T) rhs)
    111111{
    112         this->capacity = rhs.capacity;
    113         this->storage = (T*)realloc((void*)this->storage, this->capacity * sizeof(T));
    114         return *this;
     112        this.capacity = rhs.capacity;
     113        this.storage = (T*)realloc((void*)this.storage, this.capacity * sizeof(T));
     114        return this;
    115115}
    116116
    117117forall(otype T)
    118 void ^?{}(heap_allocator(T)* this)
     118void ^?{}(heap_allocator(T)& this)
    119119{
    120         free(this->storage);
     120        free(this.storage);
    121121}
    122122
  • src/libcfa/fstream

    raf08051 r28e58fd  
    5656int fmt( ofstream *, const char fmt[], ... );
    5757
    58 void ?{}( ofstream * );
     58void ?{}( ofstream & );
    5959
    6060extern ofstream * sout, * serr;
  • src/libcfa/fstream.c

    raf08051 r28e58fd  
    2727#define IO_MSG "I/O error: "
    2828
    29 void ?{}( ofstream * this, void * file, _Bool sepDefault, _Bool sepOnOff, const char * separator, const char * tupleSeparator ) {
    30         this->file = file;
    31         this->sepDefault = sepDefault;
    32         this->sepOnOff = sepOnOff;
    33         sepSet( this, separator );
    34         sepSetCur( this, sepGet( this ) );
    35         sepSetTuple( this, tupleSeparator );
     29void ?{}( ofstream & this, void * file, _Bool sepDefault, _Bool sepOnOff, const char * separator, const char * tupleSeparator ) {
     30        this.file = file;
     31        this.sepDefault = sepDefault;
     32        this.sepOnOff = sepOnOff;
     33        sepSet( &this, separator );
     34        sepSetCur( &this, sepGet( &this ) );
     35        sepSetTuple( &this, tupleSeparator );
    3636}
    3737
     
    9292                exit( EXIT_FAILURE );
    9393        } // if
    94         ?{}( os, file, true, false, " ", ", " );
     94        ?{}( *os, file, true, false, " ", ", " );
    9595} // open
    9696
  • src/libcfa/gmp

    raf08051 r28e58fd  
    1 // 
     1//
    22// Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo
    33//
    44// The contents of this file are covered under the licence agreement in the
    55// file "LICENCE" distributed with Cforall.
    6 // 
    7 // gmp -- 
    8 // 
     6//
     7// gmp --
     8//
    99// Author           : Peter A. Buhr
    1010// Created On       : Tue Apr 19 08:43:43 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Jul  7 09:33:20 2017
    13 // Update Count     : 15
    14 // 
     12// Last Modified On : Thu Aug 24 09:24:51 2017
     13// Update Count     : 16
     14//
    1515
    1616// https://gmplib.org/gmp-man-6.1.1.pdf
     
    2424
    2525// constructor
    26 static inline void ?{}( Int * this ) { mpz_init( this->mpz ); }
    27 static inline void ?{}( Int * this, Int init ) { mpz_init_set( this->mpz, init.mpz ); }
    28 static inline void ?{}( Int * this, zero_t ) { mpz_init_set_si( this->mpz, 0 ); }
    29 static inline void ?{}( Int * this, one_t ) { mpz_init_set_si( this->mpz, 1 ); }
    30 static inline void ?{}( Int * this, signed long int init ) { mpz_init_set_si( this->mpz, init ); }
    31 static inline void ?{}( Int * this, unsigned long int init ) { mpz_init_set_ui( this->mpz, init ); }
    32 static inline void ?{}( Int * this, const char * val ) { if ( mpz_init_set_str( this->mpz, val, 0 ) ) abort(); }
    33 static inline void ^?{}( Int * this ) { mpz_clear( this->mpz ); }
     26static inline void ?{}( Int & this ) { mpz_init( this.mpz ); }
     27static inline void ?{}( Int & this, Int init ) { mpz_init_set( this.mpz, init.mpz ); }
     28static inline void ?{}( Int & this, zero_t ) { mpz_init_set_si( this.mpz, 0 ); }
     29static inline void ?{}( Int & this, one_t ) { mpz_init_set_si( this.mpz, 1 ); }
     30static inline void ?{}( Int & this, signed long int init ) { mpz_init_set_si( this.mpz, init ); }
     31static inline void ?{}( Int & this, unsigned long int init ) { mpz_init_set_ui( this.mpz, init ); }
     32static inline void ?{}( Int & this, const char * val ) { if ( mpz_init_set_str( this.mpz, val, 0 ) ) abort(); }
     33static inline void ^?{}( Int & this ) { mpz_clear( this.mpz ); }
    3434
    3535// assignment
    36 static inline Int ?=?( Int * lhs, Int rhs ) { mpz_set( lhs->mpz, rhs.mpz ); return *lhs; }
    37 static inline Int ?=?( Int * lhs, long int rhs ) { mpz_set_si( lhs->mpz, rhs ); return *lhs; }
    38 static inline Int ?=?( Int * lhs, unsigned long int rhs ) { mpz_set_ui( lhs->mpz, rhs ); return *lhs; }
    39 static inline Int ?=?( Int * lhs, const char * rhs ) { if ( mpz_set_str( lhs->mpz, rhs, 0 ) ) { printf( "invalid string conversion\n" ); abort(); } return *lhs; }
    40 
    41 static inline char ?=?( char * lhs, Int rhs ) { char val = mpz_get_si( rhs.mpz ); *lhs = val; return val; }
    42 static inline short int ?=?( short int * lhs, Int rhs ) { short int val = mpz_get_si( rhs.mpz ); *lhs = val; return val; }
    43 static inline int ?=?( int * lhs, Int rhs ) { int val = mpz_get_si( rhs.mpz ); *lhs = val; return val; }
    44 static inline long int ?=?( long int * lhs, Int rhs ) { long int val = mpz_get_si( rhs.mpz ); *lhs = val; return val; }
    45 static inline unsigned char ?=?( unsigned char * lhs, Int rhs ) { unsigned char val = mpz_get_ui( rhs.mpz ); *lhs = val; return val; }
    46 static inline unsigned short int ?=?( unsigned short int * lhs, Int rhs ) { unsigned short int val = mpz_get_ui( rhs.mpz ); *lhs = val; return val; }
    47 static inline unsigned int ?=?( unsigned int * lhs, Int rhs ) { unsigned int val = mpz_get_ui( rhs.mpz ); *lhs = val; return val; }
    48 static inline unsigned long int ?=?( unsigned long int * lhs, Int rhs ) { unsigned long int val = mpz_get_ui( rhs.mpz ); *lhs = val; return val; }
     36static inline Int ?=?( Int & lhs, Int rhs ) { mpz_set( lhs.mpz, rhs.mpz ); return lhs; }
     37static inline Int ?=?( Int & lhs, long int rhs ) { mpz_set_si( lhs.mpz, rhs ); return lhs; }
     38static inline Int ?=?( Int & lhs, unsigned long int rhs ) { mpz_set_ui( lhs.mpz, rhs ); return lhs; }
     39static inline Int ?=?( Int & lhs, const char * rhs ) { if ( mpz_set_str( lhs.mpz, rhs, 0 ) ) { printf( "invalid string conversion\n" ); abort(); } return lhs; }
     40
     41static inline char ?=?( char & lhs, Int rhs ) { char val = mpz_get_si( rhs.mpz ); lhs = val; return lhs; }
     42static inline short int ?=?( short int & lhs, Int rhs ) { short int val = mpz_get_si( rhs.mpz ); lhs = val; return lhs; }
     43static inline int ?=?( int & lhs, Int rhs ) { int val = mpz_get_si( rhs.mpz ); lhs = val; return lhs; }
     44static inline long int ?=?( long int & lhs, Int rhs ) { long int val = mpz_get_si( rhs.mpz ); lhs = val; return lhs; }
     45static inline unsigned char ?=?( unsigned char & lhs, Int rhs ) { unsigned char val = mpz_get_ui( rhs.mpz ); lhs = val; return lhs; }
     46static inline unsigned short int ?=?( unsigned short int & lhs, Int rhs ) { unsigned short int val = mpz_get_ui( rhs.mpz ); lhs = val; return lhs; }
     47static inline unsigned int ?=?( unsigned int & lhs, Int rhs ) { unsigned int val = mpz_get_ui( rhs.mpz ); lhs = val; return lhs; }
     48static inline unsigned long int ?=?( unsigned long int & lhs, Int rhs ) { unsigned long int val = mpz_get_ui( rhs.mpz ); lhs = val; return lhs; }
    4949
    5050// conversions
     
    9999static inline Int ?&?( Int oper1, unsigned long int oper2 ) { Int conjunction, temp; mpz_set_ui( temp.mpz, oper2 ); mpz_and( conjunction.mpz, oper1.mpz, temp.mpz ); return conjunction; }
    100100static inline Int ?&?( unsigned long int oper1, Int oper2 ) { Int conjunction, temp; mpz_set_ui( temp.mpz, oper1 ); mpz_and( conjunction.mpz, temp.mpz, oper2.mpz ); return conjunction; }
    101 static inline Int ?&=?( Int * lhs, Int rhs ) { return *lhs = *lhs & rhs; }
     101static inline Int ?&=?( Int & lhs, Int rhs ) { return lhs = lhs & rhs; }
    102102
    103103static inline Int ?|?( Int oper1, Int oper2 ) { Int disjunction; mpz_ior( disjunction.mpz, oper1.mpz, oper2.mpz ); return disjunction; }
     
    106106static inline Int ?|?( Int oper1, unsigned long int oper2 ) { Int disjunction, temp; mpz_set_ui( temp.mpz, oper2 ); mpz_ior( disjunction.mpz, oper1.mpz, temp.mpz ); return disjunction; }
    107107static inline Int ?|?( unsigned long int oper1, Int oper2 ) { Int disjunction, temp; mpz_set_ui( temp.mpz, oper1 ); mpz_ior( disjunction.mpz, temp.mpz, oper2.mpz ); return disjunction; }
    108 static inline Int ?|=?( Int * lhs, Int rhs ) { return *lhs = *lhs | rhs; }
     108static inline Int ?|=?( Int & lhs, Int rhs ) { return lhs = lhs | rhs; }
    109109
    110110static inline Int ?^?( Int oper1, Int oper2 ) { Int disjunction; mpz_xor( disjunction.mpz, oper1.mpz, oper2.mpz ); return disjunction; }
     
    113113static inline Int ?^?( Int oper1, unsigned long int oper2 ) { Int disjunction, temp; mpz_set_ui( temp.mpz, oper2 ); mpz_ior( disjunction.mpz, oper1.mpz, temp.mpz ); return disjunction; }
    114114static inline Int ?^?( unsigned long int oper1, Int oper2 ) { Int disjunction, temp; mpz_set_ui( temp.mpz, oper1 ); mpz_ior( disjunction.mpz, temp.mpz, oper2.mpz ); return disjunction; }
    115 static inline Int ?^=?( Int * lhs, Int rhs ) { return *lhs = *lhs ^ rhs; }
     115static inline Int ?^=?( Int & lhs, Int rhs ) { return lhs = lhs ^ rhs; }
    116116
    117117static inline Int ?+?( Int addend1, Int addend2 ) { Int sum; mpz_add( sum.mpz, addend1.mpz, addend2.mpz ); return sum; }
     
    120120static inline Int ?+?( Int addend1, unsigned long int addend2 ) { Int sum; mpz_add_ui( sum.mpz, addend1.mpz, addend2 ); return sum; }
    121121static inline Int ?+?( unsigned long int addend2, Int addend1 ) { Int sum; mpz_add_ui( sum.mpz, addend1.mpz, addend2 ); return sum; }
    122 static inline Int ?+=?( Int * lhs, Int rhs ) { return *lhs = *lhs + rhs; }
    123 static inline Int ?+=?( Int * lhs, long int rhs ) { return *lhs = *lhs + rhs; }
    124 static inline Int ?+=?( Int * lhs, unsigned long int rhs ) { return *lhs = *lhs + rhs; }
    125 static inline Int ++?( Int * lhs ) { return *lhs += 1; }
    126 static inline Int ?++( Int * lhs ) { Int ret = *lhs; *lhs += 1; return ret; }
     122static inline Int ?+=?( Int & lhs, Int rhs ) { return lhs = lhs + rhs; }
     123static inline Int ?+=?( Int & lhs, long int rhs ) { return lhs = lhs + rhs; }
     124static inline Int ?+=?( Int & lhs, unsigned long int rhs ) { return lhs = lhs + rhs; }
     125static inline Int ++?( Int & lhs ) { return lhs += 1; }
     126static inline Int ?++( Int & lhs ) { Int ret = lhs; lhs += 1; return ret; }
    127127
    128128static inline Int ?-?( Int minuend, Int subtrahend ) { Int diff; mpz_sub( diff.mpz, minuend.mpz, subtrahend.mpz ); return diff; }
     
    131131static inline Int ?-?( Int minuend, unsigned long int subtrahend ) { Int diff; mpz_sub_ui( diff.mpz, minuend.mpz, subtrahend ); return diff; }
    132132static inline Int ?-?( unsigned long int minuend, Int subtrahend ) { Int diff; mpz_ui_sub( diff.mpz, minuend, subtrahend.mpz ); return diff; }
    133 static inline Int ?-=?( Int * lhs, Int rhs ) { return *lhs = *lhs - rhs; }
    134 static inline Int ?-=?( Int * lhs, long int rhs ) { return *lhs = *lhs - rhs; }
    135 static inline Int ?-=?( Int * lhs, unsigned long int rhs ) { return *lhs = *lhs - rhs; }
    136 static inline Int --?( Int * lhs ) { return *lhs -= 1; }
    137 static inline Int ?--( Int * lhs ) { Int ret = *lhs; *lhs -= 1; return ret; }
     133static inline Int ?-=?( Int & lhs, Int rhs ) { return lhs = lhs - rhs; }
     134static inline Int ?-=?( Int & lhs, long int rhs ) { return lhs = lhs - rhs; }
     135static inline Int ?-=?( Int & lhs, unsigned long int rhs ) { return lhs = lhs - rhs; }
     136static inline Int --?( Int & lhs ) { return lhs -= 1; }
     137static inline Int ?--( Int & lhs ) { Int ret = lhs; lhs -= 1; return ret; }
    138138
    139139static inline Int ?*?( Int multiplicator, Int multiplicand ) { Int product; mpz_mul( product.mpz, multiplicator.mpz, multiplicand.mpz ); return product; }
     
    142142static inline Int ?*?( Int multiplicator, unsigned long int multiplicand ) { Int product; mpz_mul_ui( product.mpz, multiplicator.mpz, multiplicand ); return product; }
    143143static inline Int ?*?( unsigned long int multiplicand, Int multiplicator ) { Int product; mpz_mul_ui( product.mpz, multiplicator.mpz, multiplicand ); return product; }
    144 static inline Int ?*=?( Int * lhs, Int rhs ) { return *lhs = *lhs * rhs; }
    145 static inline Int ?*=?( Int * lhs, long int rhs ) { return *lhs = *lhs * rhs; }
    146 static inline Int ?*=?( Int * lhs, unsigned long int rhs ) { return *lhs = *lhs * rhs; }
     144static inline Int ?*=?( Int & lhs, Int rhs ) { return lhs = lhs * rhs; }
     145static inline Int ?*=?( Int & lhs, long int rhs ) { return lhs = lhs * rhs; }
     146static inline Int ?*=?( Int & lhs, unsigned long int rhs ) { return lhs = lhs * rhs; }
    147147
    148148// some code for operators "/" and "%" taken from g++ gmpxx.h
     
    187187        return quotient;
    188188} // ?/?
    189 static inline Int ?/=?( Int * lhs, Int rhs ) { return *lhs = *lhs / rhs; }
    190 static inline Int ?/=?( Int * lhs, long int rhs ) { return *lhs = *lhs / rhs; }
    191 static inline Int ?/=?( Int * lhs, unsigned long int rhs ) { return *lhs = *lhs / rhs; }
     189static inline Int ?/=?( Int & lhs, Int rhs ) { return lhs = lhs / rhs; }
     190static inline Int ?/=?( Int & lhs, long int rhs ) { return lhs = lhs / rhs; }
     191static inline Int ?/=?( Int & lhs, unsigned long int rhs ) { return lhs = lhs / rhs; }
    192192
    193193static inline [ Int, Int ] div( Int dividend, Int divisor ) { Int quotient, remainder; mpz_fdiv_qr( quotient.mpz, remainder.mpz, dividend.mpz, divisor.mpz ); return [ quotient, remainder ]; }
     
    228228        return remainder;
    229229} // ?%?
    230 static inline Int ?%=?( Int * lhs, Int rhs ) { return *lhs = *lhs % rhs; }
    231 static inline Int ?%=?( Int * lhs, long int rhs ) { return *lhs = *lhs % rhs; }
    232 static inline Int ?%=?( Int * lhs, unsigned long int rhs ) { return *lhs = *lhs % rhs; }
     230static inline Int ?%=?( Int & lhs, Int rhs ) { return lhs = lhs % rhs; }
     231static inline Int ?%=?( Int & lhs, long int rhs ) { return lhs = lhs % rhs; }
     232static inline Int ?%=?( Int & lhs, unsigned long int rhs ) { return lhs = lhs % rhs; }
    233233
    234234static inline Int ?<<?( Int shiften, mp_bitcnt_t shift ) { Int shifted; mpz_mul_2exp( shifted.mpz, shiften.mpz, shift ); return shifted; }
    235 static inline Int ?<<=?( Int * lhs, mp_bitcnt_t shift ) { return *lhs = *lhs << shift; }
     235static inline Int ?<<=?( Int & lhs, mp_bitcnt_t shift ) { return lhs = lhs << shift; }
    236236static inline Int ?>>?( Int shiften, mp_bitcnt_t shift ) { Int shifted; mpz_fdiv_q_2exp( shifted.mpz, shiften.mpz, shift ); return shifted; }
    237 static inline Int ?>>=?( Int * lhs, mp_bitcnt_t shift ) { return *lhs = *lhs >> shift; }
     237static inline Int ?>>=?( Int & lhs, mp_bitcnt_t shift ) { return lhs = lhs >> shift; }
    238238
    239239// number functions
     
    252252// I/O
    253253static inline forall( dtype istype | istream( istype ) )
    254 istype * ?|?( istype * is, Int * mp ) {
    255         gmp_scanf( "%Zd", mp );
     254istype * ?|?( istype * is, Int & mp ) {
     255        gmp_scanf( "%Zd", &mp );
    256256        return is;
    257257} // ?|?
  • src/libcfa/interpose.c

    raf08051 r28e58fd  
    4949
    5050        union { generic_fptr_t fptr; void* ptr; } originalFunc;
    51        
     51
    5252        #if defined( _GNU_SOURCE )
    5353                if ( version ) {
     
    5959                originalFunc.ptr = dlsym( library, symbol );
    6060        #endif // _GNU_SOURCE
    61        
     61
    6262        error = dlerror();
    63         if ( error ) abortf( "interpose_symbol : internal error, %s\n", error ); 
     63        if ( error ) abortf( "interpose_symbol : internal error, %s\n", error );
    6464
    6565        return originalFunc.fptr;
     
    7474forall(dtype T)
    7575static inline void assign_ptr( T** symbol_ptr, const char * symbol_name, const char * version) {
    76         union { 
     76        union {
    7777                generic_fptr_t gp;
    78                 T* tp; 
     78                T* tp;
    7979        } u;
    8080
  • src/libcfa/iostream

    raf08051 r28e58fd  
    1010// Created On       : Wed May 27 17:56:53 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Aug  9 16:42:47 2017
    13 // Update Count     : 131
     12// Last Modified On : Thu Aug 24 08:14:29 2017
     13// Update Count     : 133
    1414//
    1515
     
    117117}; // readable
    118118
    119 forall( dtype istype | istream( istype ) ) istype * ?|?( istype *, char * );
     119forall( dtype istype | istream( istype ) ) istype * ?|?( istype *, char & );
    120120
    121 forall( dtype istype | istream( istype ) ) istype * ?|?( istype *, short int * );
    122 forall( dtype istype | istream( istype ) ) istype * ?|?( istype *, unsigned short int * );
    123 forall( dtype istype | istream( istype ) ) istype * ?|?( istype *, int * );
    124 forall( dtype istype | istream( istype ) ) istype * ?|?( istype *, unsigned int * );
    125 forall( dtype istype | istream( istype ) ) istype * ?|?( istype *, long int * );
    126 forall( dtype istype | istream( istype ) ) istype * ?|?( istype *, long long int * );
    127 forall( dtype istype | istream( istype ) ) istype * ?|?( istype *, unsigned long int * );
    128 forall( dtype istype | istream( istype ) ) istype * ?|?( istype *, unsigned long long int * );
     121forall( dtype istype | istream( istype ) ) istype * ?|?( istype *, short int & );
     122forall( dtype istype | istream( istype ) ) istype * ?|?( istype *, unsigned short int & );
     123forall( dtype istype | istream( istype ) ) istype * ?|?( istype *, int & );
     124forall( dtype istype | istream( istype ) ) istype * ?|?( istype *, unsigned int & );
     125forall( dtype istype | istream( istype ) ) istype * ?|?( istype *, long int & );
     126forall( dtype istype | istream( istype ) ) istype * ?|?( istype *, long long int & );
     127forall( dtype istype | istream( istype ) ) istype * ?|?( istype *, unsigned long int & );
     128forall( dtype istype | istream( istype ) ) istype * ?|?( istype *, unsigned long long int & );
    129129
    130 forall( dtype istype | istream( istype ) ) istype * ?|?( istype *, float * );
    131 forall( dtype istype | istream( istype ) ) istype * ?|?( istype *, double * );
    132 forall( dtype istype | istream( istype ) ) istype * ?|?( istype *, long double * );
     130forall( dtype istype | istream( istype ) ) istype * ?|?( istype *, float & );
     131forall( dtype istype | istream( istype ) ) istype * ?|?( istype *, double & );
     132forall( dtype istype | istream( istype ) ) istype * ?|?( istype *, long double & );
    133133
    134 forall( dtype istype | istream( istype ) ) istype * ?|?( istype *, float _Complex * );
    135 forall( dtype istype | istream( istype ) ) istype * ?|?( istype *, double _Complex * );
    136 forall( dtype istype | istream( istype ) ) istype * ?|?( istype *, long double _Complex * );
     134forall( dtype istype | istream( istype ) ) istype * ?|?( istype *, float _Complex & );
     135forall( dtype istype | istream( istype ) ) istype * ?|?( istype *, double _Complex & );
     136forall( dtype istype | istream( istype ) ) istype * ?|?( istype *, long double _Complex & );
    137137
    138138struct _Istream_cstrUC { char * s; };
  • src/libcfa/iostream.c

    raf08051 r28e58fd  
    1010// Created On       : Wed May 27 17:56:53 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Aug  9 16:46:51 2017
    13 // Update Count     : 401
     12// Last Modified On : Thu Aug 24 08:41:53 2017
     13// Update Count     : 405
    1414//
    1515
     
    271271
    272272forall( dtype istype | istream( istype ) )
    273 istype * ?|?( istype * is, char * c ) {
    274         fmt( is, "%c", c );
    275         return is;
    276 } // ?|?
    277 
    278 forall( dtype istype | istream( istype ) )
    279 istype * ?|?( istype * is, short int * si ) {
    280         fmt( is, "%hd", si );
    281         return is;
    282 } // ?|?
    283 
    284 forall( dtype istype | istream( istype ) )
    285 istype * ?|?( istype * is, unsigned short int * usi ) {
    286         fmt( is, "%hu", usi );
    287         return is;
    288 } // ?|?
    289 
    290 forall( dtype istype | istream( istype ) )
    291 istype * ?|?( istype * is, int * i ) {
    292         fmt( is, "%d", i );
    293         return is;
    294 } // ?|?
    295 
    296 forall( dtype istype | istream( istype ) )
    297 istype * ?|?( istype * is, unsigned int * ui ) {
    298         fmt( is, "%u", ui );
    299         return is;
    300 } // ?|?
    301 
    302 forall( dtype istype | istream( istype ) )
    303 istype * ?|?( istype * is, long int * li ) {
    304         fmt( is, "%ld", li );
    305         return is;
    306 } // ?|?
    307 
    308 forall( dtype istype | istream( istype ) )
    309 istype * ?|?( istype * is, unsigned long int * ulli ) {
    310         fmt( is, "%lu", ulli );
    311         return is;
    312 } // ?|?
    313 
    314 forall( dtype istype | istream( istype ) )
    315 istype * ?|?( istype * is, long long int * lli ) {
    316         fmt( is, "%lld", lli );
    317         return is;
    318 } // ?|?
    319 
    320 forall( dtype istype | istream( istype ) )
    321 istype * ?|?( istype * is, unsigned long long int * ulli ) {
    322         fmt( is, "%llu", ulli );
    323         return is;
    324 } // ?|?
    325 
    326 
    327 forall( dtype istype | istream( istype ) )
    328 istype * ?|?( istype * is, float * f ) {
    329         fmt( is, "%f", f );
    330         return is;
    331 } // ?|?
    332 
    333 forall( dtype istype | istream( istype ) )
    334 istype * ?|?( istype * is, double * d ) {
    335         fmt( is, "%lf", d );
    336         return is;
    337 } // ?|?
    338 
    339 forall( dtype istype | istream( istype ) )
    340 istype * ?|?( istype * is, long double * ld ) {
    341         fmt( is, "%Lf", ld );
    342         return is;
    343 } // ?|?
    344 
    345 
    346 forall( dtype istype | istream( istype ) )
    347 istype * ?|?( istype * is, float _Complex * fc ) {
     273istype * ?|?( istype * is, char & c ) {
     274        fmt( is, "%c", &c );                                                            // must pass pointer through varg to fmt
     275        return is;
     276} // ?|?
     277
     278forall( dtype istype | istream( istype ) )
     279istype * ?|?( istype * is, short int & si ) {
     280        fmt( is, "%hd", &si );
     281        return is;
     282} // ?|?
     283
     284forall( dtype istype | istream( istype ) )
     285istype * ?|?( istype * is, unsigned short int & usi ) {
     286        fmt( is, "%hu", &usi );
     287        return is;
     288} // ?|?
     289
     290forall( dtype istype | istream( istype ) )
     291istype * ?|?( istype * is, int & i ) {
     292        fmt( is, "%d", &i );
     293        return is;
     294} // ?|?
     295
     296forall( dtype istype | istream( istype ) )
     297istype * ?|?( istype * is, unsigned int & ui ) {
     298        fmt( is, "%u", &ui );
     299        return is;
     300} // ?|?
     301
     302forall( dtype istype | istream( istype ) )
     303istype * ?|?( istype * is, long int & li ) {
     304        fmt( is, "%ld", &li );
     305        return is;
     306} // ?|?
     307
     308forall( dtype istype | istream( istype ) )
     309istype * ?|?( istype * is, unsigned long int & ulli ) {
     310        fmt( is, "%lu", &ulli );
     311        return is;
     312} // ?|?
     313
     314forall( dtype istype | istream( istype ) )
     315istype * ?|?( istype * is, long long int & lli ) {
     316        fmt( is, "%lld", &lli );
     317        return is;
     318} // ?|?
     319
     320forall( dtype istype | istream( istype ) )
     321istype * ?|?( istype * is, unsigned long long int & ulli ) {
     322        fmt( is, "%llu", &ulli );
     323        return is;
     324} // ?|?
     325
     326
     327forall( dtype istype | istream( istype ) )
     328istype * ?|?( istype * is, float & f ) {
     329        fmt( is, "%f", &f );
     330        return is;
     331} // ?|?
     332
     333forall( dtype istype | istream( istype ) )
     334istype * ?|?( istype * is, double & d ) {
     335        fmt( is, "%lf", &d );
     336        return is;
     337} // ?|?
     338
     339forall( dtype istype | istream( istype ) )
     340istype * ?|?( istype * is, long double & ld ) {
     341        fmt( is, "%Lf", &ld );
     342        return is;
     343} // ?|?
     344
     345
     346forall( dtype istype | istream( istype ) )
     347istype * ?|?( istype * is, float _Complex & fc ) {
    348348        float re, im;
    349349        fmt( is, "%g%gi", &re, &im );
    350         *fc = re + im * _Complex_I;
    351         return is;
    352 } // ?|?
    353 
    354 forall( dtype istype | istream( istype ) )
    355 istype * ?|?( istype * is, double _Complex * dc ) {
     350        fc = re + im * _Complex_I;
     351        return is;
     352} // ?|?
     353
     354forall( dtype istype | istream( istype ) )
     355istype * ?|?( istype * is, double _Complex & dc ) {
    356356        double re, im;
    357357        fmt( is, "%lf%lfi", &re, &im );
    358         *dc = re + im * _Complex_I;
    359         return is;
    360 } // ?|?
    361 
    362 forall( dtype istype | istream( istype ) )
    363 istype * ?|?( istype * is, long double _Complex * ldc ) {
     358        dc = re + im * _Complex_I;
     359        return is;
     360} // ?|?
     361
     362forall( dtype istype | istream( istype ) )
     363istype * ?|?( istype * is, long double _Complex & ldc ) {
    364364        long double re, im;
    365365        fmt( is, "%Lf%Lfi", &re, &im );
    366         *ldc = re + im * _Complex_I;
     366        ldc = re + im * _Complex_I;
    367367        return is;
    368368} // ?|?
  • src/libcfa/iterator

    raf08051 r28e58fd  
    1919trait iterator( otype iterator_type, otype elt_type ) {
    2020        // point to the next element
    21 //      iterator_type ?++( iterator_type * );
    22         iterator_type ++?( iterator_type * );
    23         iterator_type --?( iterator_type * );
     21//      iterator_type ?++( iterator_type & );
     22        iterator_type ++?( iterator_type & );
     23        iterator_type --?( iterator_type & );
    2424
    2525        // can be tested for equality with other iterators
     
    2828
    2929        // dereference to get the pointed-at element
    30         lvalue elt_type *?( iterator_type );
     30        elt_type & *?( iterator_type );
    3131};
    3232
  • src/libcfa/rational

    raf08051 r28e58fd  
    1212// Created On       : Wed Apr  6 17:56:25 2016
    1313// Last Modified By : Peter A. Buhr
    14 // Last Modified On : Fri Jul  7 09:34:33 2017
    15 // Update Count     : 93
     14// Last Modified On : Wed Aug 23 22:35:09 2017
     15// Update Count     : 95
    1616//
    1717
     
    3131        int ?>?( T, T );
    3232        int ?>=?( T, T );
    33         void ?{}( T *, zero_t );
    34         void ?{}( T *, one_t );
     33        void ?{}( T &, zero_t );
     34        void ?{}( T &, one_t );
    3535        T +?( T );
    3636        T -?( T );
     
    4040        T ?/?( T, T );
    4141        T ?%?( T, T );
    42         T ?/=?( T *, T );
     42        T ?/=?( T &, T );
    4343        T abs( T );
    4444};
     
    5454
    5555forall( otype RationalImpl | arithmetic( RationalImpl ) )
    56 void ?{}( Rational(RationalImpl) * r );
     56void ?{}( Rational(RationalImpl) & r );
    5757
    5858forall( otype RationalImpl | arithmetic( RationalImpl ) )
    59 void ?{}( Rational(RationalImpl) * r, RationalImpl n );
     59void ?{}( Rational(RationalImpl) & r, RationalImpl n );
    6060
    6161forall( otype RationalImpl | arithmetic( RationalImpl ) )
    62 void ?{}( Rational(RationalImpl) * r, RationalImpl n, RationalImpl d );
     62void ?{}( Rational(RationalImpl) & r, RationalImpl n, RationalImpl d );
    6363
    6464forall( otype RationalImpl | arithmetic( RationalImpl ) )
    65 void ?{}( Rational(RationalImpl) * r, zero_t );
     65void ?{}( Rational(RationalImpl) & r, zero_t );
    6666
    6767forall( otype RationalImpl | arithmetic( RationalImpl ) )
    68 void ?{}( Rational(RationalImpl) * r, one_t );
     68void ?{}( Rational(RationalImpl) & r, one_t );
    6969
    7070// numerator/denominator getter
     
    7777
    7878forall( otype RationalImpl | arithmetic( RationalImpl ) )
    79 [ RationalImpl, RationalImpl ] ?=?( * [ RationalImpl, RationalImpl ] dest, Rational(RationalImpl) src );
     79[ RationalImpl, RationalImpl ] ?=?( & [ RationalImpl, RationalImpl ] dest, Rational(RationalImpl) src );
    8080
    8181// numerator/denominator setter
     
    135135// I/O
    136136forall( otype RationalImpl | arithmetic( RationalImpl ) )
    137 forall( dtype istype | istream( istype ) | { istype * ?|?( istype *, RationalImpl * ); } )
    138 istype * ?|?( istype *, Rational(RationalImpl) * );
     137forall( dtype istype | istream( istype ) | { istype * ?|?( istype *, RationalImpl & ); } )
     138istype * ?|?( istype *, Rational(RationalImpl) & );
    139139
    140140forall( otype RationalImpl | arithmetic( RationalImpl ) )
  • src/libcfa/rational.c

    raf08051 r28e58fd  
    1 // 
     1//
    22// Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo
    33//
    44// The contents of this file are covered under the licence agreement in the
    55// file "LICENCE" distributed with Cforall.
    6 // 
    7 // rational.c -- 
    8 // 
     6//
     7// rational.c --
     8//
    99// Author           : Peter A. Buhr
    1010// Created On       : Wed Apr  6 17:54:28 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue May 16 18:35:36 2017
    13 // Update Count     : 150
    14 // 
     12// Last Modified On : Wed Aug 23 22:38:48 2017
     13// Update Count     : 154
     14//
    1515
    1616#include "rational"
     
    3434
    3535forall( otype RationalImpl | arithmetic( RationalImpl ) )
    36 static RationalImpl simplify( RationalImpl * n, RationalImpl * d ) {
    37         if ( *d == (RationalImpl){0} ) {
     36static RationalImpl simplify( RationalImpl & n, RationalImpl & d ) {
     37        if ( d == (RationalImpl){0} ) {
    3838                serr | "Invalid rational number construction: denominator cannot be equal to 0." | endl;
    3939                exit( EXIT_FAILURE );
    4040        } // exit
    41         if ( *d < (RationalImpl){0} ) { *d = -*d; *n = -*n; } // move sign to numerator
    42         return gcd( abs( *n ), *d );                                            // simplify
     41        if ( d < (RationalImpl){0} ) { d = -d; n = -n; }        // move sign to numerator
     42        return gcd( abs( n ), d );                                                      // simplify
    4343} // Rationalnumber::simplify
    4444
     
    4747
    4848forall( otype RationalImpl | arithmetic( RationalImpl ) )
    49 void ?{}( Rational(RationalImpl) * r ) {
     49void ?{}( Rational(RationalImpl) & r ) {
    5050        r{ (RationalImpl){0}, (RationalImpl){1} };
    5151} // rational
    5252
    5353forall( otype RationalImpl | arithmetic( RationalImpl ) )
    54 void ?{}( Rational(RationalImpl) * r, RationalImpl n ) {
     54void ?{}( Rational(RationalImpl) & r, RationalImpl n ) {
    5555        r{ n, (RationalImpl){1} };
    5656} // rational
    5757
    5858forall( otype RationalImpl | arithmetic( RationalImpl ) )
    59 void ?{}( Rational(RationalImpl) * r, RationalImpl n, RationalImpl d ) {
    60         RationalImpl t = simplify( &n, &d );                            // simplify
    61         r->numerator = n / t;
    62         r->denominator = d / t;
     59void ?{}( Rational(RationalImpl) & r, RationalImpl n, RationalImpl d ) {
     60        RationalImpl t = simplify( n, d );                                      // simplify
     61        r.numerator = n / t;
     62        r.denominator = d / t;
    6363} // rational
    6464
     
    7777
    7878forall( otype RationalImpl | arithmetic( RationalImpl ) )
    79 [ RationalImpl, RationalImpl ] ?=?( * [ RationalImpl, RationalImpl ] dest, Rational(RationalImpl) src ) {
    80         return *dest = src.[ numerator, denominator ];
     79[ RationalImpl, RationalImpl ] ?=?( & [ RationalImpl, RationalImpl ] dest, Rational(RationalImpl) src ) {
     80        return dest = src.[ numerator, denominator ];
    8181}
    8282
     
    9595RationalImpl denominator( Rational(RationalImpl) r, RationalImpl d ) {
    9696        RationalImpl prev = r.denominator;
    97         RationalImpl t = simplify( &r.numerator, &d );                  // simplify
     97        RationalImpl t = simplify( r.numerator, d );                    // simplify
    9898        r.numerator = r.numerator / t;
    9999        r.denominator = d / t;
     
    228228
    229229forall( otype RationalImpl | arithmetic( RationalImpl ) )
    230 forall( dtype istype | istream( istype ) | { istype * ?|?( istype *, RationalImpl * ); } )
    231 istype * ?|?( istype * is, Rational(RationalImpl) * r ) {
     230forall( dtype istype | istream( istype ) | { istype * ?|?( istype *, RationalImpl & ); } )
     231istype * ?|?( istype * is, Rational(RationalImpl) & r ) {
    232232        RationalImpl t;
    233         is | &(r->numerator) | &(r->denominator);
    234         t = simplify( &(r->numerator), &(r->denominator) );
    235         r->numerator /= t;
    236         r->denominator /= t;
     233        is | r.numerator | r.denominator;
     234        t = simplify( r.numerator, r.denominator );
     235        r.numerator /= t;
     236        r.denominator /= t;
    237237        return is;
    238238} // ?|?
  • src/libcfa/stdlib

    raf08051 r28e58fd  
    1010// Created On       : Thu Jan 28 17:12:35 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon Aug  7 11:19:07 2017
    13 // Update Count     : 223
     12// Last Modified On : Wed Aug 23 20:29:47 2017
     13// Update Count     : 224
    1414//
    1515
     
    132132
    133133// allocation/deallocation and constructor/destructor, non-array types
    134 forall( dtype T | sized(T), ttype Params | { void ?{}( T *, Params ); } ) T * new( Params p );
    135 forall( dtype T | { void ^?{}( T * ); } ) void delete( T * ptr );
    136 forall( dtype T, ttype Params | { void ^?{}( T * ); void delete( Params ); } ) void delete( T * ptr, Params rest );
     134forall( dtype T | sized(T), ttype Params | { void ?{}( T &, Params ); } ) T * new( Params p );
     135forall( dtype T | sized(T) | { void ^?{}( T & ); } ) void delete( T * ptr );
     136forall( dtype T, ttype Params | sized(T) | { void ^?{}( T & ); void delete( Params ); } ) void delete( T * ptr, Params rest );
    137137
    138138// allocation/deallocation and constructor/destructor, array types
    139 forall( dtype T | sized(T), ttype Params | { void ?{}( T *, Params ); } ) T * anew( size_t dim, Params p );
    140 forall( dtype T | sized(T) | { void ^?{}( T * ); } ) void adelete( size_t dim, T arr[] );
    141 forall( dtype T | sized(T) | { void ^?{}( T * ); }, ttype Params | { void adelete( Params ); } ) void adelete( size_t dim, T arr[], Params rest );
     139forall( dtype T | sized(T), ttype Params | { void ?{}( T &, Params ); } ) T * anew( size_t dim, Params p );
     140forall( dtype T | sized(T) | { void ^?{}( T & ); } ) void adelete( size_t dim, T arr[] );
     141forall( dtype T | sized(T) | { void ^?{}( T & ); }, ttype Params | { void adelete( Params ); } ) void adelete( size_t dim, T arr[], Params rest );
    142142
    143143//---------------------------------------
     
    201201double abs( double _Complex );
    202202long double abs( long double _Complex );
    203 forall( otype T | { void ?{}( T *, zero_t ); int ?<?( T, T ); T -?( T ); } )
     203forall( otype T | { void ?{}( T &, zero_t ); int ?<?( T, T ); T -?( T ); } )
    204204T abs( T );
    205205
     
    230230
    231231forall( otype T )
    232 void swap( T * t1, T * t2 );
     232void swap( T & t1, T & t2 );
    233233
    234234// Local Variables: //
  • src/libcfa/stdlib.c

    raf08051 r28e58fd  
    1010// Created On       : Thu Jan 28 17:10:29 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Aug  8 17:31:13 2017
    13 // Update Count     : 291
     12// Last Modified On : Wed Aug 23 20:30:44 2017
     13// Update Count     : 292
    1414//
    1515
     
    3232        if ( nlen > olen ) {                                                            // larger ?
    3333                memset( nptr + olen, (int)fill, nlen - olen );  // initialize added storage
    34         } // 
     34        } //
    3535    return (T *)nptr;
    3636} // alloc
    3737
    3838// allocation/deallocation and constructor/destructor, non-array types
    39 forall( dtype T | sized(T), ttype Params | { void ?{}( T *, Params ); } )
     39forall( dtype T | sized(T), ttype Params | { void ?{}( T &, Params ); } )
    4040T * new( Params p ) {
    41         return (malloc()){ p };                                                         // run constructor
     41        return &(*malloc()){ p };                                                               // run constructor
    4242} // new
    4343
    44 forall( dtype T | { void ^?{}( T * ); } )
     44forall( dtype T | sized(T) | { void ^?{}( T & ); } )
    4545void delete( T * ptr ) {
    4646        if ( ptr ) {                                                                            // ignore null
    47                 ^ptr{};                                                                                 // run destructor
     47                ^(*ptr){};                                                                                      // run destructor
    4848                free( ptr );
    4949        } // if
    5050} // delete
    5151
    52 forall( dtype T, ttype Params | { void ^?{}( T * ); void delete( Params ); } )
     52forall( dtype T, ttype Params | sized(T) | { void ^?{}( T & ); void delete( Params ); } )
    5353void delete( T * ptr, Params rest ) {
    5454        if ( ptr ) {                                                                            // ignore null
    55                 ^ptr{};                                                                                 // run destructor
     55                ^(*ptr){};                                                                                      // run destructor
    5656                free( ptr );
    5757        } // if
     
    6161
    6262// allocation/deallocation and constructor/destructor, array types
    63 forall( dtype T | sized(T), ttype Params | { void ?{}( T *, Params ); } )
     63forall( dtype T | sized(T), ttype Params | { void ?{}( T &, Params ); } )
    6464T * anew( size_t dim, Params p ) {
    6565        T *arr = alloc( dim );
    6666        for ( unsigned int i = 0; i < dim; i += 1 ) {
    67                 (&arr[i]){ p };                                                                 // run constructor
     67                (arr[i]){ p };                                                                  // run constructor
    6868        } // for
    6969        return arr;
    7070} // anew
    7171
    72 forall( dtype T | sized(T) | { void ^?{}( T * ); } )
     72forall( dtype T | sized(T) | { void ^?{}( T & ); } )
    7373void adelete( size_t dim, T arr[] ) {
    7474        if ( arr ) {                                                                            // ignore null
    7575                for ( int i = dim - 1; i >= 0; i -= 1 ) {               // reverse allocation order, must be unsigned
    76                         ^(&arr[i]){};                                                           // run destructor
     76                        ^(arr[i]){};                                                            // run destructor
    7777                } // for
    7878                free( arr );
     
    8080} // adelete
    8181
    82 forall( dtype T | sized(T) | { void ^?{}( T * ); }, ttype Params | { void adelete( Params ); } )
     82forall( dtype T | sized(T) | { void ^?{}( T & ); }, ttype Params | { void adelete( Params ); } )
    8383void adelete( size_t dim, T arr[], Params rest ) {
    8484        if ( arr ) {                                                                            // ignore null
    8585                for ( int i = dim - 1; i >= 0; i -= 1 ) {               // reverse allocation order, must be unsigned
    86                         ^(&arr[i]){};                                                           // run destructor
     86                        ^(arr[i]){};                                                            // run destructor
    8787                } // for
    8888                free( arr );
     
    305305
    306306forall( otype T )
    307 void swap( T * t1, T * t2 ) {
    308         T temp = *t1;
    309         *t1 = *t2;
    310         *t2 = temp;
     307void swap( T & t1, T & t2 ) {
     308        T temp = t1;
     309        t1 = t2;
     310        t2 = temp;
    311311} // swap
    312312
  • src/prelude/builtins.c

    raf08051 r28e58fd  
    8080} // ?\?
    8181
    82 static inline forall( otype T | { void ?{}( T * this, one_t ); T ?*?( T, T ); double ?/?( double, T ); } )
     82static inline forall( otype T | { void ?{}( T & this, one_t ); T ?*?( T, T ); double ?/?( double, T ); } )
    8383double ?\?( T x, signed long int y ) {
    8484    if ( y >=  0 ) return (double)(x \ (unsigned long int)y);
     
    8686} // ?\?
    8787
    88 static inline long int ?\=?( long int * x, unsigned long int y ) { *x = *x \ y; return *x; }
    89 static inline unsigned long int ?\=?( unsigned long int * x, unsigned long int y ) { *x = *x \ y; return *x; }
    90 static inline int ?\=?( int * x, unsigned long int y ) { *x = *x \ y; return *x; }
    91 static inline unsigned int ?\=?( unsigned int * x, unsigned long int y ) { *x = *x \ y; return *x; }
     88static inline long int ?\=?( long int & x, unsigned long int y ) { x = x \ y; return x; }
     89static inline unsigned long int ?\=?( unsigned long int & x, unsigned long int y ) { x = x \ y; return x; }
     90static inline int ?\=?( int & x, unsigned long int y ) { x = x \ y; return x; }
     91static inline unsigned int ?\=?( unsigned int & x, unsigned long int y ) { x = x \ y; return x; }
    9292
    9393// Local Variables: //
  • src/prelude/prelude.cf

    raf08051 r28e58fd  
    3030// ------------------------------------------------------------
    3131
    32 _Bool                   ?++( _Bool * ),                         ?++( volatile _Bool * );
    33 _Bool                   ?--( _Bool * ),                         ?--( volatile _Bool * );
    34 unsigned char           ?++( unsigned char * ),                 ?++( volatile unsigned char * );
    35 signed int              ?++( signed int * ),                    ?++( volatile signed int * );
    36 signed int              ?--( signed int * ),                    ?--( volatile signed int * );
    37 unsigned int            ?++( unsigned int * ),                  ?++( volatile unsigned int * );
    38 unsigned int            ?--( unsigned int * ),                  ?--( volatile unsigned int * );
    39 signed long int         ?++( signed long int * ),               ?++( volatile signed long int * );
    40 signed long int         ?--( signed long int * ),               ?--( volatile signed long int * );
    41 unsigned long int       ?++( unsigned long int * ),             ?++( volatile unsigned long int * );
    42 unsigned long int       ?--( unsigned long int * ),             ?--( volatile unsigned long int * );
    43 signed long long int    ?++( signed long long int * ),          ?++( volatile signed long long int * );
    44 signed long long int    ?--( signed long long int * ),          ?--( volatile signed long long int * );
    45 unsigned long long int  ?++( unsigned long long int * ),        ?++( volatile unsigned long long int * );
    46 unsigned long long int  ?--( unsigned long long int * ),        ?--( volatile unsigned long long int * );
    47 float                   ?++( float * ),                         ?++( volatile float * );
    48 float                   ?--( float * ),                         ?--( volatile float * );
    49 double                  ?++( double * ),                        ?++( volatile double * );
    50 double                  ?--( double * ),                        ?--( volatile double * );
    51 long double             ?++( long double * ),                   ?++( volatile long double * );
    52 long double             ?--( long double * ),                   ?--( volatile long double * );
    53 float _Complex          ?++( float _Complex * ),                ?++( volatile float _Complex * );
    54 float _Complex          ?--( float _Complex * ),                ?--( volatile float _Complex * );
    55 double _Complex         ?++( double _Complex * ),               ?++( volatile double _Complex * );
    56 double _Complex         ?--( double _Complex * ),               ?--( volatile double _Complex * );
    57 long double _Complex    ?++( long double _Complex * ),          ?++( volatile long double _Complex * );
    58 long double _Complex    ?--( long double _Complex * ),          ?--( volatile long double _Complex * );
    59 
    60 forall( dtype T | sized(T) ) T *                         ?++(                T ** );
    61 forall( dtype T | sized(T) ) const T *           ?++( const          T ** );
    62 forall( dtype T | sized(T) ) volatile T *                ?++(       volatile T ** );
    63 forall( dtype T | sized(T) ) const volatile T *  ?++( const volatile T ** );
    64 forall( dtype T | sized(T) ) T *                         ?--(                T ** );
    65 forall( dtype T | sized(T) ) const T *           ?--( const          T ** );
    66 forall( dtype T | sized(T) ) volatile T *                ?--(       volatile T ** );
    67 forall( dtype T | sized(T) ) const volatile T *  ?--( const volatile T ** );
    68 
    69 forall( dtype T | sized(T) ) lvalue T            ?[?](                T *,          ptrdiff_t );
    70 forall( dtype T | sized(T) ) const lvalue T      ?[?]( const          T *,          ptrdiff_t );
    71 forall( dtype T | sized(T) ) volatile lvalue T   ?[?](       volatile T *,          ptrdiff_t );
    72 forall( dtype T | sized(T) ) const volatile lvalue T ?[?]( const volatile T *,      ptrdiff_t );
    73 forall( dtype T | sized(T) ) lvalue T            ?[?](          ptrdiff_t,                T * );
    74 forall( dtype T | sized(T) ) const lvalue T      ?[?](          ptrdiff_t, const          T * );
    75 forall( dtype T | sized(T) ) volatile lvalue T   ?[?](          ptrdiff_t,       volatile T * );
    76 forall( dtype T | sized(T) ) const volatile lvalue T ?[?](              ptrdiff_t, const volatile T * );
     32_Bool                   ?++( _Bool & ),                         ?++( volatile _Bool & );
     33_Bool                   ?--( _Bool & ),                         ?--( volatile _Bool & );
     34unsigned char           ?++( unsigned char & ),                 ?++( volatile unsigned char & );
     35signed int              ?++( signed int & ),                    ?++( volatile signed int & );
     36signed int              ?--( signed int & ),                    ?--( volatile signed int & );
     37unsigned int            ?++( unsigned int & ),                  ?++( volatile unsigned int & );
     38unsigned int            ?--( unsigned int & ),                  ?--( volatile unsigned int & );
     39signed long int         ?++( signed long int & ),               ?++( volatile signed long int & );
     40signed long int         ?--( signed long int & ),               ?--( volatile signed long int & );
     41unsigned long int       ?++( unsigned long int & ),             ?++( volatile unsigned long int & );
     42unsigned long int       ?--( unsigned long int & ),             ?--( volatile unsigned long int & );
     43signed long long int    ?++( signed long long int & ),          ?++( volatile signed long long int & );
     44signed long long int    ?--( signed long long int & ),          ?--( volatile signed long long int & );
     45unsigned long long int  ?++( unsigned long long int & ),        ?++( volatile unsigned long long int & );
     46unsigned long long int  ?--( unsigned long long int & ),        ?--( volatile unsigned long long int & );
     47float                   ?++( float & ),                         ?++( volatile float & );
     48float                   ?--( float & ),                         ?--( volatile float & );
     49double                  ?++( double & ),                        ?++( volatile double & );
     50double                  ?--( double & ),                        ?--( volatile double & );
     51long double             ?++( long double & ),                   ?++( volatile long double & );
     52long double             ?--( long double & ),                   ?--( volatile long double & );
     53float _Complex          ?++( float _Complex & ),                ?++( volatile float _Complex & );
     54float _Complex          ?--( float _Complex & ),                ?--( volatile float _Complex & );
     55double _Complex         ?++( double _Complex & ),               ?++( volatile double _Complex & );
     56double _Complex         ?--( double _Complex & ),               ?--( volatile double _Complex & );
     57long double _Complex    ?++( long double _Complex & ),          ?++( volatile long double _Complex & );
     58long double _Complex    ?--( long double _Complex & ),          ?--( volatile long double _Complex & );
     59
     60forall( dtype T | sized(T) ) T *                         ?++(                T *& );
     61forall( dtype T | sized(T) ) const T *           ?++( const          T *& );
     62forall( dtype T | sized(T) ) volatile T *                ?++(       volatile T *& );
     63forall( dtype T | sized(T) ) const volatile T *  ?++( const volatile T *& );
     64forall( dtype T | sized(T) ) T *                         ?--(                T *& );
     65forall( dtype T | sized(T) ) const T *           ?--( const          T *& );
     66forall( dtype T | sized(T) ) volatile T *                ?--(       volatile T *& );
     67forall( dtype T | sized(T) ) const volatile T *  ?--( const volatile T *& );
     68
     69forall( dtype T | sized(T) ) T &                 ?[?](                T *,          ptrdiff_t );
     70forall( dtype T | sized(T) ) const T &   ?[?]( const          T *,          ptrdiff_t );
     71forall( dtype T | sized(T) ) volatile T &        ?[?](       volatile T *,          ptrdiff_t );
     72forall( dtype T | sized(T) ) const volatile T & ?[?]( const volatile T *,           ptrdiff_t );
     73forall( dtype T | sized(T) ) T &                 ?[?](          ptrdiff_t,                T * );
     74forall( dtype T | sized(T) ) const T &   ?[?](          ptrdiff_t, const          T * );
     75forall( dtype T | sized(T) ) volatile T &        ?[?](          ptrdiff_t,       volatile T * );
     76forall( dtype T | sized(T) ) const volatile T & ?[?](           ptrdiff_t, const volatile T * );
    7777
    7878// ------------------------------------------------------------
     
    8282// ------------------------------------------------------------
    8383
    84 _Bool                   ++?( _Bool * ),                         --?( _Bool * );
    85 signed int              ++?( signed int * ),                    --?( signed int * );
    86 unsigned int            ++?( unsigned int * ),                  --?( unsigned int * );
    87 signed long int         ++?( signed long int * ),               --?( signed long int * );
    88 unsigned long int       ++?( unsigned long int * ),             --?( unsigned long int * );
    89 signed long long int    ++?( signed long long int * ),          --?( signed long long int * );
    90 unsigned long long int  ++?( unsigned long long int * ),        --?( unsigned long long int * );
    91 float                   ++?( float * ),                         --?( float * );
    92 double                  ++?( double * ),                        --?( double * );
    93 long double             ++?( long double * ),                   --?( long double * );
    94 float _Complex          ++?( float _Complex * ),                --?( float _Complex * );
    95 double _Complex         ++?( double _Complex * ),               --?( double _Complex * );
    96 long double _Complex    ++?( long double _Complex * ),          --?( long double _Complex * );
    97 
    98 forall( dtype T | sized(T) ) T *                         ++?(                T ** );
    99 forall( dtype T | sized(T) ) const T *           ++?( const          T ** );
    100 forall( dtype T | sized(T) ) volatile T *                ++?(       volatile T ** );
    101 forall( dtype T | sized(T) ) const volatile T *  ++?( const volatile T ** );
    102 forall( dtype T | sized(T) ) T *                         --?(                T ** );
    103 forall( dtype T | sized(T) ) const T *           --?( const          T ** );
    104 forall( dtype T | sized(T) ) volatile T *                --?(       volatile T ** );
    105 forall( dtype T | sized(T) ) const volatile T *  --?( const volatile T ** );
    106 
    107 forall( dtype T | sized(T) ) lvalue T            *?(                 T * );
    108 forall( dtype T | sized(T) ) const lvalue T              *?( const           T * );
    109 forall( dtype T | sized(T) ) volatile lvalue T   *?(       volatile  T * );
    110 forall( dtype T | sized(T) ) const volatile lvalue T *?( const volatile  T * );
    111 forall( ftype FT ) lvalue FT             *?( FT * );
     84_Bool                   ++?( _Bool & ),                         --?( _Bool & );
     85signed int              ++?( signed int & ),                    --?( signed int & );
     86unsigned int            ++?( unsigned int & ),                  --?( unsigned int & );
     87signed long int         ++?( signed long int & ),               --?( signed long int & );
     88unsigned long int       ++?( unsigned long int & ),             --?( unsigned long int & );
     89signed long long int    ++?( signed long long int & ),          --?( signed long long int & );
     90unsigned long long int  ++?( unsigned long long int & ),        --?( unsigned long long int & );
     91float                   ++?( float & ),                         --?( float & );
     92double                  ++?( double & ),                        --?( double & );
     93long double             ++?( long double & ),                   --?( long double & );
     94float _Complex          ++?( float _Complex & ),                --?( float _Complex & );
     95double _Complex         ++?( double _Complex & ),               --?( double _Complex & );
     96long double _Complex    ++?( long double _Complex & ),          --?( long double _Complex & );
     97
     98forall( dtype T | sized(T) ) T *                         ++?(                T *& );
     99forall( dtype T | sized(T) ) const T *           ++?( const          T *& );
     100forall( dtype T | sized(T) ) volatile T *                ++?(       volatile T *& );
     101forall( dtype T | sized(T) ) const volatile T *  ++?( const volatile T *& );
     102forall( dtype T | sized(T) ) T *                         --?(                T *& );
     103forall( dtype T | sized(T) ) const T *           --?( const          T *& );
     104forall( dtype T | sized(T) ) volatile T *                --?(       volatile T *& );
     105forall( dtype T | sized(T) ) const volatile T *  --?( const volatile T *& );
     106
     107forall( dtype T | sized(T) ) T &                 *?(                 T * );
     108forall( dtype T | sized(T) ) const T &           *?( const           T * );
     109forall( dtype T | sized(T) ) volatile T &        *?(       volatile  T * );
     110forall( dtype T | sized(T) ) const volatile T & *?( const volatile  T * );
     111forall( ftype FT ) FT &          *?( FT * );
    112112
    113113_Bool                   +?( _Bool ),                    -?( _Bool ),                    ~?( _Bool );
     
    366366// ------------------------------------------------------------
    367367
    368 forall( ftype FT ) FT *                 ?=?( FT **, FT * );
    369 forall( ftype FT ) FT *                 ?=?( FT * volatile *, FT * );
    370 
    371 forall( dtype DT ) DT *                 ?=?(                 DT *          *,                   DT * );
    372 forall( dtype DT ) DT *                 ?=?(                 DT * volatile *,                   DT * );
    373 forall( dtype DT ) const DT *           ?=?( const           DT *          *,                   DT * );
    374 forall( dtype DT ) const DT *           ?=?( const           DT * volatile *,                   DT * );
    375 forall( dtype DT ) const DT *           ?=?( const           DT *          *, const             DT * );
    376 forall( dtype DT ) const DT *           ?=?( const           DT * volatile *, const             DT * );
    377 forall( dtype DT ) volatile DT *        ?=?(       volatile  DT *          *,                   DT * );
    378 forall( dtype DT ) volatile DT *        ?=?(       volatile  DT * volatile *,                   DT * );
    379 forall( dtype DT ) volatile DT *        ?=?(       volatile  DT *          *,       volatile    DT * );
    380 forall( dtype DT ) volatile DT *        ?=?(       volatile  DT * volatile *,       volatile    DT * );
    381 
    382 forall( dtype DT ) const volatile DT *  ?=?( const volatile  DT *          *,                   DT * );
    383 forall( dtype DT ) const volatile DT *  ?=?( const volatile  DT * volatile *,                   DT * );
    384 forall( dtype DT ) const volatile DT *  ?=?( const volatile  DT *          *, const             DT * );
    385 forall( dtype DT ) const volatile DT *  ?=?( const volatile  DT * volatile *, const             DT * );
    386 forall( dtype DT ) const volatile DT *  ?=?( const volatile  DT *          *,       volatile    DT * );
    387 forall( dtype DT ) const volatile DT *  ?=?( const volatile  DT * volatile *,       volatile    DT * );
    388 forall( dtype DT ) const volatile DT *  ?=?( const volatile  DT *          *, const volatile    DT * );
    389 forall( dtype DT ) const volatile DT *  ?=?( const volatile  DT * volatile *, const volatile    DT * );
    390 
    391 forall( dtype DT ) DT *                 ?=?(                 DT *          *,                   void * );
    392 forall( dtype DT ) DT *                 ?=?(                 DT * volatile *,                   void * );
    393 forall( dtype DT ) const DT *           ?=?( const           DT *          *,                   void * );
    394 forall( dtype DT ) const DT *           ?=?( const           DT * volatile *,                   void * );
    395 forall( dtype DT ) const DT *           ?=?( const           DT *          *, const             void * );
    396 forall( dtype DT ) const DT *           ?=?( const           DT * volatile *, const             void * );
    397 forall( dtype DT ) volatile DT *        ?=?(       volatile  DT *          *,                   void * );
    398 forall( dtype DT ) volatile DT *        ?=?(       volatile  DT * volatile *,                   void * );
    399 forall( dtype DT ) volatile DT *        ?=?(       volatile  DT *          *,       volatile    void * );
    400 forall( dtype DT ) volatile DT *        ?=?(       volatile  DT * volatile *,       volatile    void * );
    401 
    402 forall( dtype DT ) const volatile DT *  ?=?( const volatile  DT *          *,                   void * );
    403 forall( dtype DT ) const volatile DT *  ?=?( const volatile  DT * volatile *,                   void * );
    404 forall( dtype DT ) const volatile DT *  ?=?( const volatile  DT *          *, const             void * );
    405 forall( dtype DT ) const volatile DT *  ?=?( const volatile  DT * volatile *, const             void * );
    406 forall( dtype DT ) const volatile DT *  ?=?( const volatile  DT *          *,       volatile    void * );
    407 forall( dtype DT ) const volatile DT *  ?=?( const volatile  DT * volatile *,       volatile    void * );
    408 forall( dtype DT ) const volatile DT *  ?=?( const volatile  DT *          *, const volatile    void * );
    409 forall( dtype DT ) const volatile DT *  ?=?( const volatile  DT * volatile *, const volatile    void * );
    410 
    411 forall( dtype DT ) void *                ?=?(                void *          *,                 DT * );
    412 forall( dtype DT ) void *                ?=?(                void * volatile *,                 DT * );
    413 forall( dtype DT ) const void *          ?=?( const          void *          *,                 DT * );
    414 forall( dtype DT ) const void *          ?=?( const          void * volatile *,                 DT * );
    415 forall( dtype DT ) const void *          ?=?( const          void *          *, const           DT * );
    416 forall( dtype DT ) const void *          ?=?( const          void * volatile *, const           DT * );
    417 forall( dtype DT ) volatile void *       ?=?(       volatile void *          *,                 DT * );
    418 forall( dtype DT ) volatile void *       ?=?(       volatile void * volatile *,                 DT * );
    419 forall( dtype DT ) volatile void *       ?=?(       volatile void *          *,       volatile  DT * );
    420 forall( dtype DT ) volatile void *       ?=?(       volatile void * volatile *,       volatile  DT * );
    421 forall( dtype DT ) const volatile void * ?=?( const volatile void *          *,                 DT * );
    422 forall( dtype DT ) const volatile void * ?=?( const volatile void * volatile *,                 DT * );
    423 forall( dtype DT ) const volatile void * ?=?( const volatile void *          *, const           DT * );
    424 forall( dtype DT ) const volatile void * ?=?( const volatile void * volatile *, const           DT * );
    425 forall( dtype DT ) const volatile void * ?=?( const volatile void *          *,       volatile  DT * );
    426 forall( dtype DT ) const volatile void * ?=?( const volatile void * volatile *,       volatile  DT * );
    427 forall( dtype DT ) const volatile void * ?=?( const volatile void *          *, const volatile  DT * );
    428 forall( dtype DT ) const volatile void * ?=?( const volatile void * volatile *, const volatile  DT * );
    429 
    430 void *                  ?=?(                void *          *,                void * );
    431 void *                  ?=?(                void * volatile *,                void * );
    432 const void *            ?=?( const          void *          *,                void * );
    433 const void *            ?=?( const          void * volatile *,                void * );
    434 const void *            ?=?( const          void *          *, const          void * );
    435 const void *            ?=?( const          void * volatile *, const          void * );
    436 volatile void *         ?=?(       volatile void *          *,                void * );
    437 volatile void *         ?=?(       volatile void * volatile *,                void * );
    438 volatile void *         ?=?(       volatile void *          *,       volatile void * );
    439 volatile void *         ?=?(       volatile void * volatile *,       volatile void * );
    440 const volatile void *   ?=?( const volatile void *          *,                void * );
    441 const volatile void *   ?=?( const volatile void * volatile *,                void * );
    442 const volatile void *   ?=?( const volatile void *          *, const          void * );
    443 const volatile void *   ?=?( const volatile void * volatile *, const          void * );
    444 const volatile void *   ?=?( const volatile void *          *,       volatile void * );
    445 const volatile void *   ?=?( const volatile void * volatile *,       volatile void * );
    446 const volatile void *   ?=?( const volatile void *          *, const volatile void * );
    447 const volatile void *   ?=?( const volatile void * volatile *, const volatile void * );
    448 
    449 // //forall( dtype DT ) DT *                    ?=?(                DT *          *, zero_t );
    450 // //forall( dtype DT ) DT *                    ?=?(                DT * volatile *, zero_t );
    451 // forall( dtype DT ) const DT *                ?=?( const          DT *          *, zero_t );
    452 // forall( dtype DT ) const DT *                ?=?( const          DT * volatile *, zero_t );
    453 // //forall( dtype DT ) volatile DT *   ?=?( volatile       DT *          *, zero_t );
    454 // //forall( dtype DT ) volatile DT *   ?=?( volatile       DT * volatile *, );
    455 // forall( dtype DT ) const volatile DT *       ?=?( const volatile DT *          *, zero_t );
    456 // forall( dtype DT ) const volatile DT *       ?=?( const volatile DT * volatile *, zero_t );
    457 
    458 // forall( ftype FT ) FT *                      ?=?( FT *          *, zero_t );
    459 // forall( ftype FT ) FT *                      ?=?( FT * volatile *, zero_t );
    460 
    461 forall( dtype T | sized(T) ) T *                        ?+=?(                T *          *, ptrdiff_t );
    462 forall( dtype T | sized(T) ) T *                        ?+=?(                T * volatile *, ptrdiff_t );
    463 forall( dtype T | sized(T) ) const T *          ?+=?( const          T *          *, ptrdiff_t );
    464 forall( dtype T | sized(T) ) const T *          ?+=?( const          T * volatile *, ptrdiff_t );
    465 forall( dtype T | sized(T) ) volatile T *               ?+=?(       volatile T *          *, ptrdiff_t );
    466 forall( dtype T | sized(T) ) volatile T *               ?+=?(       volatile T * volatile *, ptrdiff_t );
    467 forall( dtype T | sized(T) ) const volatile T * ?+=?( const volatile T *          *, ptrdiff_t );
    468 forall( dtype T | sized(T) ) const volatile T * ?+=?( const volatile T * volatile *, ptrdiff_t );
    469 forall( dtype T | sized(T) ) T *                        ?-=?(                T *          *, ptrdiff_t );
    470 forall( dtype T | sized(T) ) T *                        ?-=?(                T * volatile *, ptrdiff_t );
    471 forall( dtype T | sized(T) ) const T *          ?-=?( const          T *          *, ptrdiff_t );
    472 forall( dtype T | sized(T) ) const T *          ?-=?( const          T * volatile *, ptrdiff_t );
    473 forall( dtype T | sized(T) ) volatile T *               ?-=?(       volatile T *          *, ptrdiff_t );
    474 forall( dtype T | sized(T) ) volatile T *               ?-=?(       volatile T * volatile *, ptrdiff_t );
    475 forall( dtype T | sized(T) ) const volatile T * ?-=?( const volatile T *          *, ptrdiff_t );
    476 forall( dtype T | sized(T) ) const volatile T * ?-=?( const volatile T * volatile *, ptrdiff_t );
    477 
    478 _Bool                   ?=?( _Bool *, _Bool ),                                  ?=?( volatile _Bool *, _Bool );
    479 char                    ?=?( char *, char ),                                    ?=?( volatile char *, char );
    480 char signed             ?=?( char signed *, char signed ),                      ?=?( volatile char signed *, char signed );
    481 char unsigned           ?=?( char unsigned *, char unsigned ),                  ?=?( volatile char unsigned *, char unsigned );
    482 int short               ?=?( int short *, int short ),                          ?=?( volatile int short *, int short );
    483 int short unsigned      ?=?( int short unsigned *, int short unsigned ),        ?=?( volatile int short unsigned *, int short unsigned );
    484 signed int              ?=?( signed int *, signed int ),                        ?=?( volatile signed int *, signed int );
    485 unsigned int            ?=?( unsigned *, unsigned ),                            ?=?( volatile unsigned *, unsigned );
    486 signed long int         ?=?( signed long int *, signed long int ),              ?=?( volatile signed long int *, signed long int );
    487 unsigned long int       ?=?( unsigned long int *, unsigned long int ),          ?=?( volatile unsigned long int *, unsigned long int );
    488 signed long long int    ?=?( signed long long int *, signed long long int ),    ?=?( volatile signed long long int *, signed long long int );
    489 unsigned long long int  ?=?( unsigned long long int *, unsigned long long int ), ?=?( volatile unsigned long long int *, unsigned long long int );
    490 zero_t          ?=?( zero_t *, zero_t );
    491 one_t                   ?=?( one_t *, one_t );
    492 
    493 
    494 _Bool                   ?*=?( _Bool *, _Bool ),                                 ?*=?( volatile _Bool *, _Bool );
    495 char                    ?*=?( char *, char ),                                   ?*=?( volatile char *, char );
    496 char signed             ?*=?( char signed *, char signed ),                     ?*=?( volatile char signed *, char signed );
    497 char unsigned           ?*=?( char unsigned *, char unsigned ),                 ?*=?( volatile char unsigned *, char unsigned );
    498 int short               ?*=?( int short *, int short ),                         ?*=?( volatile int short *, int short );
    499 int short unsigned      ?*=?( int short unsigned *, int short unsigned ),       ?*=?( volatile int short unsigned *, int short unsigned );
    500 signed int              ?*=?( signed int *, signed int ),                       ?*=?( volatile signed int *, signed int );
    501 unsigned int            ?*=?( unsigned *, unsigned ),                           ?*=?( volatile unsigned *, unsigned );
    502 signed long int         ?*=?( signed long int *, signed long int ),             ?*=?( volatile signed long int *, signed long int );
    503 unsigned long int       ?*=?( unsigned long int *, unsigned long int ),         ?*=?( volatile unsigned long int *, unsigned long int );
    504 signed long long int    ?*=?( signed long long int *, signed long long int ),   ?*=?( volatile signed long long int *, signed long long int );
    505 unsigned long long int  ?*=?( unsigned long long int *, unsigned long long int ), ?*=?( volatile unsigned long long int *, unsigned long long int );
    506 
    507 _Bool                   ?/=?( _Bool *, _Bool ),                                 ?/=?( volatile _Bool *, _Bool );
    508 char                    ?/=?( char *, char ),                                   ?/=?( volatile char *, char );
    509 char signed             ?/=?( char signed *, char signed ),                     ?/=?( volatile char signed *, char signed );
    510 char unsigned           ?/=?( char unsigned *, char unsigned ),                 ?/=?( volatile char unsigned *, char unsigned );
    511 int short               ?/=?( int short *, int short ),                         ?/=?( volatile int short *, int short );
    512 int short unsigned      ?/=?( int short unsigned *, int short unsigned ),       ?/=?( volatile int short unsigned *, int short unsigned );
    513 signed int              ?/=?( signed int *, signed int ),                       ?/=?( volatile signed int *, signed int );
    514 unsigned int            ?/=?( unsigned *, unsigned ),                           ?/=?( volatile unsigned *, unsigned );
    515 signed long int         ?/=?( signed long int *, signed long int ),             ?/=?( volatile signed long int *, signed long int );
    516 unsigned long int       ?/=?( unsigned long int *, unsigned long int ),         ?/=?( volatile unsigned long int *, unsigned long int );
    517 signed long long int    ?/=?( signed long long int *, signed long long int ),   ?/=?( volatile signed long long int *, signed long long int );
    518 unsigned long long int  ?/=?( unsigned long long int *, unsigned long long int ), ?/=?( volatile unsigned long long int *, unsigned long long int );
    519 
    520 _Bool                   ?%=?( _Bool *, _Bool ),                                 ?%=?( volatile _Bool *, _Bool );
    521 char                    ?%=?( char *, char ),                                   ?%=?( volatile char *, char );
    522 char signed             ?%=?( char signed *, char signed ),                     ?%=?( volatile char signed *, char signed );
    523 char unsigned           ?%=?( char unsigned *, char unsigned ),                 ?%=?( volatile char unsigned *, char unsigned );
    524 int short               ?%=?( int short *, int short ),                         ?%=?( volatile int short *, int short );
    525 int short unsigned      ?%=?( int short unsigned *, int short unsigned ),       ?%=?( volatile int short unsigned *, int short unsigned );
    526 signed int              ?%=?( signed int *, signed int ),                       ?%=?( volatile signed int *, signed int );
    527 unsigned int            ?%=?( unsigned *, unsigned ),                           ?%=?( volatile unsigned *, unsigned );
    528 signed long int         ?%=?( signed long int *, signed long int ),             ?%=?( volatile signed long int *, signed long int );
    529 unsigned long int       ?%=?( unsigned long int *, unsigned long int ),         ?%=?( volatile unsigned long int *, unsigned long int );
    530 signed long long int    ?%=?( signed long long int *, signed long long int ),   ?%=?( volatile signed long long int *, signed long long int );
    531 unsigned long long int  ?%=?( unsigned long long int *, unsigned long long int ), ?%=?( volatile unsigned long long int *, unsigned long long int );
    532 
    533 _Bool                   ?+=?( _Bool *, _Bool ),                                 ?+=?( volatile _Bool *, _Bool );
    534 char                    ?+=?( char *, char ),                                   ?+=?( volatile char *, char );
    535 char signed             ?+=?( char signed *, char signed ),                     ?+=?( volatile char signed *, char signed );
    536 char unsigned           ?+=?( char unsigned *, char unsigned ),                 ?+=?( volatile char unsigned *, char unsigned );
    537 int short               ?+=?( int short *, int short ),                         ?+=?( volatile int short *, int short );
    538 int short unsigned      ?+=?( int short unsigned *, int short unsigned ),       ?+=?( volatile int short unsigned *, int short unsigned );
    539 signed int              ?+=?( signed int *, signed int ),                       ?+=?( volatile signed int *, signed int );
    540 unsigned int            ?+=?( unsigned *, unsigned ),                           ?+=?( volatile unsigned *, unsigned );
    541 signed long int         ?+=?( signed long int *, signed long int ),             ?+=?( volatile signed long int *, signed long int );
    542 unsigned long int       ?+=?( unsigned long int *, unsigned long int ),         ?+=?( volatile unsigned long int *, unsigned long int );
    543 signed long long int    ?+=?( signed long long int *, signed long long int ),   ?+=?( volatile signed long long int *, signed long long int );
    544 unsigned long long int  ?+=?( unsigned long long int *, unsigned long long int ), ?+=?( volatile unsigned long long int *, unsigned long long int );
    545 
    546 _Bool                   ?-=?( _Bool *, _Bool ),                                 ?-=?( volatile _Bool *, _Bool );
    547 char                    ?-=?( char *, char ),                                   ?-=?( volatile char *, char );
    548 char signed             ?-=?( char signed *, char signed ),                     ?-=?( volatile char signed *, char signed );
    549 char unsigned           ?-=?( char unsigned *, char unsigned ),                 ?-=?( volatile char unsigned *, char unsigned );
    550 int short               ?-=?( int short *, int short ),                         ?-=?( volatile int short *, int short );
    551 int short unsigned      ?-=?( int short unsigned *, int short unsigned ),       ?-=?( volatile int short unsigned *, int short unsigned );
    552 signed int              ?-=?( signed int *, signed int ),                       ?-=?( volatile signed int *, signed int );
    553 unsigned int            ?-=?( unsigned *, unsigned ),                           ?-=?( volatile unsigned *, unsigned );
    554 signed long int         ?-=?( signed long int *, signed long int ),             ?-=?( volatile signed long int *, signed long int );
    555 unsigned long int       ?-=?( unsigned long int *, unsigned long int ),         ?-=?( volatile unsigned long int *, unsigned long int );
    556 signed long long int    ?-=?( signed long long int *, signed long long int ),   ?-=?( volatile signed long long int *, signed long long int );
    557 unsigned long long int  ?-=?( unsigned long long int *, unsigned long long int ), ?-=?( volatile unsigned long long int *, unsigned long long int );
    558 
    559 _Bool                   ?<<=?( _Bool *, _Bool ),                                ?<<=?( volatile _Bool *, _Bool );
    560 char                    ?<<=?( char *, char ),                                  ?<<=?( volatile char *, char );
    561 char signed             ?<<=?( char signed *, char signed ),                    ?<<=?( volatile char signed *, char signed );
    562 char unsigned           ?<<=?( char unsigned *, char unsigned ),                ?<<=?( volatile char unsigned *, char unsigned );
    563 int short               ?<<=?( int short *, int short ),                        ?<<=?( volatile int short *, int short );
    564 int short unsigned      ?<<=?( int short unsigned *, int short unsigned ),      ?<<=?( volatile int short unsigned *, int short unsigned );
    565 signed int              ?<<=?( signed int *, signed int ),                      ?<<=?( volatile signed int *, signed int );
    566 unsigned int            ?<<=?( unsigned *, unsigned ),                          ?<<=?( volatile unsigned *, unsigned );
    567 signed long int         ?<<=?( signed long int *, signed long int ),            ?<<=?( volatile signed long int *, signed long int );
    568 unsigned long int       ?<<=?( unsigned long int *, unsigned long int ),        ?<<=?( volatile unsigned long int *, unsigned long int );
    569 signed long long int    ?<<=?( signed long long int *, signed long long int ),  ?<<=?( volatile signed long long int *, signed long long int );
    570 unsigned long long int  ?<<=?( unsigned long long int *, unsigned long long int ), ?<<=?( volatile unsigned long long int *, unsigned long long int );
    571 
    572 _Bool                   ?>>=?( _Bool *, _Bool ),                                ?>>=?( volatile _Bool *, _Bool );
    573 char                    ?>>=?( char *, char ),                                  ?>>=?( volatile char *, char );
    574 char signed             ?>>=?( char signed *, char signed ),                    ?>>=?( volatile char signed *, char signed );
    575 char unsigned           ?>>=?( char unsigned *, char unsigned ),                ?>>=?( volatile char unsigned *, char unsigned );
    576 int short               ?>>=?( int short *, int short ),                        ?>>=?( volatile int short *, int short );
    577 int short unsigned      ?>>=?( int short unsigned *, int short unsigned ),      ?>>=?( volatile int short unsigned *, int short unsigned );
    578 signed int              ?>>=?( signed int *, signed int ),                      ?>>=?( volatile signed int *, signed int );
    579 unsigned int            ?>>=?( unsigned *, unsigned ),                          ?>>=?( volatile unsigned *, unsigned );
    580 signed long int         ?>>=?( signed long int *, signed long int ),            ?>>=?( volatile signed long int *, signed long int );
    581 unsigned long int       ?>>=?( unsigned long int *, unsigned long int ),        ?>>=?( volatile unsigned long int *, unsigned long int );
    582 signed long long int    ?>>=?( signed long long int *, signed long long int ),  ?>>=?( volatile signed long long int *, signed long long int );
    583 unsigned long long int  ?>>=?( unsigned long long int *, unsigned long long int ), ?>>=?( volatile unsigned long long int *, unsigned long long int );
    584 
    585 _Bool                   ?&=?( _Bool *, _Bool ),                                 ?&=?( volatile _Bool *, _Bool );
    586 char                    ?&=?( char *, char ),                                   ?&=?( volatile char *, char );
    587 char signed             ?&=?( char signed *, char signed ),                     ?&=?( volatile char signed *, char signed );
    588 char unsigned           ?&=?( char unsigned *, char unsigned ),                 ?&=?( volatile char unsigned *, char unsigned );
    589 int short               ?&=?( int short *, int short ),                         ?&=?( volatile int short *, int short );
    590 int short unsigned      ?&=?( int short unsigned *, int short unsigned ),       ?&=?( volatile int short unsigned *, int short unsigned );
    591 signed int              ?&=?( signed int *, signed int ),                       ?&=?( volatile signed int *, signed int );
    592 unsigned int            ?&=?( unsigned *, unsigned ),                           ?&=?( volatile unsigned *, unsigned );
    593 signed long int         ?&=?( signed long int *, signed long int ),             ?&=?( volatile signed long int *, signed long int );
    594 unsigned long int       ?&=?( unsigned long int *, unsigned long int ),         ?&=?( volatile unsigned long int *, unsigned long int );
    595 signed long long int    ?&=?( signed long long int *, signed long long int ),   ?&=?( volatile signed long long int *, signed long long int );
    596 unsigned long long int  ?&=?( unsigned long long int *, unsigned long long int ), ?&=?( volatile unsigned long long int *, unsigned long long int );
    597 
    598 _Bool                   ?|=?( _Bool *, _Bool ),                                 ?|=?( volatile _Bool *, _Bool );
    599 char                    ?|=?( char *, char ),                                   ?|=?( volatile char *, char );
    600 char signed             ?|=?( char signed *, char signed ),                     ?|=?( volatile char signed *, char signed );
    601 char unsigned           ?|=?( char unsigned *, char unsigned ),                 ?|=?( volatile char unsigned *, char unsigned );
    602 int short               ?|=?( int short *, int short ),                         ?|=?( volatile int short *, int short );
    603 int short unsigned      ?|=?( int short unsigned *, int short unsigned ),       ?|=?( volatile int short unsigned *, int short unsigned );
    604 signed int              ?|=?( signed int *, signed int ),                       ?|=?( volatile signed int *, signed int );
    605 unsigned int            ?|=?( unsigned *, unsigned ),                           ?|=?( volatile unsigned *, unsigned );
    606 signed long int         ?|=?( signed long int *, signed long int ),             ?|=?( volatile signed long int *, signed long int );
    607 unsigned long int       ?|=?( unsigned long int *, unsigned long int ),         ?|=?( volatile unsigned long int *, unsigned long int );
    608 signed long long int    ?|=?( signed long long int *, signed long long int ),   ?|=?( volatile signed long long int *, signed long long int );
    609 unsigned long long int  ?|=?( unsigned long long int *, unsigned long long int ), ?|=?( volatile unsigned long long int *, unsigned long long int );
    610 
    611 _Bool                   ?^=?( _Bool *, _Bool ),                                 ?^=?( volatile _Bool *, _Bool );
    612 char                    ?^=?( char *, char ),                                   ?^=?( volatile char *, char );
    613 char signed             ?^=?( char signed *, char signed ),                     ?^=?( volatile char signed *, char signed );
    614 char unsigned           ?^=?( char unsigned *, char unsigned ),                 ?^=?( volatile char unsigned *, char unsigned );
    615 int short               ?^=?( int short *, int short ),                         ?^=?( volatile int short *, int short );
    616 int short unsigned      ?^=?( int short unsigned *, int short unsigned ),       ?^=?( volatile int short unsigned *, int short unsigned );
    617 signed int              ?^=?( signed int *, signed int ),                       ?^=?( volatile signed int *, signed int );
    618 unsigned int            ?^=?( unsigned *, unsigned ),                           ?^=?( volatile unsigned *, unsigned );
    619 signed long int         ?^=?( signed long int *, signed long int ),             ?^=?( volatile signed long int *, signed long int );
    620 unsigned long int       ?^=?( unsigned long int *, unsigned long int ),         ?^=?( volatile unsigned long int *, unsigned long int );
    621 signed long long int    ?^=?( signed long long int *, signed long long int ),   ?^=?( volatile signed long long int *, signed long long int );
    622 unsigned long long int  ?^=?( unsigned long long int *, unsigned long long int ), ?^=?( volatile unsigned long long int *, unsigned long long int );
    623 
    624 float                   ?=?(  float *, float ), ?=?(  volatile float *, float ),
    625                         ?*=?( float *, float ), ?*=?( volatile float *, float ),
    626                         ?/=?( float *, float ), ?/=?( volatile float *, float ),
    627                         ?+=?( float *, float ), ?+=?( volatile float *, float ),
    628                         ?-=?( float *, float ), ?-=?( volatile float *, float );
    629 
    630 double                  ?=?(  double *, double ), ?=?(  volatile double *, double ),
    631                         ?*=?( double *, double ), ?*=?( volatile double *, double ),
    632                         ?/=?( double *, double ), ?/=?( volatile double *, double ),
    633                         ?+=?( double *, double ), ?+=?( volatile double *, double ),
    634                         ?-=?( double *, double ), ?-=?( volatile double *, double );
    635 
    636 long double             ?=?(  long double *, long double ), ?=?(  volatile long double *, long double ),
    637                         ?*=?( long double *, long double ), ?*=?( volatile long double *, long double ),
    638                         ?/=?( long double *, long double ), ?/=?( volatile long double *, long double ),
    639                         ?+=?( long double *, long double ), ?+=?( volatile long double *, long double ),
    640                         ?-=?( long double *, long double ), ?-=?( volatile long double *, long double );
    641 
    642 float _Complex          ?=?(  float _Complex *, float _Complex ), ?=?(  volatile float _Complex *, float _Complex ),
    643                         ?*=?( float _Complex *, float _Complex ), ?*=?( volatile float _Complex *, float _Complex ),
    644                         ?/=?( float _Complex *, float _Complex ), ?/=?( volatile float _Complex *, float _Complex ),
    645                         ?+=?( float _Complex *, float _Complex ), ?+=?( volatile float _Complex *, float _Complex ),
    646                         ?-=?( float _Complex *, float _Complex ), ?-=?( volatile float _Complex *, float _Complex );
    647 
    648 double _Complex         ?=?(  double _Complex *, double _Complex ), ?=?(  volatile double _Complex *, double _Complex ),
    649                         ?*=?( double _Complex *, double _Complex ), ?*=?( volatile double _Complex *, double _Complex ),
    650                         ?/=?( double _Complex *, double _Complex ), ?/=?( volatile double _Complex *, double _Complex ),
    651                         ?+=?( double _Complex *, double _Complex ), ?+=?( volatile double _Complex *, double _Complex ),
    652                         ?-=?( double _Complex *, double _Complex ), ?-=?( volatile double _Complex *, double _Complex );
    653 
    654 long double _Complex    ?=?(  long double _Complex *, long double _Complex ), ?=?(  volatile long double _Complex *, long double _Complex ),
    655                         ?*=?( long double _Complex *, long double _Complex ), ?*=?( volatile long double _Complex *, long double _Complex ),
    656                         ?/=?( long double _Complex *, long double _Complex ), ?/=?( volatile long double _Complex *, long double _Complex ),
    657                         ?+=?( long double _Complex *, long double _Complex ), ?+=?( volatile long double _Complex *, long double _Complex ),
    658                         ?-=?( long double _Complex *, long double _Complex ), ?-=?( volatile long double _Complex *, long double _Complex );
     368forall( ftype FT ) FT *                 ?=?( FT *&, FT * );
     369forall( ftype FT ) FT *                 ?=?( FT * volatile &, FT * );
     370
     371forall( dtype DT ) DT *                 ?=?(                 DT *          &,                   DT * );
     372forall( dtype DT ) DT *                 ?=?(                 DT * volatile &,                   DT * );
     373forall( dtype DT ) const DT *           ?=?( const           DT *          &,                   DT * );
     374forall( dtype DT ) const DT *           ?=?( const           DT * volatile &,                   DT * );
     375forall( dtype DT ) const DT *           ?=?( const           DT *          &, const             DT * );
     376forall( dtype DT ) const DT *           ?=?( const           DT * volatile &, const             DT * );
     377forall( dtype DT ) volatile DT *        ?=?(       volatile  DT *          &,                   DT * );
     378forall( dtype DT ) volatile DT *        ?=?(       volatile  DT * volatile &,                   DT * );
     379forall( dtype DT ) volatile DT *        ?=?(       volatile  DT *          &,       volatile    DT * );
     380forall( dtype DT ) volatile DT *        ?=?(       volatile  DT * volatile &,       volatile    DT * );
     381
     382forall( dtype DT ) const volatile DT *  ?=?( const volatile  DT *          &,                   DT * );
     383forall( dtype DT ) const volatile DT *  ?=?( const volatile  DT * volatile &,                   DT * );
     384forall( dtype DT ) const volatile DT *  ?=?( const volatile  DT *          &, const             DT * );
     385forall( dtype DT ) const volatile DT *  ?=?( const volatile  DT * volatile &, const             DT * );
     386forall( dtype DT ) const volatile DT *  ?=?( const volatile  DT *          &,       volatile    DT * );
     387forall( dtype DT ) const volatile DT *  ?=?( const volatile  DT * volatile &,       volatile    DT * );
     388forall( dtype DT ) const volatile DT *  ?=?( const volatile  DT *          &, const volatile    DT * );
     389forall( dtype DT ) const volatile DT *  ?=?( const volatile  DT * volatile &, const volatile    DT * );
     390
     391forall( dtype DT ) DT *                 ?=?(                 DT *          &,                   void * );
     392forall( dtype DT ) DT *                 ?=?(                 DT * volatile &,                   void * );
     393forall( dtype DT ) const DT *           ?=?( const           DT *          &,                   void * );
     394forall( dtype DT ) const DT *           ?=?( const           DT * volatile &,                   void * );
     395forall( dtype DT ) const DT *           ?=?( const           DT *          &, const             void * );
     396forall( dtype DT ) const DT *           ?=?( const           DT * volatile &, const             void * );
     397forall( dtype DT ) volatile DT *        ?=?(       volatile  DT *          &,                   void * );
     398forall( dtype DT ) volatile DT *        ?=?(       volatile  DT * volatile &,                   void * );
     399forall( dtype DT ) volatile DT *        ?=?(       volatile  DT *          &,       volatile    void * );
     400forall( dtype DT ) volatile DT *        ?=?(       volatile  DT * volatile &,       volatile    void * );
     401
     402forall( dtype DT ) const volatile DT *  ?=?( const volatile  DT *          &,                   void * );
     403forall( dtype DT ) const volatile DT *  ?=?( const volatile  DT * volatile &,                   void * );
     404forall( dtype DT ) const volatile DT *  ?=?( const volatile  DT *          &, const             void * );
     405forall( dtype DT ) const volatile DT *  ?=?( const volatile  DT * volatile &, const             void * );
     406forall( dtype DT ) const volatile DT *  ?=?( const volatile  DT *          &,       volatile    void * );
     407forall( dtype DT ) const volatile DT *  ?=?( const volatile  DT * volatile &,       volatile    void * );
     408forall( dtype DT ) const volatile DT *  ?=?( const volatile  DT *          &, const volatile    void * );
     409forall( dtype DT ) const volatile DT *  ?=?( const volatile  DT * volatile &, const volatile    void * );
     410
     411forall( dtype DT ) void *                ?=?(                void *          &,                 DT * );
     412forall( dtype DT ) void *                ?=?(                void * volatile &,                 DT * );
     413forall( dtype DT ) const void *          ?=?( const          void *          &,                 DT * );
     414forall( dtype DT ) const void *          ?=?( const          void * volatile &,                 DT * );
     415forall( dtype DT ) const void *          ?=?( const          void *          &, const           DT * );
     416forall( dtype DT ) const void *          ?=?( const          void * volatile &, const           DT * );
     417forall( dtype DT ) volatile void *       ?=?(       volatile void *          &,                 DT * );
     418forall( dtype DT ) volatile void *       ?=?(       volatile void * volatile &,                 DT * );
     419forall( dtype DT ) volatile void *       ?=?(       volatile void *          &,       volatile  DT * );
     420forall( dtype DT ) volatile void *       ?=?(       volatile void * volatile &,       volatile  DT * );
     421forall( dtype DT ) const volatile void * ?=?( const volatile void *          &,                 DT * );
     422forall( dtype DT ) const volatile void * ?=?( const volatile void * volatile &,                 DT * );
     423forall( dtype DT ) const volatile void * ?=?( const volatile void *          &, const           DT * );
     424forall( dtype DT ) const volatile void * ?=?( const volatile void * volatile &, const           DT * );
     425forall( dtype DT ) const volatile void * ?=?( const volatile void *          &,       volatile  DT * );
     426forall( dtype DT ) const volatile void * ?=?( const volatile void * volatile &,       volatile  DT * );
     427forall( dtype DT ) const volatile void * ?=?( const volatile void *          &, const volatile  DT * );
     428forall( dtype DT ) const volatile void * ?=?( const volatile void * volatile &, const volatile  DT * );
     429
     430void *                  ?=?(                void *          &,                void * );
     431void *                  ?=?(                void * volatile &,                void * );
     432const void *            ?=?( const          void *          &,                void * );
     433const void *            ?=?( const          void * volatile &,                void * );
     434const void *            ?=?( const          void *          &, const          void * );
     435const void *            ?=?( const          void * volatile &, const          void * );
     436volatile void *         ?=?(       volatile void *          &,                void * );
     437volatile void *         ?=?(       volatile void * volatile &,                void * );
     438volatile void *         ?=?(       volatile void *          &,       volatile void * );
     439volatile void *         ?=?(       volatile void * volatile &,       volatile void * );
     440const volatile void *   ?=?( const volatile void *          &,                void * );
     441const volatile void *   ?=?( const volatile void * volatile &,                void * );
     442const volatile void *   ?=?( const volatile void *          &, const          void * );
     443const volatile void *   ?=?( const volatile void * volatile &, const          void * );
     444const volatile void *   ?=?( const volatile void *          &,       volatile void * );
     445const volatile void *   ?=?( const volatile void * volatile &,       volatile void * );
     446const volatile void *   ?=?( const volatile void *          &, const volatile void * );
     447const volatile void *   ?=?( const volatile void * volatile &, const volatile void * );
     448
     449//forall( dtype DT ) DT *                       ?=?(                DT *          &, zero_t );
     450//forall( dtype DT ) DT *                       ?=?(                DT * volatile &, zero_t );
     451forall( dtype DT ) const DT *           ?=?( const          DT *          &, zero_t );
     452forall( dtype DT ) const DT *           ?=?( const          DT * volatile &, zero_t );
     453//forall( dtype DT ) volatile DT *      ?=?( volatile       DT *          &, zero_t );
     454//forall( dtype DT ) volatile DT *      ?=?( volatile       DT * volatile &, zero_t );
     455forall( dtype DT ) const volatile DT *  ?=?( const volatile DT *          &, zero_t );
     456forall( dtype DT ) const volatile DT *  ?=?( const volatile DT * volatile &, zero_t );
     457
     458forall( ftype FT ) FT *                 ?=?( FT *          &, zero_t );
     459forall( ftype FT ) FT *                 ?=?( FT * volatile &, zero_t );
     460
     461forall( dtype T | sized(T) ) T *                        ?+=?(                T *          &, ptrdiff_t );
     462forall( dtype T | sized(T) ) T *                        ?+=?(                T * volatile &, ptrdiff_t );
     463forall( dtype T | sized(T) ) const T *          ?+=?( const          T *          &, ptrdiff_t );
     464forall( dtype T | sized(T) ) const T *          ?+=?( const          T * volatile &, ptrdiff_t );
     465forall( dtype T | sized(T) ) volatile T *               ?+=?(       volatile T *          &, ptrdiff_t );
     466forall( dtype T | sized(T) ) volatile T *               ?+=?(       volatile T * volatile &, ptrdiff_t );
     467forall( dtype T | sized(T) ) const volatile T * ?+=?( const volatile T *          &, ptrdiff_t );
     468forall( dtype T | sized(T) ) const volatile T * ?+=?( const volatile T * volatile &, ptrdiff_t );
     469forall( dtype T | sized(T) ) T *                        ?-=?(                T *          &, ptrdiff_t );
     470forall( dtype T | sized(T) ) T *                        ?-=?(                T * volatile &, ptrdiff_t );
     471forall( dtype T | sized(T) ) const T *          ?-=?( const          T *          &, ptrdiff_t );
     472forall( dtype T | sized(T) ) const T *          ?-=?( const          T * volatile &, ptrdiff_t );
     473forall( dtype T | sized(T) ) volatile T *               ?-=?(       volatile T *          &, ptrdiff_t );
     474forall( dtype T | sized(T) ) volatile T *               ?-=?(       volatile T * volatile &, ptrdiff_t );
     475forall( dtype T | sized(T) ) const volatile T * ?-=?( const volatile T *          &, ptrdiff_t );
     476forall( dtype T | sized(T) ) const volatile T * ?-=?( const volatile T * volatile &, ptrdiff_t );
     477
     478_Bool                   ?=?( _Bool &, _Bool ),                                  ?=?( volatile _Bool &, _Bool );
     479char                    ?=?( char &, char ),                                    ?=?( volatile char &, char );
     480char signed             ?=?( char signed &, char signed ),                      ?=?( volatile char signed &, char signed );
     481char unsigned           ?=?( char unsigned &, char unsigned ),                  ?=?( volatile char unsigned &, char unsigned );
     482int short               ?=?( int short &, int short ),                          ?=?( volatile int short &, int short );
     483int short unsigned      ?=?( int short unsigned &, int short unsigned ),        ?=?( volatile int short unsigned &, int short unsigned );
     484signed int              ?=?( signed int &, signed int ),                        ?=?( volatile signed int &, signed int );
     485unsigned int            ?=?( unsigned &, unsigned ),                            ?=?( volatile unsigned &, unsigned );
     486signed long int         ?=?( signed long int &, signed long int ),              ?=?( volatile signed long int &, signed long int );
     487unsigned long int       ?=?( unsigned long int &, unsigned long int ),          ?=?( volatile unsigned long int &, unsigned long int );
     488signed long long int    ?=?( signed long long int &, signed long long int ),    ?=?( volatile signed long long int &, signed long long int );
     489unsigned long long int  ?=?( unsigned long long int &, unsigned long long int ), ?=?( volatile unsigned long long int &, unsigned long long int );
     490zero_t          ?=?( zero_t &, zero_t );
     491one_t                   ?=?( one_t &, one_t );
     492
     493
     494_Bool                   ?*=?( _Bool &, _Bool ),                                 ?*=?( volatile _Bool &, _Bool );
     495char                    ?*=?( char &, char ),                                   ?*=?( volatile char &, char );
     496char signed             ?*=?( char signed &, char signed ),                     ?*=?( volatile char signed &, char signed );
     497char unsigned           ?*=?( char unsigned &, char unsigned ),                 ?*=?( volatile char unsigned &, char unsigned );
     498int short               ?*=?( int short &, int short ),                         ?*=?( volatile int short &, int short );
     499int short unsigned      ?*=?( int short unsigned &, int short unsigned ),       ?*=?( volatile int short unsigned &, int short unsigned );
     500signed int              ?*=?( signed int &, signed int ),                       ?*=?( volatile signed int &, signed int );
     501unsigned int            ?*=?( unsigned &, unsigned ),                           ?*=?( volatile unsigned &, unsigned );
     502signed long int         ?*=?( signed long int &, signed long int ),             ?*=?( volatile signed long int &, signed long int );
     503unsigned long int       ?*=?( unsigned long int &, unsigned long int ),         ?*=?( volatile unsigned long int &, unsigned long int );
     504signed long long int    ?*=?( signed long long int &, signed long long int ),   ?*=?( volatile signed long long int &, signed long long int );
     505unsigned long long int  ?*=?( unsigned long long int &, unsigned long long int ), ?*=?( volatile unsigned long long int &, unsigned long long int );
     506
     507_Bool                   ?/=?( _Bool &, _Bool ),                                 ?/=?( volatile _Bool &, _Bool );
     508char                    ?/=?( char &, char ),                                   ?/=?( volatile char &, char );
     509char signed             ?/=?( char signed &, char signed ),                     ?/=?( volatile char signed &, char signed );
     510char unsigned           ?/=?( char unsigned &, char unsigned ),                 ?/=?( volatile char unsigned &, char unsigned );
     511int short               ?/=?( int short &, int short ),                         ?/=?( volatile int short &, int short );
     512int short unsigned      ?/=?( int short unsigned &, int short unsigned ),       ?/=?( volatile int short unsigned &, int short unsigned );
     513signed int              ?/=?( signed int &, signed int ),                       ?/=?( volatile signed int &, signed int );
     514unsigned int            ?/=?( unsigned &, unsigned ),                           ?/=?( volatile unsigned &, unsigned );
     515signed long int         ?/=?( signed long int &, signed long int ),             ?/=?( volatile signed long int &, signed long int );
     516unsigned long int       ?/=?( unsigned long int &, unsigned long int ),         ?/=?( volatile unsigned long int &, unsigned long int );
     517signed long long int    ?/=?( signed long long int &, signed long long int ),   ?/=?( volatile signed long long int &, signed long long int );
     518unsigned long long int  ?/=?( unsigned long long int &, unsigned long long int ), ?/=?( volatile unsigned long long int &, unsigned long long int );
     519
     520_Bool                   ?%=?( _Bool &, _Bool ),                                 ?%=?( volatile _Bool &, _Bool );
     521char                    ?%=?( char &, char ),                                   ?%=?( volatile char &, char );
     522char signed             ?%=?( char signed &, char signed ),                     ?%=?( volatile char signed &, char signed );
     523char unsigned           ?%=?( char unsigned &, char unsigned ),                 ?%=?( volatile char unsigned &, char unsigned );
     524int short               ?%=?( int short &, int short ),                         ?%=?( volatile int short &, int short );
     525int short unsigned      ?%=?( int short unsigned &, int short unsigned ),       ?%=?( volatile int short unsigned &, int short unsigned );
     526signed int              ?%=?( signed int &, signed int ),                       ?%=?( volatile signed int &, signed int );
     527unsigned int            ?%=?( unsigned &, unsigned ),                           ?%=?( volatile unsigned &, unsigned );
     528signed long int         ?%=?( signed long int &, signed long int ),             ?%=?( volatile signed long int &, signed long int );
     529unsigned long int       ?%=?( unsigned long int &, unsigned long int ),         ?%=?( volatile unsigned long int &, unsigned long int );
     530signed long long int    ?%=?( signed long long int &, signed long long int ),   ?%=?( volatile signed long long int &, signed long long int );
     531unsigned long long int  ?%=?( unsigned long long int &, unsigned long long int ), ?%=?( volatile unsigned long long int &, unsigned long long int );
     532
     533_Bool                   ?+=?( _Bool &, _Bool ),                                 ?+=?( volatile _Bool &, _Bool );
     534char                    ?+=?( char &, char ),                                   ?+=?( volatile char &, char );
     535char signed             ?+=?( char signed &, char signed ),                     ?+=?( volatile char signed &, char signed );
     536char unsigned           ?+=?( char unsigned &, char unsigned ),                 ?+=?( volatile char unsigned &, char unsigned );
     537int short               ?+=?( int short &, int short ),                         ?+=?( volatile int short &, int short );
     538int short unsigned      ?+=?( int short unsigned &, int short unsigned ),       ?+=?( volatile int short unsigned &, int short unsigned );
     539signed int              ?+=?( signed int &, signed int ),                       ?+=?( volatile signed int &, signed int );
     540unsigned int            ?+=?( unsigned &, unsigned ),                           ?+=?( volatile unsigned &, unsigned );
     541signed long int         ?+=?( signed long int &, signed long int ),             ?+=?( volatile signed long int &, signed long int );
     542unsigned long int       ?+=?( unsigned long int &, unsigned long int ),         ?+=?( volatile unsigned long int &, unsigned long int );
     543signed long long int    ?+=?( signed long long int &, signed long long int ),   ?+=?( volatile signed long long int &, signed long long int );
     544unsigned long long int  ?+=?( unsigned long long int &, unsigned long long int ), ?+=?( volatile unsigned long long int &, unsigned long long int );
     545
     546_Bool                   ?-=?( _Bool &, _Bool ),                                 ?-=?( volatile _Bool &, _Bool );
     547char                    ?-=?( char &, char ),                                   ?-=?( volatile char &, char );
     548char signed             ?-=?( char signed &, char signed ),                     ?-=?( volatile char signed &, char signed );
     549char unsigned           ?-=?( char unsigned &, char unsigned ),                 ?-=?( volatile char unsigned &, char unsigned );
     550int short               ?-=?( int short &, int short ),                         ?-=?( volatile int short &, int short );
     551int short unsigned      ?-=?( int short unsigned &, int short unsigned ),       ?-=?( volatile int short unsigned &, int short unsigned );
     552signed int              ?-=?( signed int &, signed int ),                       ?-=?( volatile signed int &, signed int );
     553unsigned int            ?-=?( unsigned &, unsigned ),                           ?-=?( volatile unsigned &, unsigned );
     554signed long int         ?-=?( signed long int &, signed long int ),             ?-=?( volatile signed long int &, signed long int );
     555unsigned long int       ?-=?( unsigned long int &, unsigned long int ),         ?-=?( volatile unsigned long int &, unsigned long int );
     556signed long long int    ?-=?( signed long long int &, signed long long int ),   ?-=?( volatile signed long long int &, signed long long int );
     557unsigned long long int  ?-=?( unsigned long long int &, unsigned long long int ), ?-=?( volatile unsigned long long int &, unsigned long long int );
     558
     559_Bool                   ?<<=?( _Bool &, _Bool ),                                ?<<=?( volatile _Bool &, _Bool );
     560char                    ?<<=?( char &, char ),                                  ?<<=?( volatile char &, char );
     561char signed             ?<<=?( char signed &, char signed ),                    ?<<=?( volatile char signed &, char signed );
     562char unsigned           ?<<=?( char unsigned &, char unsigned ),                ?<<=?( volatile char unsigned &, char unsigned );
     563int short               ?<<=?( int short &, int short ),                        ?<<=?( volatile int short &, int short );
     564int short unsigned      ?<<=?( int short unsigned &, int short unsigned ),      ?<<=?( volatile int short unsigned &, int short unsigned );
     565signed int              ?<<=?( signed int &, signed int ),                      ?<<=?( volatile signed int &, signed int );
     566unsigned int            ?<<=?( unsigned &, unsigned ),                          ?<<=?( volatile unsigned &, unsigned );
     567signed long int         ?<<=?( signed long int &, signed long int ),            ?<<=?( volatile signed long int &, signed long int );
     568unsigned long int       ?<<=?( unsigned long int &, unsigned long int ),        ?<<=?( volatile unsigned long int &, unsigned long int );
     569signed long long int    ?<<=?( signed long long int &, signed long long int ),  ?<<=?( volatile signed long long int &, signed long long int );
     570unsigned long long int  ?<<=?( unsigned long long int &, unsigned long long int ), ?<<=?( volatile unsigned long long int &, unsigned long long int );
     571
     572_Bool                   ?>>=?( _Bool &, _Bool ),                                ?>>=?( volatile _Bool &, _Bool );
     573char                    ?>>=?( char &, char ),                                  ?>>=?( volatile char &, char );
     574char signed             ?>>=?( char signed &, char signed ),                    ?>>=?( volatile char signed &, char signed );
     575char unsigned           ?>>=?( char unsigned &, char unsigned ),                ?>>=?( volatile char unsigned &, char unsigned );
     576int short               ?>>=?( int short &, int short ),                        ?>>=?( volatile int short &, int short );
     577int short unsigned      ?>>=?( int short unsigned &, int short unsigned ),      ?>>=?( volatile int short unsigned &, int short unsigned );
     578signed int              ?>>=?( signed int &, signed int ),                      ?>>=?( volatile signed int &, signed int );
     579unsigned int            ?>>=?( unsigned &, unsigned ),                          ?>>=?( volatile unsigned &, unsigned );
     580signed long int         ?>>=?( signed long int &, signed long int ),            ?>>=?( volatile signed long int &, signed long int );
     581unsigned long int       ?>>=?( unsigned long int &, unsigned long int ),        ?>>=?( volatile unsigned long int &, unsigned long int );
     582signed long long int    ?>>=?( signed long long int &, signed long long int ),  ?>>=?( volatile signed long long int &, signed long long int );
     583unsigned long long int  ?>>=?( unsigned long long int &, unsigned long long int ), ?>>=?( volatile unsigned long long int &, unsigned long long int );
     584
     585_Bool                   ?&=?( _Bool &, _Bool ),                                 ?&=?( volatile _Bool &, _Bool );
     586char                    ?&=?( char &, char ),                                   ?&=?( volatile char &, char );
     587char signed             ?&=?( char signed &, char signed ),                     ?&=?( volatile char signed &, char signed );
     588char unsigned           ?&=?( char unsigned &, char unsigned ),                 ?&=?( volatile char unsigned &, char unsigned );
     589int short               ?&=?( int short &, int short ),                         ?&=?( volatile int short &, int short );
     590int short unsigned      ?&=?( int short unsigned &, int short unsigned ),       ?&=?( volatile int short unsigned &, int short unsigned );
     591signed int              ?&=?( signed int &, signed int ),                       ?&=?( volatile signed int &, signed int );
     592unsigned int            ?&=?( unsigned &, unsigned ),                           ?&=?( volatile unsigned &, unsigned );
     593signed long int         ?&=?( signed long int &, signed long int ),             ?&=?( volatile signed long int &, signed long int );
     594unsigned long int       ?&=?( unsigned long int &, unsigned long int ),         ?&=?( volatile unsigned long int &, unsigned long int );
     595signed long long int    ?&=?( signed long long int &, signed long long int ),   ?&=?( volatile signed long long int &, signed long long int );
     596unsigned long long int  ?&=?( unsigned long long int &, unsigned long long int ), ?&=?( volatile unsigned long long int &, unsigned long long int );
     597
     598_Bool                   ?|=?( _Bool &, _Bool ),                                 ?|=?( volatile _Bool &, _Bool );
     599char                    ?|=?( char &, char ),                                   ?|=?( volatile char &, char );
     600char signed             ?|=?( char signed &, char signed ),                     ?|=?( volatile char signed &, char signed );
     601char unsigned           ?|=?( char unsigned &, char unsigned ),                 ?|=?( volatile char unsigned &, char unsigned );
     602int short               ?|=?( int short &, int short ),                         ?|=?( volatile int short &, int short );
     603int short unsigned      ?|=?( int short unsigned &, int short unsigned ),       ?|=?( volatile int short unsigned &, int short unsigned );
     604signed int              ?|=?( signed int &, signed int ),                       ?|=?( volatile signed int &, signed int );
     605unsigned int            ?|=?( unsigned &, unsigned ),                           ?|=?( volatile unsigned &, unsigned );
     606signed long int         ?|=?( signed long int &, signed long int ),             ?|=?( volatile signed long int &, signed long int );
     607unsigned long int       ?|=?( unsigned long int &, unsigned long int ),         ?|=?( volatile unsigned long int &, unsigned long int );
     608signed long long int    ?|=?( signed long long int &, signed long long int ),   ?|=?( volatile signed long long int &, signed long long int );
     609unsigned long long int  ?|=?( unsigned long long int &, unsigned long long int ), ?|=?( volatile unsigned long long int &, unsigned long long int );
     610
     611_Bool                   ?^=?( _Bool &, _Bool ),                                 ?^=?( volatile _Bool &, _Bool );
     612char                    ?^=?( char &, char ),                                   ?^=?( volatile char &, char );
     613char signed             ?^=?( char signed &, char signed ),                     ?^=?( volatile char signed &, char signed );
     614char unsigned           ?^=?( char unsigned &, char unsigned ),                 ?^=?( volatile char unsigned &, char unsigned );
     615int short               ?^=?( int short &, int short ),                         ?^=?( volatile int short &, int short );
     616int short unsigned      ?^=?( int short unsigned &, int short unsigned ),       ?^=?( volatile int short unsigned &, int short unsigned );
     617signed int              ?^=?( signed int &, signed int ),                       ?^=?( volatile signed int &, signed int );
     618unsigned int            ?^=?( unsigned &, unsigned ),                           ?^=?( volatile unsigned &, unsigned );
     619signed long int         ?^=?( signed long int &, signed long int ),             ?^=?( volatile signed long int &, signed long int );
     620unsigned long int       ?^=?( unsigned long int &, unsigned long int ),         ?^=?( volatile unsigned long int &, unsigned long int );
     621signed long long int    ?^=?( signed long long int &, signed long long int ),   ?^=?( volatile signed long long int &, signed long long int );
     622unsigned long long int  ?^=?( unsigned long long int &, unsigned long long int ), ?^=?( volatile unsigned long long int &, unsigned long long int );
     623
     624float                   ?=?(  float &, float ), ?=?(  volatile float &, float ),
     625                        ?*=?( float &, float ), ?*=?( volatile float &, float ),
     626                        ?/=?( float &, float ), ?/=?( volatile float &, float ),
     627                        ?+=?( float &, float ), ?+=?( volatile float &, float ),
     628                        ?-=?( float &, float ), ?-=?( volatile float &, float );
     629
     630double                  ?=?(  double &, double ), ?=?(  volatile double &, double ),
     631                        ?*=?( double &, double ), ?*=?( volatile double &, double ),
     632                        ?/=?( double &, double ), ?/=?( volatile double &, double ),
     633                        ?+=?( double &, double ), ?+=?( volatile double &, double ),
     634                        ?-=?( double &, double ), ?-=?( volatile double &, double );
     635
     636long double             ?=?(  long double &, long double ), ?=?(  volatile long double &, long double ),
     637                        ?*=?( long double &, long double ), ?*=?( volatile long double &, long double ),
     638                        ?/=?( long double &, long double ), ?/=?( volatile long double &, long double ),
     639                        ?+=?( long double &, long double ), ?+=?( volatile long double &, long double ),
     640                        ?-=?( long double &, long double ), ?-=?( volatile long double &, long double );
     641
     642float _Complex          ?=?(  float _Complex &, float _Complex ), ?=?(  volatile float _Complex &, float _Complex ),
     643                        ?*=?( float _Complex &, float _Complex ), ?*=?( volatile float _Complex &, float _Complex ),
     644                        ?/=?( float _Complex &, float _Complex ), ?/=?( volatile float _Complex &, float _Complex ),
     645                        ?+=?( float _Complex &, float _Complex ), ?+=?( volatile float _Complex &, float _Complex ),
     646                        ?-=?( float _Complex &, float _Complex ), ?-=?( volatile float _Complex &, float _Complex );
     647
     648double _Complex         ?=?(  double _Complex &, double _Complex ), ?=?(  volatile double _Complex &, double _Complex ),
     649                        ?*=?( double _Complex &, double _Complex ), ?*=?( volatile double _Complex &, double _Complex ),
     650                        ?/=?( double _Complex &, double _Complex ), ?/=?( volatile double _Complex &, double _Complex ),
     651                        ?+=?( double _Complex &, double _Complex ), ?+=?( volatile double _Complex &, double _Complex ),
     652                        ?-=?( double _Complex &, double _Complex ), ?-=?( volatile double _Complex &, double _Complex );
     653
     654long double _Complex    ?=?(  long double _Complex &, long double _Complex ), ?=?(  volatile long double _Complex &, long double _Complex ),
     655                        ?*=?( long double _Complex &, long double _Complex ), ?*=?( volatile long double _Complex &, long double _Complex ),
     656                        ?/=?( long double _Complex &, long double _Complex ), ?/=?( volatile long double _Complex &, long double _Complex ),
     657                        ?+=?( long double _Complex &, long double _Complex ), ?+=?( volatile long double _Complex &, long double _Complex ),
     658                        ?-=?( long double _Complex &, long double _Complex ), ?-=?( volatile long double _Complex &, long double _Complex );
    659659
    660660
     
    669669
    670670// default ctor
    671 void    ?{}( _Bool * );
    672 void    ?{}( char * );
    673 void    ?{}( unsigned char * );
    674 void    ?{}( char signed * );
    675 void    ?{}( int short * );
    676 void    ?{}( int short unsigned * );
    677 void    ?{}( signed int * );
    678 void    ?{}( unsigned int * );
    679 void    ?{}( signed long int * );
    680 void    ?{}( unsigned long int * );
    681 void    ?{}( signed long long int * );
    682 void    ?{}( unsigned long long int * );
    683 void    ?{}( float * );
    684 void    ?{}( double * );
    685 void    ?{}( long double * );
    686 void    ?{}( float _Complex * );
    687 void    ?{}( double _Complex * );
    688 void    ?{}( long double _Complex * );
    689 void    ?{}( zero_t * );
    690 void    ?{}( one_t * );
     671void    ?{}( _Bool & );
     672void    ?{}( char & );
     673void    ?{}( unsigned char & );
     674void    ?{}( char signed & );
     675void    ?{}( int short & );
     676void    ?{}( int short unsigned & );
     677void    ?{}( signed int & );
     678void    ?{}( unsigned int & );
     679void    ?{}( signed long int & );
     680void    ?{}( unsigned long int & );
     681void    ?{}( signed long long int & );
     682void    ?{}( unsigned long long int & );
     683void    ?{}( float & );
     684void    ?{}( double & );
     685void    ?{}( long double & );
     686void    ?{}( float _Complex & );
     687void    ?{}( double _Complex & );
     688void    ?{}( long double _Complex & );
     689void    ?{}( zero_t & );
     690void    ?{}( one_t & );
    691691
    692692// copy ctor
    693 void    ?{}( _Bool *, _Bool );
    694 void    ?{}( char *, char );
    695 void    ?{}( unsigned char *, unsigned char );
    696 void    ?{}( char signed *, char signed );
    697 void    ?{}( int short *, int short );
    698 void    ?{}( int short unsigned *, int short unsigned );
    699 void    ?{}( signed int *, signed int);
    700 void    ?{}( unsigned int *, unsigned int);
    701 void    ?{}( signed long int *, signed long int);
    702 void    ?{}( unsigned long int *, unsigned long int);
    703 void    ?{}( signed long long int *, signed long long int);
    704 void    ?{}( unsigned long long int *, unsigned long long int);
    705 void    ?{}( float *, float);
    706 void    ?{}( double *, double);
    707 void    ?{}( long double *, long double);
    708 void    ?{}( float _Complex *, float _Complex);
    709 void    ?{}( double _Complex *, double _Complex);
    710 void    ?{}( long double _Complex *, long double _Complex);
    711 void    ?{}( zero_t *, zero_t );
    712 void    ?{}( one_t *, one_t );
     693void    ?{}( _Bool &, _Bool );
     694void    ?{}( char &, char );
     695void    ?{}( unsigned char &, unsigned char );
     696void    ?{}( char signed &, char signed );
     697void    ?{}( int short &, int short );
     698void    ?{}( int short unsigned &, int short unsigned );
     699void    ?{}( signed int &, signed int);
     700void    ?{}( unsigned int &, unsigned int);
     701void    ?{}( signed long int &, signed long int);
     702void    ?{}( unsigned long int &, unsigned long int);
     703void    ?{}( signed long long int &, signed long long int);
     704void    ?{}( unsigned long long int &, unsigned long long int);
     705void    ?{}( float &, float);
     706void    ?{}( double &, double);
     707void    ?{}( long double &, long double);
     708void    ?{}( float _Complex &, float _Complex);
     709void    ?{}( double _Complex &, double _Complex);
     710void    ?{}( long double _Complex &, long double _Complex);
     711void    ?{}( zero_t &, zero_t );
     712void    ?{}( one_t &, one_t );
    713713
    714714// dtor
    715 void    ^?{}( _Bool * );
    716 void    ^?{}( char * );
    717 void    ^?{}( char unsigned * );
    718 void    ^?{}( char signed * );
    719 void    ^?{}( int short * );
    720 void    ^?{}( int short unsigned * );
    721 void    ^?{}( signed int * );
    722 void    ^?{}( unsigned int * );
    723 void    ^?{}( signed long int * );
    724 void    ^?{}( unsigned long int * );
    725 void    ^?{}( signed long long int * );
    726 void    ^?{}( unsigned long long int * );
    727 void    ^?{}( float * );
    728 void    ^?{}( double * );
    729 void    ^?{}( long double * );
    730 void    ^?{}( float _Complex * );
    731 void    ^?{}( double _Complex * );
    732 void    ^?{}( long double _Complex * );
    733 void    ^?{}( zero_t * );
    734 void    ^?{}( one_t * );
     715void    ^?{}( _Bool & );
     716void    ^?{}( char & );
     717void    ^?{}( char unsigned & );
     718void    ^?{}( char signed & );
     719void    ^?{}( int short & );
     720void    ^?{}( int short unsigned & );
     721void    ^?{}( signed int & );
     722void    ^?{}( unsigned int & );
     723void    ^?{}( signed long int & );
     724void    ^?{}( unsigned long int & );
     725void    ^?{}( signed long long int & );
     726void    ^?{}( unsigned long long int & );
     727void    ^?{}( float & );
     728void    ^?{}( double & );
     729void    ^?{}( long double & );
     730void    ^?{}( float _Complex & );
     731void    ^?{}( double _Complex & );
     732void    ^?{}( long double _Complex & );
     733void    ^?{}( zero_t & );
     734void    ^?{}( one_t & );
    735735
    736736// // default ctor
     
    754754// copied from assignment section
    755755// copy constructors
    756 forall( ftype FT ) void ?{}( FT **, FT * );
    757 forall( ftype FT ) void ?{}( FT * volatile *, FT * );
    758 
    759 forall( dtype DT ) void ?{}(                 DT *          *,                   DT * );
    760 forall( dtype DT ) void ?{}( const           DT *          *,                   DT * );
    761 forall( dtype DT ) void ?{}( const           DT *          *, const             DT * );
    762 forall( dtype DT ) void ?{}(       volatile  DT *          *,                   DT * );
    763 forall( dtype DT ) void ?{}(       volatile  DT *          *,       volatile    DT * );
    764 
    765 forall( dtype DT ) void ?{}( const volatile  DT *          *,                   DT * );
    766 forall( dtype DT ) void ?{}( const volatile  DT *          *, const             DT * );
    767 forall( dtype DT ) void ?{}( const volatile  DT *          *,       volatile    DT * );
    768 forall( dtype DT ) void ?{}( const volatile  DT *          *, const volatile    DT * );
    769 
    770 forall( dtype DT ) void ?{}(                 DT *          *,                   void * );
    771 forall( dtype DT ) void ?{}( const           DT *          *,                   void * );
    772 forall( dtype DT ) void ?{}( const           DT *          *, const             void * );
    773 forall( dtype DT ) void ?{}(       volatile  DT *          *,                   void * );
    774 forall( dtype DT ) void ?{}(       volatile  DT *          *,       volatile    void * );
    775 
    776 forall( dtype DT ) void ?{}( const volatile  DT *          *,                   void * );
    777 forall( dtype DT ) void ?{}( const volatile  DT *          *, const             void * );
    778 forall( dtype DT ) void ?{}( const volatile  DT *          *,       volatile    void * );
    779 forall( dtype DT ) void ?{}( const volatile  DT *          *, const volatile    void * );
    780 
    781 forall( dtype DT ) void ?{}(                 void *          *,                 DT * );
    782 forall( dtype DT ) void ?{}( const           void *          *,                 DT * );
    783 forall( dtype DT ) void ?{}( const           void *          *, const           DT * );
    784 forall( dtype DT ) void ?{}(        volatile void *          *,                 DT * );
    785 forall( dtype DT ) void ?{}(        volatile void *          *,       volatile  DT * );
    786 forall( dtype DT ) void ?{}( const volatile void *           *,                 DT * );
    787 forall( dtype DT ) void ?{}( const volatile void *           *, const           DT * );
    788 forall( dtype DT ) void ?{}( const volatile void *           *,       volatile  DT * );
    789 forall( dtype DT ) void ?{}( const volatile void *           *, const volatile  DT * );
    790 
    791 void    ?{}(                void *          *,                void * );
    792 void    ?{}( const          void *          *,                void * );
    793 void    ?{}( const          void *          *, const          void * );
    794 void    ?{}(       volatile void *          *,                void * );
    795 void    ?{}(       volatile void *          *,       volatile void * );
    796 void    ?{}( const volatile void *          *,                void * );
    797 void    ?{}( const volatile void *          *, const          void * );
    798 void    ?{}( const volatile void *          *,       volatile void * );
    799 void    ?{}( const volatile void *          *, const volatile void * );
    800 
    801 // //forall( dtype DT ) void ?{}(                   DT *          *, zero_t );
    802 // //forall( dtype DT ) void ?{}(                   DT * volatile *, zero_t );
    803 // forall( dtype DT ) void ?{}( const       DT *          *, zero_t );
    804 // //forall( dtype DT ) void ?{}( volatile          DT *          *, zero_t );
    805 // //forall( dtype DT ) void ?{}( volatile          DT * volatile *, zero_t );
    806 // forall( dtype DT ) void ?{}( const volatile DT *       *, zero_t );
    807 
    808 // forall( ftype FT ) void      ?{}( FT *          *, zero_t );
     756forall( ftype FT ) void ?{}( FT *&, FT * );
     757forall( ftype FT ) void ?{}( FT * volatile &, FT * );
     758
     759forall( dtype DT ) void ?{}(                 DT *          &,                   DT * );
     760forall( dtype DT ) void ?{}( const           DT *          &,                   DT * );
     761forall( dtype DT ) void ?{}( const           DT *          &, const             DT * );
     762forall( dtype DT ) void ?{}(       volatile  DT *          &,                   DT * );
     763forall( dtype DT ) void ?{}(       volatile  DT *          &,       volatile    DT * );
     764
     765forall( dtype DT ) void ?{}( const volatile  DT *          &,                   DT * );
     766forall( dtype DT ) void ?{}( const volatile  DT *          &, const             DT * );
     767forall( dtype DT ) void ?{}( const volatile  DT *          &,       volatile    DT * );
     768forall( dtype DT ) void ?{}( const volatile  DT *          &, const volatile    DT * );
     769
     770forall( dtype DT ) void ?{}(                 DT *          &,                   void * );
     771forall( dtype DT ) void ?{}( const           DT *          &,                   void * );
     772forall( dtype DT ) void ?{}( const           DT *          &, const             void * );
     773forall( dtype DT ) void ?{}(       volatile  DT *          &,                   void * );
     774forall( dtype DT ) void ?{}(       volatile  DT *          &,       volatile    void * );
     775
     776forall( dtype DT ) void ?{}( const volatile  DT *          &,                   void * );
     777forall( dtype DT ) void ?{}( const volatile  DT *          &, const             void * );
     778forall( dtype DT ) void ?{}( const volatile  DT *          &,       volatile    void * );
     779forall( dtype DT ) void ?{}( const volatile  DT *          &, const volatile    void * );
     780
     781forall( dtype DT ) void ?{}(                 void *          &,                 DT * );
     782forall( dtype DT ) void ?{}( const           void *          &,                 DT * );
     783forall( dtype DT ) void ?{}( const           void *          &, const           DT * );
     784forall( dtype DT ) void ?{}(        volatile void *          &,                 DT * );
     785forall( dtype DT ) void ?{}(        volatile void *          &,       volatile  DT * );
     786forall( dtype DT ) void ?{}( const volatile void *           &,                 DT * );
     787forall( dtype DT ) void ?{}( const volatile void *           &, const           DT * );
     788forall( dtype DT ) void ?{}( const volatile void *           &,       volatile  DT * );
     789forall( dtype DT ) void ?{}( const volatile void *           &, const volatile  DT * );
     790
     791void    ?{}(                void *          &,                void * );
     792void    ?{}( const          void *          &,                void * );
     793void    ?{}( const          void *          &, const          void * );
     794void    ?{}(       volatile void *          &,                void * );
     795void    ?{}(       volatile void *          &,       volatile void * );
     796void    ?{}( const volatile void *          &,                void * );
     797void    ?{}( const volatile void *          &, const          void * );
     798void    ?{}( const volatile void *          &,       volatile void * );
     799void    ?{}( const volatile void *          &, const volatile void * );
     800
     801//forall( dtype DT ) void ?{}(              DT *          &, zero_t );
     802//forall( dtype DT ) void ?{}(              DT * volatile &, zero_t );
     803forall( dtype DT ) void ?{}( const          DT *          &, zero_t );
     804//forall( dtype DT ) void ?{}( volatile     DT *          &, zero_t );
     805//forall( dtype DT ) void ?{}( volatile     DT * volatile &, zero_t );
     806forall( dtype DT ) void ?{}( const volatile DT *          &, zero_t );
     807
     808forall( ftype FT ) void ?{}( FT *          &, zero_t );
    809809
    810810// default ctors
    811 forall( ftype FT ) void ?{}( FT *          * );
    812 
    813 forall( dtype DT ) void ?{}(                 DT *          *);
    814 forall( dtype DT ) void ?{}( const           DT *          *);
    815 forall( dtype DT ) void ?{}(       volatile  DT *          *);
    816 forall( dtype DT ) void ?{}( const volatile  DT *          *);
    817 
    818 void    ?{}(                void *          *);
    819 void    ?{}( const          void *          *);
    820 void    ?{}(       volatile void *          *);
    821 void    ?{}( const volatile void *          *);
     811forall( ftype FT ) void ?{}( FT *          & );
     812
     813forall( dtype DT ) void ?{}(                 DT *          &);
     814forall( dtype DT ) void ?{}( const           DT *          &);
     815forall( dtype DT ) void ?{}(       volatile  DT *          &);
     816forall( dtype DT ) void ?{}( const volatile  DT *          &);
     817
     818void    ?{}(                void *          &);
     819void    ?{}( const          void *          &);
     820void    ?{}(       volatile void *          &);
     821void    ?{}( const volatile void *          &);
    822822
    823823// dtors
    824 forall( ftype FT ) void ^?{}( FT *         * );
    825 
    826 forall( dtype DT ) void ^?{}(                DT *          *);
    827 forall( dtype DT ) void ^?{}( const          DT *          *);
    828 forall( dtype DT ) void ^?{}(      volatile  DT *          *);
    829 forall( dtype DT ) void ^?{}( const volatile  DT *         *);
    830 
    831 void    ^?{}(               void *          *);
    832 void    ^?{}( const         void *          *);
    833 void    ^?{}(      volatile void *          *);
    834 void    ^?{}( const volatile void *         *);
     824forall( ftype FT ) void ^?{}( FT *         & );
     825
     826forall( dtype DT ) void ^?{}(                DT *          &);
     827forall( dtype DT ) void ^?{}( const          DT *          &);
     828forall( dtype DT ) void ^?{}(      volatile  DT *          &);
     829forall( dtype DT ) void ^?{}( const volatile  DT *         &);
     830
     831void    ^?{}(               void *          &);
     832void    ^?{}( const         void *          &);
     833void    ^?{}(      volatile void *          &);
     834void    ^?{}( const volatile void *         &);
    835835
    836836// Local Variables: //
  • src/tests/.expect/32/KRfunctions.txt

    raf08051 r28e58fd  
    1515}
    1616struct S {
    17 int __i__i_1;
     17    int __i__i_1;
    1818};
    19 static inline void ___constructor__F_P2sS_autogen___1(struct S *___dst__P2sS_1);
    20 static inline void ___constructor__F_P2sS2sS_autogen___1(struct S *___dst__P2sS_1, struct S ___src__2sS_1);
    21 static inline void ___destructor__F_P2sS_autogen___1(struct S *___dst__P2sS_1);
    22 static inline struct S ___operator_assign__F2sS_P2sS2sS_autogen___1(struct S *___dst__P2sS_1, struct S ___src__2sS_1);
    23 static inline void ___constructor__F_P2sS_autogen___1(struct S *___dst__P2sS_1){
    24     ((void)((*((int *)(&(*___dst__P2sS_1).__i__i_1)))) /* ?{} */);
     19static inline void ___constructor__F_R2sS_autogen___1(struct S *___dst__R2sS_1);
     20static inline void ___constructor__F_R2sS2sS_autogen___1(struct S *___dst__R2sS_1, struct S ___src__2sS_1);
     21static inline void ___destructor__F_R2sS_autogen___1(struct S *___dst__R2sS_1);
     22static inline struct S ___operator_assign__F2sS_R2sS2sS_autogen___1(struct S *___dst__R2sS_1, struct S ___src__2sS_1);
     23static inline void ___constructor__F_R2sS_autogen___1(struct S *___dst__R2sS_1){
     24    ((void)((*___dst__R2sS_1).__i__i_1) /* ?{} */);
    2525}
    26 static inline void ___constructor__F_P2sS2sS_autogen___1(struct S *___dst__P2sS_1, struct S ___src__2sS_1){
    27     ((void)((*((int *)(&(*___dst__P2sS_1).__i__i_1)))=___src__2sS_1.__i__i_1) /* ?{} */);
     26static inline void ___constructor__F_R2sS2sS_autogen___1(struct S *___dst__R2sS_1, struct S ___src__2sS_1){
     27    ((void)((*___dst__R2sS_1).__i__i_1=___src__2sS_1.__i__i_1) /* ?{} */);
    2828}
    29 static inline void ___destructor__F_P2sS_autogen___1(struct S *___dst__P2sS_1){
    30     ((void)((*((int *)(&(*___dst__P2sS_1).__i__i_1)))) /* ^?{} */);
     29static inline void ___destructor__F_R2sS_autogen___1(struct S *___dst__R2sS_1){
     30    ((void)((*___dst__R2sS_1).__i__i_1) /* ^?{} */);
    3131}
    32 static inline struct S ___operator_assign__F2sS_P2sS2sS_autogen___1(struct S *___dst__P2sS_1, struct S ___src__2sS_1){
     32static inline struct S ___operator_assign__F2sS_R2sS2sS_autogen___1(struct S *___dst__R2sS_1, struct S ___src__2sS_1){
    3333    struct S ___ret__2sS_1;
    34     ((void)((*___dst__P2sS_1).__i__i_1=___src__2sS_1.__i__i_1));
    35     ((void)___constructor__F_P2sS2sS_autogen___1((&___ret__2sS_1), ___src__2sS_1));
     34    ((void)((*___dst__R2sS_1).__i__i_1=___src__2sS_1.__i__i_1));
     35    ((void)___constructor__F_R2sS2sS_autogen___1((&___ret__2sS_1), ___src__2sS_1));
    3636    return ((struct S )___ret__2sS_1);
    3737}
    38 static inline void ___constructor__F_P2sSi_autogen___1(struct S *___dst__P2sS_1, int __i__i_1){
    39     ((void)((*((int *)(&(*___dst__P2sS_1).__i__i_1)))=__i__i_1) /* ?{} */);
     38static inline void ___constructor__F_R2sSi_autogen___1(struct S *___dst__R2sS_1, int __i__i_1){
     39    ((void)((*___dst__R2sS_1).__i__i_1=__i__i_1) /* ?{} */);
    4040}
    4141int __f3__Fi_2sS2sSPi__1(struct S __a__2sS_1, struct S __b__2sS_1, int *__c__Pi_1){
     
    8888    int __b__i_2;
    8989    int *(*_tmp_cp_ret0)(int __x__i_1, int __y__i_1);
    90     ((void)(__x__PFPi_ii__2=((_tmp_cp_ret0=__f10__FPFPi_ii__iPiPid__1(3, (&__a__i_2), (&__b__i_2), 3.5)) , _tmp_cp_ret0)));
    91     ((void)((*((int *(**)(int __x__i_1, int __y__i_1))(&_tmp_cp_ret0)))) /* ^?{} */);
     90    ((void)(__x__PFPi_ii__2=(((void)(_tmp_cp_ret0=__f10__FPFPi_ii__iPiPid__1(3, (&__a__i_2), (&__b__i_2), 3.5))) , _tmp_cp_ret0)));
     91    ((void)(_tmp_cp_ret0) /* ^?{} */);
    9292    const int __f1__FCi_iPiPi__2(int __a__i_2, int *__b__Pi_2, int *__c__Pi_2){
    9393        __attribute__ ((unused)) const int ___retval_f1__Ci_2;
  • src/tests/.expect/32/attributes.txt

    raf08051 r28e58fd  
    1111__attribute__ ((unused)) struct __anonymous0 {
    1212};
    13 static inline void ___constructor__F_P13s__anonymous0_autogen___1(struct __anonymous0 *___dst__P13s__anonymous0_1);
    14 static inline void ___constructor__F_P13s__anonymous013s__anonymous0_autogen___1(struct __anonymous0 *___dst__P13s__anonymous0_1, struct __anonymous0 ___src__13s__anonymous0_1);
    15 static inline void ___destructor__F_P13s__anonymous0_autogen___1(struct __anonymous0 *___dst__P13s__anonymous0_1);
    16 static inline struct __anonymous0 ___operator_assign__F13s__anonymous0_P13s__anonymous013s__anonymous0_autogen___1(struct __anonymous0 *___dst__P13s__anonymous0_1, struct __anonymous0 ___src__13s__anonymous0_1);
    17 static inline void ___constructor__F_P13s__anonymous0_autogen___1(struct __anonymous0 *___dst__P13s__anonymous0_1){
    18 }
    19 static inline void ___constructor__F_P13s__anonymous013s__anonymous0_autogen___1(struct __anonymous0 *___dst__P13s__anonymous0_1, struct __anonymous0 ___src__13s__anonymous0_1){
    20 }
    21 static inline void ___destructor__F_P13s__anonymous0_autogen___1(struct __anonymous0 *___dst__P13s__anonymous0_1){
    22 }
    23 static inline struct __anonymous0 ___operator_assign__F13s__anonymous0_P13s__anonymous013s__anonymous0_autogen___1(struct __anonymous0 *___dst__P13s__anonymous0_1, struct __anonymous0 ___src__13s__anonymous0_1){
     13static inline void ___constructor__F_R13s__anonymous0_autogen___1(struct __anonymous0 *___dst__R13s__anonymous0_1);
     14static inline void ___constructor__F_R13s__anonymous013s__anonymous0_autogen___1(struct __anonymous0 *___dst__R13s__anonymous0_1, struct __anonymous0 ___src__13s__anonymous0_1);
     15static inline void ___destructor__F_R13s__anonymous0_autogen___1(struct __anonymous0 *___dst__R13s__anonymous0_1);
     16static inline struct __anonymous0 ___operator_assign__F13s__anonymous0_R13s__anonymous013s__anonymous0_autogen___1(struct __anonymous0 *___dst__R13s__anonymous0_1, struct __anonymous0 ___src__13s__anonymous0_1);
     17static inline void ___constructor__F_R13s__anonymous0_autogen___1(struct __anonymous0 *___dst__R13s__anonymous0_1){
     18}
     19static inline void ___constructor__F_R13s__anonymous013s__anonymous0_autogen___1(struct __anonymous0 *___dst__R13s__anonymous0_1, struct __anonymous0 ___src__13s__anonymous0_1){
     20}
     21static inline void ___destructor__F_R13s__anonymous0_autogen___1(struct __anonymous0 *___dst__R13s__anonymous0_1){
     22}
     23static inline struct __anonymous0 ___operator_assign__F13s__anonymous0_R13s__anonymous013s__anonymous0_autogen___1(struct __anonymous0 *___dst__R13s__anonymous0_1, struct __anonymous0 ___src__13s__anonymous0_1){
    2424    struct __anonymous0 ___ret__13s__anonymous0_1;
    25     ((void)___constructor__F_P13s__anonymous013s__anonymous0_autogen___1((&___ret__13s__anonymous0_1), ___src__13s__anonymous0_1));
     25    ((void)___constructor__F_R13s__anonymous013s__anonymous0_autogen___1((&___ret__13s__anonymous0_1), ___src__13s__anonymous0_1));
    2626    return ((struct __anonymous0 )___ret__13s__anonymous0_1);
    2727}
     
    2929__attribute__ ((unused)) struct Agn2 {
    3030};
    31 static inline void ___constructor__F_P5sAgn2_autogen___1(struct Agn2 *___dst__P5sAgn2_1);
    32 static inline void ___constructor__F_P5sAgn25sAgn2_autogen___1(struct Agn2 *___dst__P5sAgn2_1, struct Agn2 ___src__5sAgn2_1);
    33 static inline void ___destructor__F_P5sAgn2_autogen___1(struct Agn2 *___dst__P5sAgn2_1);
    34 static inline struct Agn2 ___operator_assign__F5sAgn2_P5sAgn25sAgn2_autogen___1(struct Agn2 *___dst__P5sAgn2_1, struct Agn2 ___src__5sAgn2_1);
    35 static inline void ___constructor__F_P5sAgn2_autogen___1(struct Agn2 *___dst__P5sAgn2_1){
    36 }
    37 static inline void ___constructor__F_P5sAgn25sAgn2_autogen___1(struct Agn2 *___dst__P5sAgn2_1, struct Agn2 ___src__5sAgn2_1){
    38 }
    39 static inline void ___destructor__F_P5sAgn2_autogen___1(struct Agn2 *___dst__P5sAgn2_1){
    40 }
    41 static inline struct Agn2 ___operator_assign__F5sAgn2_P5sAgn25sAgn2_autogen___1(struct Agn2 *___dst__P5sAgn2_1, struct Agn2 ___src__5sAgn2_1){
     31static inline void ___constructor__F_R5sAgn2_autogen___1(struct Agn2 *___dst__R5sAgn2_1);
     32static inline void ___constructor__F_R5sAgn25sAgn2_autogen___1(struct Agn2 *___dst__R5sAgn2_1, struct Agn2 ___src__5sAgn2_1);
     33static inline void ___destructor__F_R5sAgn2_autogen___1(struct Agn2 *___dst__R5sAgn2_1);
     34static inline struct Agn2 ___operator_assign__F5sAgn2_R5sAgn25sAgn2_autogen___1(struct Agn2 *___dst__R5sAgn2_1, struct Agn2 ___src__5sAgn2_1);
     35static inline void ___constructor__F_R5sAgn2_autogen___1(struct Agn2 *___dst__R5sAgn2_1){
     36}
     37static inline void ___constructor__F_R5sAgn25sAgn2_autogen___1(struct Agn2 *___dst__R5sAgn2_1, struct Agn2 ___src__5sAgn2_1){
     38}
     39static inline void ___destructor__F_R5sAgn2_autogen___1(struct Agn2 *___dst__R5sAgn2_1){
     40}
     41static inline struct Agn2 ___operator_assign__F5sAgn2_R5sAgn25sAgn2_autogen___1(struct Agn2 *___dst__R5sAgn2_1, struct Agn2 ___src__5sAgn2_1){
    4242    struct Agn2 ___ret__5sAgn2_1;
    43     ((void)___constructor__F_P5sAgn25sAgn2_autogen___1((&___ret__5sAgn2_1), ___src__5sAgn2_1));
     43    ((void)___constructor__F_R5sAgn25sAgn2_autogen___1((&___ret__5sAgn2_1), ___src__5sAgn2_1));
    4444    return ((struct Agn2 )___ret__5sAgn2_1);
    4545}
     
    6565    __attribute__ ((unused,unused)) int *__f9__Pi_1;
    6666};
    67 static inline void ___constructor__F_P4sFdl_autogen___1(struct Fdl *___dst__P4sFdl_1);
    68 static inline void ___constructor__F_P4sFdl4sFdl_autogen___1(struct Fdl *___dst__P4sFdl_1, struct Fdl ___src__4sFdl_1);
    69 static inline void ___destructor__F_P4sFdl_autogen___1(struct Fdl *___dst__P4sFdl_1);
    70 static inline struct Fdl ___operator_assign__F4sFdl_P4sFdl4sFdl_autogen___1(struct Fdl *___dst__P4sFdl_1, struct Fdl ___src__4sFdl_1);
    71 static inline void ___constructor__F_P4sFdl_autogen___1(struct Fdl *___dst__P4sFdl_1){
    72     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f1__i_1)))) /* ?{} */);
    73     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f2__i_1)))) /* ?{} */);
    74     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f3__i_1)))) /* ?{} */);
    75     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f4__i_1)))) /* ?{} */);
    76     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f5__i_1)))) /* ?{} */);
    77     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f6__i_1)))) /* ?{} */);
    78     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f7__i_1)))) /* ?{} */);
    79     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f8__i_1)))) /* ?{} */);
    80     ((void)((*((int **)(&(*___dst__P4sFdl_1).__f9__Pi_1)))) /* ?{} */);
    81 }
    82 static inline void ___constructor__F_P4sFdl4sFdl_autogen___1(struct Fdl *___dst__P4sFdl_1, struct Fdl ___src__4sFdl_1){
    83     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f1__i_1)))=___src__4sFdl_1.__f1__i_1) /* ?{} */);
    84     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f2__i_1)))=___src__4sFdl_1.__f2__i_1) /* ?{} */);
    85     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f3__i_1)))=___src__4sFdl_1.__f3__i_1) /* ?{} */);
    86     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f4__i_1)))=___src__4sFdl_1.__f4__i_1) /* ?{} */);
    87     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f5__i_1)))=___src__4sFdl_1.__f5__i_1) /* ?{} */);
    88     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f6__i_1)))=___src__4sFdl_1.__f6__i_1) /* ?{} */);
    89     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f7__i_1)))=___src__4sFdl_1.__f7__i_1) /* ?{} */);
    90     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f8__i_1)))=___src__4sFdl_1.__f8__i_1) /* ?{} */);
    91     ((void)((*((int **)(&(*___dst__P4sFdl_1).__f9__Pi_1)))=___src__4sFdl_1.__f9__Pi_1) /* ?{} */);
    92 }
    93 static inline void ___destructor__F_P4sFdl_autogen___1(struct Fdl *___dst__P4sFdl_1){
    94     ((void)((*((int **)(&(*___dst__P4sFdl_1).__f9__Pi_1)))) /* ^?{} */);
    95     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f8__i_1)))) /* ^?{} */);
    96     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f7__i_1)))) /* ^?{} */);
    97     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f6__i_1)))) /* ^?{} */);
    98     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f5__i_1)))) /* ^?{} */);
    99     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f4__i_1)))) /* ^?{} */);
    100     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f3__i_1)))) /* ^?{} */);
    101     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f2__i_1)))) /* ^?{} */);
    102     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f1__i_1)))) /* ^?{} */);
    103 }
    104 static inline struct Fdl ___operator_assign__F4sFdl_P4sFdl4sFdl_autogen___1(struct Fdl *___dst__P4sFdl_1, struct Fdl ___src__4sFdl_1){
     67static inline void ___constructor__F_R4sFdl_autogen___1(struct Fdl *___dst__R4sFdl_1);
     68static inline void ___constructor__F_R4sFdl4sFdl_autogen___1(struct Fdl *___dst__R4sFdl_1, struct Fdl ___src__4sFdl_1);
     69static inline void ___destructor__F_R4sFdl_autogen___1(struct Fdl *___dst__R4sFdl_1);
     70static inline struct Fdl ___operator_assign__F4sFdl_R4sFdl4sFdl_autogen___1(struct Fdl *___dst__R4sFdl_1, struct Fdl ___src__4sFdl_1);
     71static inline void ___constructor__F_R4sFdl_autogen___1(struct Fdl *___dst__R4sFdl_1){
     72    ((void)((*___dst__R4sFdl_1).__f1__i_1) /* ?{} */);
     73    ((void)((*___dst__R4sFdl_1).__f2__i_1) /* ?{} */);
     74    ((void)((*___dst__R4sFdl_1).__f3__i_1) /* ?{} */);
     75    ((void)((*___dst__R4sFdl_1).__f4__i_1) /* ?{} */);
     76    ((void)((*___dst__R4sFdl_1).__f5__i_1) /* ?{} */);
     77    ((void)((*___dst__R4sFdl_1).__f6__i_1) /* ?{} */);
     78    ((void)((*___dst__R4sFdl_1).__f7__i_1) /* ?{} */);
     79    ((void)((*___dst__R4sFdl_1).__f8__i_1) /* ?{} */);
     80    ((void)((*___dst__R4sFdl_1).__f9__Pi_1) /* ?{} */);
     81}
     82static inline void ___constructor__F_R4sFdl4sFdl_autogen___1(struct Fdl *___dst__R4sFdl_1, struct Fdl ___src__4sFdl_1){
     83    ((void)((*___dst__R4sFdl_1).__f1__i_1=___src__4sFdl_1.__f1__i_1) /* ?{} */);
     84    ((void)((*___dst__R4sFdl_1).__f2__i_1=___src__4sFdl_1.__f2__i_1) /* ?{} */);
     85    ((void)((*___dst__R4sFdl_1).__f3__i_1=___src__4sFdl_1.__f3__i_1) /* ?{} */);
     86    ((void)((*___dst__R4sFdl_1).__f4__i_1=___src__4sFdl_1.__f4__i_1) /* ?{} */);
     87    ((void)((*___dst__R4sFdl_1).__f5__i_1=___src__4sFdl_1.__f5__i_1) /* ?{} */);
     88    ((void)((*___dst__R4sFdl_1).__f6__i_1=___src__4sFdl_1.__f6__i_1) /* ?{} */);
     89    ((void)((*___dst__R4sFdl_1).__f7__i_1=___src__4sFdl_1.__f7__i_1) /* ?{} */);
     90    ((void)((*___dst__R4sFdl_1).__f8__i_1=___src__4sFdl_1.__f8__i_1) /* ?{} */);
     91    ((void)((*___dst__R4sFdl_1).__f9__Pi_1=___src__4sFdl_1.__f9__Pi_1) /* ?{} */);
     92}
     93static inline void ___destructor__F_R4sFdl_autogen___1(struct Fdl *___dst__R4sFdl_1){
     94    ((void)((*___dst__R4sFdl_1).__f9__Pi_1) /* ^?{} */);
     95    ((void)((*___dst__R4sFdl_1).__f8__i_1) /* ^?{} */);
     96    ((void)((*___dst__R4sFdl_1).__f7__i_1) /* ^?{} */);
     97    ((void)((*___dst__R4sFdl_1).__f6__i_1) /* ^?{} */);
     98    ((void)((*___dst__R4sFdl_1).__f5__i_1) /* ^?{} */);
     99    ((void)((*___dst__R4sFdl_1).__f4__i_1) /* ^?{} */);
     100    ((void)((*___dst__R4sFdl_1).__f3__i_1) /* ^?{} */);
     101    ((void)((*___dst__R4sFdl_1).__f2__i_1) /* ^?{} */);
     102    ((void)((*___dst__R4sFdl_1).__f1__i_1) /* ^?{} */);
     103}
     104static inline struct Fdl ___operator_assign__F4sFdl_R4sFdl4sFdl_autogen___1(struct Fdl *___dst__R4sFdl_1, struct Fdl ___src__4sFdl_1){
    105105    struct Fdl ___ret__4sFdl_1;
    106     ((void)((*___dst__P4sFdl_1).__f1__i_1=___src__4sFdl_1.__f1__i_1));
    107     ((void)((*___dst__P4sFdl_1).__f2__i_1=___src__4sFdl_1.__f2__i_1));
    108     ((void)((*___dst__P4sFdl_1).__f3__i_1=___src__4sFdl_1.__f3__i_1));
    109     ((void)((*___dst__P4sFdl_1).__f4__i_1=___src__4sFdl_1.__f4__i_1));
    110     ((void)((*___dst__P4sFdl_1).__f5__i_1=___src__4sFdl_1.__f5__i_1));
    111     ((void)((*___dst__P4sFdl_1).__f6__i_1=___src__4sFdl_1.__f6__i_1));
    112     ((void)((*___dst__P4sFdl_1).__f7__i_1=___src__4sFdl_1.__f7__i_1));
    113     ((void)((*___dst__P4sFdl_1).__f8__i_1=___src__4sFdl_1.__f8__i_1));
    114     ((void)((*___dst__P4sFdl_1).__f9__Pi_1=___src__4sFdl_1.__f9__Pi_1));
    115     ((void)___constructor__F_P4sFdl4sFdl_autogen___1((&___ret__4sFdl_1), ___src__4sFdl_1));
     106    ((void)((*___dst__R4sFdl_1).__f1__i_1=___src__4sFdl_1.__f1__i_1));
     107    ((void)((*___dst__R4sFdl_1).__f2__i_1=___src__4sFdl_1.__f2__i_1));
     108    ((void)((*___dst__R4sFdl_1).__f3__i_1=___src__4sFdl_1.__f3__i_1));
     109    ((void)((*___dst__R4sFdl_1).__f4__i_1=___src__4sFdl_1.__f4__i_1));
     110    ((void)((*___dst__R4sFdl_1).__f5__i_1=___src__4sFdl_1.__f5__i_1));
     111    ((void)((*___dst__R4sFdl_1).__f6__i_1=___src__4sFdl_1.__f6__i_1));
     112    ((void)((*___dst__R4sFdl_1).__f7__i_1=___src__4sFdl_1.__f7__i_1));
     113    ((void)((*___dst__R4sFdl_1).__f8__i_1=___src__4sFdl_1.__f8__i_1));
     114    ((void)((*___dst__R4sFdl_1).__f9__Pi_1=___src__4sFdl_1.__f9__Pi_1));
     115    ((void)___constructor__F_R4sFdl4sFdl_autogen___1((&___ret__4sFdl_1), ___src__4sFdl_1));
    116116    return ((struct Fdl )___ret__4sFdl_1);
    117117}
    118 static inline void ___constructor__F_P4sFdli_autogen___1(struct Fdl *___dst__P4sFdl_1, int __f1__i_1){
    119     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f1__i_1)))=__f1__i_1) /* ?{} */);
    120     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f2__i_1)))) /* ?{} */);
    121     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f3__i_1)))) /* ?{} */);
    122     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f4__i_1)))) /* ?{} */);
    123     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f5__i_1)))) /* ?{} */);
    124     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f6__i_1)))) /* ?{} */);
    125     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f7__i_1)))) /* ?{} */);
    126     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f8__i_1)))) /* ?{} */);
    127     ((void)((*((int **)(&(*___dst__P4sFdl_1).__f9__Pi_1)))) /* ?{} */);
    128 }
    129 static inline void ___constructor__F_P4sFdlii_autogen___1(struct Fdl *___dst__P4sFdl_1, int __f1__i_1, int __f2__i_1){
    130     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f1__i_1)))=__f1__i_1) /* ?{} */);
    131     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f2__i_1)))=__f2__i_1) /* ?{} */);
    132     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f3__i_1)))) /* ?{} */);
    133     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f4__i_1)))) /* ?{} */);
    134     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f5__i_1)))) /* ?{} */);
    135     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f6__i_1)))) /* ?{} */);
    136     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f7__i_1)))) /* ?{} */);
    137     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f8__i_1)))) /* ?{} */);
    138     ((void)((*((int **)(&(*___dst__P4sFdl_1).__f9__Pi_1)))) /* ?{} */);
    139 }
    140 static inline void ___constructor__F_P4sFdliii_autogen___1(struct Fdl *___dst__P4sFdl_1, int __f1__i_1, int __f2__i_1, int __f3__i_1){
    141     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f1__i_1)))=__f1__i_1) /* ?{} */);
    142     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f2__i_1)))=__f2__i_1) /* ?{} */);
    143     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f3__i_1)))=__f3__i_1) /* ?{} */);
    144     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f4__i_1)))) /* ?{} */);
    145     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f5__i_1)))) /* ?{} */);
    146     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f6__i_1)))) /* ?{} */);
    147     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f7__i_1)))) /* ?{} */);
    148     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f8__i_1)))) /* ?{} */);
    149     ((void)((*((int **)(&(*___dst__P4sFdl_1).__f9__Pi_1)))) /* ?{} */);
    150 }
    151 static inline void ___constructor__F_P4sFdliiii_autogen___1(struct Fdl *___dst__P4sFdl_1, int __f1__i_1, int __f2__i_1, int __f3__i_1, int __f4__i_1){
    152     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f1__i_1)))=__f1__i_1) /* ?{} */);
    153     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f2__i_1)))=__f2__i_1) /* ?{} */);
    154     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f3__i_1)))=__f3__i_1) /* ?{} */);
    155     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f4__i_1)))=__f4__i_1) /* ?{} */);
    156     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f5__i_1)))) /* ?{} */);
    157     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f6__i_1)))) /* ?{} */);
    158     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f7__i_1)))) /* ?{} */);
    159     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f8__i_1)))) /* ?{} */);
    160     ((void)((*((int **)(&(*___dst__P4sFdl_1).__f9__Pi_1)))) /* ?{} */);
    161 }
    162 static inline void ___constructor__F_P4sFdliiiii_autogen___1(struct Fdl *___dst__P4sFdl_1, int __f1__i_1, int __f2__i_1, int __f3__i_1, int __f4__i_1, int __f5__i_1){
    163     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f1__i_1)))=__f1__i_1) /* ?{} */);
    164     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f2__i_1)))=__f2__i_1) /* ?{} */);
    165     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f3__i_1)))=__f3__i_1) /* ?{} */);
    166     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f4__i_1)))=__f4__i_1) /* ?{} */);
    167     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f5__i_1)))=__f5__i_1) /* ?{} */);
    168     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f6__i_1)))) /* ?{} */);
    169     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f7__i_1)))) /* ?{} */);
    170     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f8__i_1)))) /* ?{} */);
    171     ((void)((*((int **)(&(*___dst__P4sFdl_1).__f9__Pi_1)))) /* ?{} */);
    172 }
    173 static inline void ___constructor__F_P4sFdliiiiii_autogen___1(struct Fdl *___dst__P4sFdl_1, int __f1__i_1, int __f2__i_1, int __f3__i_1, int __f4__i_1, int __f5__i_1, int __f6__i_1){
    174     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f1__i_1)))=__f1__i_1) /* ?{} */);
    175     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f2__i_1)))=__f2__i_1) /* ?{} */);
    176     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f3__i_1)))=__f3__i_1) /* ?{} */);
    177     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f4__i_1)))=__f4__i_1) /* ?{} */);
    178     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f5__i_1)))=__f5__i_1) /* ?{} */);
    179     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f6__i_1)))=__f6__i_1) /* ?{} */);
    180     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f7__i_1)))) /* ?{} */);
    181     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f8__i_1)))) /* ?{} */);
    182     ((void)((*((int **)(&(*___dst__P4sFdl_1).__f9__Pi_1)))) /* ?{} */);
    183 }
    184 static inline void ___constructor__F_P4sFdliiiiiii_autogen___1(struct Fdl *___dst__P4sFdl_1, int __f1__i_1, int __f2__i_1, int __f3__i_1, int __f4__i_1, int __f5__i_1, int __f6__i_1, int __f7__i_1){
    185     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f1__i_1)))=__f1__i_1) /* ?{} */);
    186     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f2__i_1)))=__f2__i_1) /* ?{} */);
    187     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f3__i_1)))=__f3__i_1) /* ?{} */);
    188     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f4__i_1)))=__f4__i_1) /* ?{} */);
    189     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f5__i_1)))=__f5__i_1) /* ?{} */);
    190     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f6__i_1)))=__f6__i_1) /* ?{} */);
    191     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f7__i_1)))=__f7__i_1) /* ?{} */);
    192     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f8__i_1)))) /* ?{} */);
    193     ((void)((*((int **)(&(*___dst__P4sFdl_1).__f9__Pi_1)))) /* ?{} */);
    194 }
    195 static inline void ___constructor__F_P4sFdliiiiiiii_autogen___1(struct Fdl *___dst__P4sFdl_1, int __f1__i_1, int __f2__i_1, int __f3__i_1, int __f4__i_1, int __f5__i_1, int __f6__i_1, int __f7__i_1, int __f8__i_1){
    196     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f1__i_1)))=__f1__i_1) /* ?{} */);
    197     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f2__i_1)))=__f2__i_1) /* ?{} */);
    198     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f3__i_1)))=__f3__i_1) /* ?{} */);
    199     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f4__i_1)))=__f4__i_1) /* ?{} */);
    200     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f5__i_1)))=__f5__i_1) /* ?{} */);
    201     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f6__i_1)))=__f6__i_1) /* ?{} */);
    202     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f7__i_1)))=__f7__i_1) /* ?{} */);
    203     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f8__i_1)))=__f8__i_1) /* ?{} */);
    204     ((void)((*((int **)(&(*___dst__P4sFdl_1).__f9__Pi_1)))) /* ?{} */);
    205 }
    206 static inline void ___constructor__F_P4sFdliiiiiiiiPi_autogen___1(struct Fdl *___dst__P4sFdl_1, int __f1__i_1, int __f2__i_1, int __f3__i_1, int __f4__i_1, int __f5__i_1, int __f6__i_1, int __f7__i_1, int __f8__i_1, int *__f9__Pi_1){
    207     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f1__i_1)))=__f1__i_1) /* ?{} */);
    208     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f2__i_1)))=__f2__i_1) /* ?{} */);
    209     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f3__i_1)))=__f3__i_1) /* ?{} */);
    210     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f4__i_1)))=__f4__i_1) /* ?{} */);
    211     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f5__i_1)))=__f5__i_1) /* ?{} */);
    212     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f6__i_1)))=__f6__i_1) /* ?{} */);
    213     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f7__i_1)))=__f7__i_1) /* ?{} */);
    214     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f8__i_1)))=__f8__i_1) /* ?{} */);
    215     ((void)((*((int **)(&(*___dst__P4sFdl_1).__f9__Pi_1)))=__f9__Pi_1) /* ?{} */);
     118static inline void ___constructor__F_R4sFdli_autogen___1(struct Fdl *___dst__R4sFdl_1, int __f1__i_1){
     119    ((void)((*___dst__R4sFdl_1).__f1__i_1=__f1__i_1) /* ?{} */);
     120    ((void)((*___dst__R4sFdl_1).__f2__i_1) /* ?{} */);
     121    ((void)((*___dst__R4sFdl_1).__f3__i_1) /* ?{} */);
     122    ((void)((*___dst__R4sFdl_1).__f4__i_1) /* ?{} */);
     123    ((void)((*___dst__R4sFdl_1).__f5__i_1) /* ?{} */);
     124    ((void)((*___dst__R4sFdl_1).__f6__i_1) /* ?{} */);
     125    ((void)((*___dst__R4sFdl_1).__f7__i_1) /* ?{} */);
     126    ((void)((*___dst__R4sFdl_1).__f8__i_1) /* ?{} */);
     127    ((void)((*___dst__R4sFdl_1).__f9__Pi_1) /* ?{} */);
     128}
     129static inline void ___constructor__F_R4sFdlii_autogen___1(struct Fdl *___dst__R4sFdl_1, int __f1__i_1, int __f2__i_1){
     130    ((void)((*___dst__R4sFdl_1).__f1__i_1=__f1__i_1) /* ?{} */);
     131    ((void)((*___dst__R4sFdl_1).__f2__i_1=__f2__i_1) /* ?{} */);
     132    ((void)((*___dst__R4sFdl_1).__f3__i_1) /* ?{} */);
     133    ((void)((*___dst__R4sFdl_1).__f4__i_1) /* ?{} */);
     134    ((void)((*___dst__R4sFdl_1).__f5__i_1) /* ?{} */);
     135    ((void)((*___dst__R4sFdl_1).__f6__i_1) /* ?{} */);
     136    ((void)((*___dst__R4sFdl_1).__f7__i_1) /* ?{} */);
     137    ((void)((*___dst__R4sFdl_1).__f8__i_1) /* ?{} */);
     138    ((void)((*___dst__R4sFdl_1).__f9__Pi_1) /* ?{} */);
     139}
     140static inline void ___constructor__F_R4sFdliii_autogen___1(struct Fdl *___dst__R4sFdl_1, int __f1__i_1, int __f2__i_1, int __f3__i_1){
     141    ((void)((*___dst__R4sFdl_1).__f1__i_1=__f1__i_1) /* ?{} */);
     142    ((void)((*___dst__R4sFdl_1).__f2__i_1=__f2__i_1) /* ?{} */);
     143    ((void)((*___dst__R4sFdl_1).__f3__i_1=__f3__i_1) /* ?{} */);
     144    ((void)((*___dst__R4sFdl_1).__f4__i_1) /* ?{} */);
     145    ((void)((*___dst__R4sFdl_1).__f5__i_1) /* ?{} */);
     146    ((void)((*___dst__R4sFdl_1).__f6__i_1) /* ?{} */);
     147    ((void)((*___dst__R4sFdl_1).__f7__i_1) /* ?{} */);
     148    ((void)((*___dst__R4sFdl_1).__f8__i_1) /* ?{} */);
     149    ((void)((*___dst__R4sFdl_1).__f9__Pi_1) /* ?{} */);
     150}
     151static inline void ___constructor__F_R4sFdliiii_autogen___1(struct Fdl *___dst__R4sFdl_1, int __f1__i_1, int __f2__i_1, int __f3__i_1, int __f4__i_1){
     152    ((void)((*___dst__R4sFdl_1).__f1__i_1=__f1__i_1) /* ?{} */);
     153    ((void)((*___dst__R4sFdl_1).__f2__i_1=__f2__i_1) /* ?{} */);
     154    ((void)((*___dst__R4sFdl_1).__f3__i_1=__f3__i_1) /* ?{} */);
     155    ((void)((*___dst__R4sFdl_1).__f4__i_1=__f4__i_1) /* ?{} */);
     156    ((void)((*___dst__R4sFdl_1).__f5__i_1) /* ?{} */);
     157    ((void)((*___dst__R4sFdl_1).__f6__i_1) /* ?{} */);
     158    ((void)((*___dst__R4sFdl_1).__f7__i_1) /* ?{} */);
     159    ((void)((*___dst__R4sFdl_1).__f8__i_1) /* ?{} */);
     160    ((void)((*___dst__R4sFdl_1).__f9__Pi_1) /* ?{} */);
     161}
     162static inline void ___constructor__F_R4sFdliiiii_autogen___1(struct Fdl *___dst__R4sFdl_1, int __f1__i_1, int __f2__i_1, int __f3__i_1, int __f4__i_1, int __f5__i_1){
     163    ((void)((*___dst__R4sFdl_1).__f1__i_1=__f1__i_1) /* ?{} */);
     164    ((void)((*___dst__R4sFdl_1).__f2__i_1=__f2__i_1) /* ?{} */);
     165    ((void)((*___dst__R4sFdl_1).__f3__i_1=__f3__i_1) /* ?{} */);
     166    ((void)((*___dst__R4sFdl_1).__f4__i_1=__f4__i_1) /* ?{} */);
     167    ((void)((*___dst__R4sFdl_1).__f5__i_1=__f5__i_1) /* ?{} */);
     168    ((void)((*___dst__R4sFdl_1).__f6__i_1) /* ?{} */);
     169    ((void)((*___dst__R4sFdl_1).__f7__i_1) /* ?{} */);
     170    ((void)((*___dst__R4sFdl_1).__f8__i_1) /* ?{} */);
     171    ((void)((*___dst__R4sFdl_1).__f9__Pi_1) /* ?{} */);
     172}
     173static inline void ___constructor__F_R4sFdliiiiii_autogen___1(struct Fdl *___dst__R4sFdl_1, int __f1__i_1, int __f2__i_1, int __f3__i_1, int __f4__i_1, int __f5__i_1, int __f6__i_1){
     174    ((void)((*___dst__R4sFdl_1).__f1__i_1=__f1__i_1) /* ?{} */);
     175    ((void)((*___dst__R4sFdl_1).__f2__i_1=__f2__i_1) /* ?{} */);
     176    ((void)((*___dst__R4sFdl_1).__f3__i_1=__f3__i_1) /* ?{} */);
     177    ((void)((*___dst__R4sFdl_1).__f4__i_1=__f4__i_1) /* ?{} */);
     178    ((void)((*___dst__R4sFdl_1).__f5__i_1=__f5__i_1) /* ?{} */);
     179    ((void)((*___dst__R4sFdl_1).__f6__i_1=__f6__i_1) /* ?{} */);
     180    ((void)((*___dst__R4sFdl_1).__f7__i_1) /* ?{} */);
     181    ((void)((*___dst__R4sFdl_1).__f8__i_1) /* ?{} */);
     182    ((void)((*___dst__R4sFdl_1).__f9__Pi_1) /* ?{} */);
     183}
     184static inline void ___constructor__F_R4sFdliiiiiii_autogen___1(struct Fdl *___dst__R4sFdl_1, int __f1__i_1, int __f2__i_1, int __f3__i_1, int __f4__i_1, int __f5__i_1, int __f6__i_1, int __f7__i_1){
     185    ((void)((*___dst__R4sFdl_1).__f1__i_1=__f1__i_1) /* ?{} */);
     186    ((void)((*___dst__R4sFdl_1).__f2__i_1=__f2__i_1) /* ?{} */);
     187    ((void)((*___dst__R4sFdl_1).__f3__i_1=__f3__i_1) /* ?{} */);
     188    ((void)((*___dst__R4sFdl_1).__f4__i_1=__f4__i_1) /* ?{} */);
     189    ((void)((*___dst__R4sFdl_1).__f5__i_1=__f5__i_1) /* ?{} */);
     190    ((void)((*___dst__R4sFdl_1).__f6__i_1=__f6__i_1) /* ?{} */);
     191    ((void)((*___dst__R4sFdl_1).__f7__i_1=__f7__i_1) /* ?{} */);
     192    ((void)((*___dst__R4sFdl_1).__f8__i_1) /* ?{} */);
     193    ((void)((*___dst__R4sFdl_1).__f9__Pi_1) /* ?{} */);
     194}
     195static inline void ___constructor__F_R4sFdliiiiiiii_autogen___1(struct Fdl *___dst__R4sFdl_1, int __f1__i_1, int __f2__i_1, int __f3__i_1, int __f4__i_1, int __f5__i_1, int __f6__i_1, int __f7__i_1, int __f8__i_1){
     196    ((void)((*___dst__R4sFdl_1).__f1__i_1=__f1__i_1) /* ?{} */);
     197    ((void)((*___dst__R4sFdl_1).__f2__i_1=__f2__i_1) /* ?{} */);
     198    ((void)((*___dst__R4sFdl_1).__f3__i_1=__f3__i_1) /* ?{} */);
     199    ((void)((*___dst__R4sFdl_1).__f4__i_1=__f4__i_1) /* ?{} */);
     200    ((void)((*___dst__R4sFdl_1).__f5__i_1=__f5__i_1) /* ?{} */);
     201    ((void)((*___dst__R4sFdl_1).__f6__i_1=__f6__i_1) /* ?{} */);
     202    ((void)((*___dst__R4sFdl_1).__f7__i_1=__f7__i_1) /* ?{} */);
     203    ((void)((*___dst__R4sFdl_1).__f8__i_1=__f8__i_1) /* ?{} */);
     204    ((void)((*___dst__R4sFdl_1).__f9__Pi_1) /* ?{} */);
     205}
     206static inline void ___constructor__F_R4sFdliiiiiiiiPi_autogen___1(struct Fdl *___dst__R4sFdl_1, int __f1__i_1, int __f2__i_1, int __f3__i_1, int __f4__i_1, int __f5__i_1, int __f6__i_1, int __f7__i_1, int __f8__i_1, int *__f9__Pi_1){
     207    ((void)((*___dst__R4sFdl_1).__f1__i_1=__f1__i_1) /* ?{} */);
     208    ((void)((*___dst__R4sFdl_1).__f2__i_1=__f2__i_1) /* ?{} */);
     209    ((void)((*___dst__R4sFdl_1).__f3__i_1=__f3__i_1) /* ?{} */);
     210    ((void)((*___dst__R4sFdl_1).__f4__i_1=__f4__i_1) /* ?{} */);
     211    ((void)((*___dst__R4sFdl_1).__f5__i_1=__f5__i_1) /* ?{} */);
     212    ((void)((*___dst__R4sFdl_1).__f6__i_1=__f6__i_1) /* ?{} */);
     213    ((void)((*___dst__R4sFdl_1).__f7__i_1=__f7__i_1) /* ?{} */);
     214    ((void)((*___dst__R4sFdl_1).__f8__i_1=__f8__i_1) /* ?{} */);
     215    ((void)((*___dst__R4sFdl_1).__f9__Pi_1=__f9__Pi_1) /* ?{} */);
    216216}
    217217__attribute__ ((unused)) int __f__Fi___1() asm ( "xyz" );
     
    288288        int __i__i_2;
    289289    };
    290     inline void ___constructor__F_P13s__anonymous4_autogen___2(struct __anonymous4 *___dst__P13s__anonymous4_2){
    291         ((void)((*((int *)(&(*___dst__P13s__anonymous4_2).__i__i_2)))) /* ?{} */);
    292     }
    293     inline void ___constructor__F_P13s__anonymous413s__anonymous4_autogen___2(struct __anonymous4 *___dst__P13s__anonymous4_2, struct __anonymous4 ___src__13s__anonymous4_2){
    294         ((void)((*((int *)(&(*___dst__P13s__anonymous4_2).__i__i_2)))=___src__13s__anonymous4_2.__i__i_2) /* ?{} */);
    295     }
    296     inline void ___destructor__F_P13s__anonymous4_autogen___2(struct __anonymous4 *___dst__P13s__anonymous4_2){
    297         ((void)((*((int *)(&(*___dst__P13s__anonymous4_2).__i__i_2)))) /* ^?{} */);
    298     }
    299     inline struct __anonymous4 ___operator_assign__F13s__anonymous4_P13s__anonymous413s__anonymous4_autogen___2(struct __anonymous4 *___dst__P13s__anonymous4_2, struct __anonymous4 ___src__13s__anonymous4_2){
     290    inline void ___constructor__F_R13s__anonymous4_autogen___2(struct __anonymous4 *___dst__R13s__anonymous4_2){
     291        ((void)((*___dst__R13s__anonymous4_2).__i__i_2) /* ?{} */);
     292    }
     293    inline void ___constructor__F_R13s__anonymous413s__anonymous4_autogen___2(struct __anonymous4 *___dst__R13s__anonymous4_2, struct __anonymous4 ___src__13s__anonymous4_2){
     294        ((void)((*___dst__R13s__anonymous4_2).__i__i_2=___src__13s__anonymous4_2.__i__i_2) /* ?{} */);
     295    }
     296    inline void ___destructor__F_R13s__anonymous4_autogen___2(struct __anonymous4 *___dst__R13s__anonymous4_2){
     297        ((void)((*___dst__R13s__anonymous4_2).__i__i_2) /* ^?{} */);
     298    }
     299    inline struct __anonymous4 ___operator_assign__F13s__anonymous4_R13s__anonymous413s__anonymous4_autogen___2(struct __anonymous4 *___dst__R13s__anonymous4_2, struct __anonymous4 ___src__13s__anonymous4_2){
    300300        struct __anonymous4 ___ret__13s__anonymous4_2;
    301         ((void)((*___dst__P13s__anonymous4_2).__i__i_2=___src__13s__anonymous4_2.__i__i_2));
    302         ((void)___constructor__F_P13s__anonymous413s__anonymous4_autogen___2((&___ret__13s__anonymous4_2), ___src__13s__anonymous4_2));
     301        ((void)((*___dst__R13s__anonymous4_2).__i__i_2=___src__13s__anonymous4_2.__i__i_2));
     302        ((void)___constructor__F_R13s__anonymous413s__anonymous4_autogen___2((&___ret__13s__anonymous4_2), ___src__13s__anonymous4_2));
    303303        return ((struct __anonymous4 )___ret__13s__anonymous4_2);
    304304    }
    305     inline void ___constructor__F_P13s__anonymous4i_autogen___2(struct __anonymous4 *___dst__P13s__anonymous4_2, int __i__i_2){
    306         ((void)((*((int *)(&(*___dst__P13s__anonymous4_2).__i__i_2)))=__i__i_2) /* ?{} */);
     305    inline void ___constructor__F_R13s__anonymous4i_autogen___2(struct __anonymous4 *___dst__R13s__anonymous4_2, int __i__i_2){
     306        ((void)((*___dst__R13s__anonymous4_2).__i__i_2=__i__i_2) /* ?{} */);
    307307    }
    308308    ((void)sizeof(struct __anonymous4 ));
     
    310310        __R__C13e__anonymous5_2,
    311311    };
    312     inline void ___constructor__F_P13e__anonymous5_intrinsic___2(enum __anonymous5 *___dst__P13e__anonymous5_2){
    313     }
    314     inline void ___constructor__F_P13e__anonymous513e__anonymous5_intrinsic___2(enum __anonymous5 *___dst__P13e__anonymous5_2, enum __anonymous5 ___src__13e__anonymous5_2){
    315         ((void)((*___dst__P13e__anonymous5_2)=___src__13e__anonymous5_2));
    316     }
    317     inline void ___destructor__F_P13e__anonymous5_intrinsic___2(enum __anonymous5 *___dst__P13e__anonymous5_2){
    318     }
    319     inline enum __anonymous5 ___operator_assign__F13e__anonymous5_P13e__anonymous513e__anonymous5_intrinsic___2(enum __anonymous5 *___dst__P13e__anonymous5_2, enum __anonymous5 ___src__13e__anonymous5_2){
     312    inline void ___constructor__F_R13e__anonymous5_intrinsic___2(__attribute__ ((unused)) enum __anonymous5 *___dst__R13e__anonymous5_2){
     313    }
     314    inline void ___constructor__F_R13e__anonymous513e__anonymous5_intrinsic___2(enum __anonymous5 *___dst__R13e__anonymous5_2, enum __anonymous5 ___src__13e__anonymous5_2){
     315        ((void)((*___dst__R13e__anonymous5_2)=___src__13e__anonymous5_2));
     316    }
     317    inline void ___destructor__F_R13e__anonymous5_intrinsic___2(__attribute__ ((unused)) enum __anonymous5 *___dst__R13e__anonymous5_2){
     318    }
     319    inline enum __anonymous5 ___operator_assign__F13e__anonymous5_R13e__anonymous513e__anonymous5_intrinsic___2(enum __anonymous5 *___dst__R13e__anonymous5_2, enum __anonymous5 ___src__13e__anonymous5_2){
    320320        enum __anonymous5 ___ret__13e__anonymous5_2;
    321         ((void)(___ret__13e__anonymous5_2=((*___dst__P13e__anonymous5_2)=___src__13e__anonymous5_2)) /* ?{} */);
     321        ((void)(___ret__13e__anonymous5_2=((*___dst__R13e__anonymous5_2)=___src__13e__anonymous5_2)) /* ?{} */);
    322322        return ((enum __anonymous5 )___ret__13e__anonymous5_2);
    323323    }
     
    337337    __attribute__ ((unused,unused)) int (*__anonymous_object31)();
    338338};
    339 static inline void ___constructor__F_P4sVad_autogen___1(struct Vad *___dst__P4sVad_1);
    340 static inline void ___constructor__F_P4sVad4sVad_autogen___1(struct Vad *___dst__P4sVad_1, struct Vad ___src__4sVad_1);
    341 static inline void ___destructor__F_P4sVad_autogen___1(struct Vad *___dst__P4sVad_1);
    342 static inline struct Vad ___operator_assign__F4sVad_P4sVad4sVad_autogen___1(struct Vad *___dst__P4sVad_1, struct Vad ___src__4sVad_1);
    343 static inline void ___constructor__F_P4sVad_autogen___1(struct Vad *___dst__P4sVad_1){
    344 }
    345 static inline void ___constructor__F_P4sVad4sVad_autogen___1(struct Vad *___dst__P4sVad_1, struct Vad ___src__4sVad_1){
    346 }
    347 static inline void ___destructor__F_P4sVad_autogen___1(struct Vad *___dst__P4sVad_1){
    348 }
    349 static inline struct Vad ___operator_assign__F4sVad_P4sVad4sVad_autogen___1(struct Vad *___dst__P4sVad_1, struct Vad ___src__4sVad_1){
     339static inline void ___constructor__F_R4sVad_autogen___1(struct Vad *___dst__R4sVad_1);
     340static inline void ___constructor__F_R4sVad4sVad_autogen___1(struct Vad *___dst__R4sVad_1, struct Vad ___src__4sVad_1);
     341static inline void ___destructor__F_R4sVad_autogen___1(struct Vad *___dst__R4sVad_1);
     342static inline struct Vad ___operator_assign__F4sVad_R4sVad4sVad_autogen___1(struct Vad *___dst__R4sVad_1, struct Vad ___src__4sVad_1);
     343static inline void ___constructor__F_R4sVad_autogen___1(struct Vad *___dst__R4sVad_1){
     344}
     345static inline void ___constructor__F_R4sVad4sVad_autogen___1(struct Vad *___dst__R4sVad_1, struct Vad ___src__4sVad_1){
     346}
     347static inline void ___destructor__F_R4sVad_autogen___1(struct Vad *___dst__R4sVad_1){
     348}
     349static inline struct Vad ___operator_assign__F4sVad_R4sVad4sVad_autogen___1(struct Vad *___dst__R4sVad_1, struct Vad ___src__4sVad_1){
    350350    struct Vad ___ret__4sVad_1;
    351     ((void)___constructor__F_P4sVad4sVad_autogen___1((&___ret__4sVad_1), ___src__4sVad_1));
     351    ((void)___constructor__F_R4sVad4sVad_autogen___1((&___ret__4sVad_1), ___src__4sVad_1));
    352352    return ((struct Vad )___ret__4sVad_1);
    353353}
  • src/tests/.expect/32/declarationSpecifier.txt

    raf08051 r28e58fd  
    1616    int __i__i_1;
    1717};
    18 static inline void ___constructor__F_P13s__anonymous0_autogen___1(struct __anonymous0 *___dst__P13s__anonymous0_1);
    19 static inline void ___constructor__F_P13s__anonymous013s__anonymous0_autogen___1(struct __anonymous0 *___dst__P13s__anonymous0_1, struct __anonymous0 ___src__13s__anonymous0_1);
    20 static inline void ___destructor__F_P13s__anonymous0_autogen___1(struct __anonymous0 *___dst__P13s__anonymous0_1);
    21 static inline struct __anonymous0 ___operator_assign__F13s__anonymous0_P13s__anonymous013s__anonymous0_autogen___1(struct __anonymous0 *___dst__P13s__anonymous0_1, struct __anonymous0 ___src__13s__anonymous0_1);
    22 static inline void ___constructor__F_P13s__anonymous0_autogen___1(struct __anonymous0 *___dst__P13s__anonymous0_1){
    23     ((void)((*((int *)(&(*___dst__P13s__anonymous0_1).__i__i_1)))) /* ?{} */);
    24 }
    25 static inline void ___constructor__F_P13s__anonymous013s__anonymous0_autogen___1(struct __anonymous0 *___dst__P13s__anonymous0_1, struct __anonymous0 ___src__13s__anonymous0_1){
    26     ((void)((*((int *)(&(*___dst__P13s__anonymous0_1).__i__i_1)))=___src__13s__anonymous0_1.__i__i_1) /* ?{} */);
    27 }
    28 static inline void ___destructor__F_P13s__anonymous0_autogen___1(struct __anonymous0 *___dst__P13s__anonymous0_1){
    29     ((void)((*((int *)(&(*___dst__P13s__anonymous0_1).__i__i_1)))) /* ^?{} */);
    30 }
    31 static inline struct __anonymous0 ___operator_assign__F13s__anonymous0_P13s__anonymous013s__anonymous0_autogen___1(struct __anonymous0 *___dst__P13s__anonymous0_1, struct __anonymous0 ___src__13s__anonymous0_1){
     18static inline void ___constructor__F_R13s__anonymous0_autogen___1(struct __anonymous0 *___dst__R13s__anonymous0_1);
     19static inline void ___constructor__F_R13s__anonymous013s__anonymous0_autogen___1(struct __anonymous0 *___dst__R13s__anonymous0_1, struct __anonymous0 ___src__13s__anonymous0_1);
     20static inline void ___destructor__F_R13s__anonymous0_autogen___1(struct __anonymous0 *___dst__R13s__anonymous0_1);
     21static inline struct __anonymous0 ___operator_assign__F13s__anonymous0_R13s__anonymous013s__anonymous0_autogen___1(struct __anonymous0 *___dst__R13s__anonymous0_1, struct __anonymous0 ___src__13s__anonymous0_1);
     22static inline void ___constructor__F_R13s__anonymous0_autogen___1(struct __anonymous0 *___dst__R13s__anonymous0_1){
     23    ((void)((*___dst__R13s__anonymous0_1).__i__i_1) /* ?{} */);
     24}
     25static inline void ___constructor__F_R13s__anonymous013s__anonymous0_autogen___1(struct __anonymous0 *___dst__R13s__anonymous0_1, struct __anonymous0 ___src__13s__anonymous0_1){
     26    ((void)((*___dst__R13s__anonymous0_1).__i__i_1=___src__13s__anonymous0_1.__i__i_1) /* ?{} */);
     27}
     28static inline void ___destructor__F_R13s__anonymous0_autogen___1(struct __anonymous0 *___dst__R13s__anonymous0_1){
     29    ((void)((*___dst__R13s__anonymous0_1).__i__i_1) /* ^?{} */);
     30}
     31static inline struct __anonymous0 ___operator_assign__F13s__anonymous0_R13s__anonymous013s__anonymous0_autogen___1(struct __anonymous0 *___dst__R13s__anonymous0_1, struct __anonymous0 ___src__13s__anonymous0_1){
    3232    struct __anonymous0 ___ret__13s__anonymous0_1;
    33     ((void)((*___dst__P13s__anonymous0_1).__i__i_1=___src__13s__anonymous0_1.__i__i_1));
    34     ((void)___constructor__F_P13s__anonymous013s__anonymous0_autogen___1((&___ret__13s__anonymous0_1), ___src__13s__anonymous0_1));
     33    ((void)((*___dst__R13s__anonymous0_1).__i__i_1=___src__13s__anonymous0_1.__i__i_1));
     34    ((void)___constructor__F_R13s__anonymous013s__anonymous0_autogen___1((&___ret__13s__anonymous0_1), ___src__13s__anonymous0_1));
    3535    return ((struct __anonymous0 )___ret__13s__anonymous0_1);
    3636}
    37 static inline void ___constructor__F_P13s__anonymous0i_autogen___1(struct __anonymous0 *___dst__P13s__anonymous0_1, int __i__i_1){
    38     ((void)((*((int *)(&(*___dst__P13s__anonymous0_1).__i__i_1)))=__i__i_1) /* ?{} */);
     37static inline void ___constructor__F_R13s__anonymous0i_autogen___1(struct __anonymous0 *___dst__R13s__anonymous0_1, int __i__i_1){
     38    ((void)((*___dst__R13s__anonymous0_1).__i__i_1=__i__i_1) /* ?{} */);
    3939}
    4040volatile const struct __anonymous0 __x10__CV13s__anonymous0_1;
     
    4242    int __i__i_1;
    4343};
    44 static inline void ___constructor__F_P13s__anonymous1_autogen___1(struct __anonymous1 *___dst__P13s__anonymous1_1);
    45 static inline void ___constructor__F_P13s__anonymous113s__anonymous1_autogen___1(struct __anonymous1 *___dst__P13s__anonymous1_1, struct __anonymous1 ___src__13s__anonymous1_1);
    46 static inline void ___destructor__F_P13s__anonymous1_autogen___1(struct __anonymous1 *___dst__P13s__anonymous1_1);
    47 static inline struct __anonymous1 ___operator_assign__F13s__anonymous1_P13s__anonymous113s__anonymous1_autogen___1(struct __anonymous1 *___dst__P13s__anonymous1_1, struct __anonymous1 ___src__13s__anonymous1_1);
    48 static inline void ___constructor__F_P13s__anonymous1_autogen___1(struct __anonymous1 *___dst__P13s__anonymous1_1){
    49     ((void)((*((int *)(&(*___dst__P13s__anonymous1_1).__i__i_1)))) /* ?{} */);
    50 }
    51 static inline void ___constructor__F_P13s__anonymous113s__anonymous1_autogen___1(struct __anonymous1 *___dst__P13s__anonymous1_1, struct __anonymous1 ___src__13s__anonymous1_1){
    52     ((void)((*((int *)(&(*___dst__P13s__anonymous1_1).__i__i_1)))=___src__13s__anonymous1_1.__i__i_1) /* ?{} */);
    53 }
    54 static inline void ___destructor__F_P13s__anonymous1_autogen___1(struct __anonymous1 *___dst__P13s__anonymous1_1){
    55     ((void)((*((int *)(&(*___dst__P13s__anonymous1_1).__i__i_1)))) /* ^?{} */);
    56 }
    57 static inline struct __anonymous1 ___operator_assign__F13s__anonymous1_P13s__anonymous113s__anonymous1_autogen___1(struct __anonymous1 *___dst__P13s__anonymous1_1, struct __anonymous1 ___src__13s__anonymous1_1){
     44static inline void ___constructor__F_R13s__anonymous1_autogen___1(struct __anonymous1 *___dst__R13s__anonymous1_1);
     45static inline void ___constructor__F_R13s__anonymous113s__anonymous1_autogen___1(struct __anonymous1 *___dst__R13s__anonymous1_1, struct __anonymous1 ___src__13s__anonymous1_1);
     46static inline void ___destructor__F_R13s__anonymous1_autogen___1(struct __anonymous1 *___dst__R13s__anonymous1_1);
     47static inline struct __anonymous1 ___operator_assign__F13s__anonymous1_R13s__anonymous113s__anonymous1_autogen___1(struct __anonymous1 *___dst__R13s__anonymous1_1, struct __anonymous1 ___src__13s__anonymous1_1);
     48static inline void ___constructor__F_R13s__anonymous1_autogen___1(struct __anonymous1 *___dst__R13s__anonymous1_1){
     49    ((void)((*___dst__R13s__anonymous1_1).__i__i_1) /* ?{} */);
     50}
     51static inline void ___constructor__F_R13s__anonymous113s__anonymous1_autogen___1(struct __anonymous1 *___dst__R13s__anonymous1_1, struct __anonymous1 ___src__13s__anonymous1_1){
     52    ((void)((*___dst__R13s__anonymous1_1).__i__i_1=___src__13s__anonymous1_1.__i__i_1) /* ?{} */);
     53}
     54static inline void ___destructor__F_R13s__anonymous1_autogen___1(struct __anonymous1 *___dst__R13s__anonymous1_1){
     55    ((void)((*___dst__R13s__anonymous1_1).__i__i_1) /* ^?{} */);
     56}
     57static inline struct __anonymous1 ___operator_assign__F13s__anonymous1_R13s__anonymous113s__anonymous1_autogen___1(struct __anonymous1 *___dst__R13s__anonymous1_1, struct __anonymous1 ___src__13s__anonymous1_1){
    5858    struct __anonymous1 ___ret__13s__anonymous1_1;
    59     ((void)((*___dst__P13s__anonymous1_1).__i__i_1=___src__13s__anonymous1_1.__i__i_1));
    60     ((void)___constructor__F_P13s__anonymous113s__anonymous1_autogen___1((&___ret__13s__anonymous1_1), ___src__13s__anonymous1_1));
     59    ((void)((*___dst__R13s__anonymous1_1).__i__i_1=___src__13s__anonymous1_1.__i__i_1));
     60    ((void)___constructor__F_R13s__anonymous113s__anonymous1_autogen___1((&___ret__13s__anonymous1_1), ___src__13s__anonymous1_1));
    6161    return ((struct __anonymous1 )___ret__13s__anonymous1_1);
    6262}
    63 static inline void ___constructor__F_P13s__anonymous1i_autogen___1(struct __anonymous1 *___dst__P13s__anonymous1_1, int __i__i_1){
    64     ((void)((*((int *)(&(*___dst__P13s__anonymous1_1).__i__i_1)))=__i__i_1) /* ?{} */);
     63static inline void ___constructor__F_R13s__anonymous1i_autogen___1(struct __anonymous1 *___dst__R13s__anonymous1_1, int __i__i_1){
     64    ((void)((*___dst__R13s__anonymous1_1).__i__i_1=__i__i_1) /* ?{} */);
    6565}
    6666volatile const struct __anonymous1 __x11__CV13s__anonymous1_1;
     
    6868    int __i__i_1;
    6969};
    70 static inline void ___constructor__F_P13s__anonymous2_autogen___1(struct __anonymous2 *___dst__P13s__anonymous2_1);
    71 static inline void ___constructor__F_P13s__anonymous213s__anonymous2_autogen___1(struct __anonymous2 *___dst__P13s__anonymous2_1, struct __anonymous2 ___src__13s__anonymous2_1);
    72 static inline void ___destructor__F_P13s__anonymous2_autogen___1(struct __anonymous2 *___dst__P13s__anonymous2_1);
    73 static inline struct __anonymous2 ___operator_assign__F13s__anonymous2_P13s__anonymous213s__anonymous2_autogen___1(struct __anonymous2 *___dst__P13s__anonymous2_1, struct __anonymous2 ___src__13s__anonymous2_1);
    74 static inline void ___constructor__F_P13s__anonymous2_autogen___1(struct __anonymous2 *___dst__P13s__anonymous2_1){
    75     ((void)((*((int *)(&(*___dst__P13s__anonymous2_1).__i__i_1)))) /* ?{} */);
    76 }
    77 static inline void ___constructor__F_P13s__anonymous213s__anonymous2_autogen___1(struct __anonymous2 *___dst__P13s__anonymous2_1, struct __anonymous2 ___src__13s__anonymous2_1){
    78     ((void)((*((int *)(&(*___dst__P13s__anonymous2_1).__i__i_1)))=___src__13s__anonymous2_1.__i__i_1) /* ?{} */);
    79 }
    80 static inline void ___destructor__F_P13s__anonymous2_autogen___1(struct __anonymous2 *___dst__P13s__anonymous2_1){
    81     ((void)((*((int *)(&(*___dst__P13s__anonymous2_1).__i__i_1)))) /* ^?{} */);
    82 }
    83 static inline struct __anonymous2 ___operator_assign__F13s__anonymous2_P13s__anonymous213s__anonymous2_autogen___1(struct __anonymous2 *___dst__P13s__anonymous2_1, struct __anonymous2 ___src__13s__anonymous2_1){
     70static inline void ___constructor__F_R13s__anonymous2_autogen___1(struct __anonymous2 *___dst__R13s__anonymous2_1);
     71static inline void ___constructor__F_R13s__anonymous213s__anonymous2_autogen___1(struct __anonymous2 *___dst__R13s__anonymous2_1, struct __anonymous2 ___src__13s__anonymous2_1);
     72static inline void ___destructor__F_R13s__anonymous2_autogen___1(struct __anonymous2 *___dst__R13s__anonymous2_1);
     73static inline struct __anonymous2 ___operator_assign__F13s__anonymous2_R13s__anonymous213s__anonymous2_autogen___1(struct __anonymous2 *___dst__R13s__anonymous2_1, struct __anonymous2 ___src__13s__anonymous2_1);
     74static inline void ___constructor__F_R13s__anonymous2_autogen___1(struct __anonymous2 *___dst__R13s__anonymous2_1){
     75    ((void)((*___dst__R13s__anonymous2_1).__i__i_1) /* ?{} */);
     76}
     77static inline void ___constructor__F_R13s__anonymous213s__anonymous2_autogen___1(struct __anonymous2 *___dst__R13s__anonymous2_1, struct __anonymous2 ___src__13s__anonymous2_1){
     78    ((void)((*___dst__R13s__anonymous2_1).__i__i_1=___src__13s__anonymous2_1.__i__i_1) /* ?{} */);
     79}
     80static inline void ___destructor__F_R13s__anonymous2_autogen___1(struct __anonymous2 *___dst__R13s__anonymous2_1){
     81    ((void)((*___dst__R13s__anonymous2_1).__i__i_1) /* ^?{} */);
     82}
     83static inline struct __anonymous2 ___operator_assign__F13s__anonymous2_R13s__anonymous213s__anonymous2_autogen___1(struct __anonymous2 *___dst__R13s__anonymous2_1, struct __anonymous2 ___src__13s__anonymous2_1){
    8484    struct __anonymous2 ___ret__13s__anonymous2_1;
    85     ((void)((*___dst__P13s__anonymous2_1).__i__i_1=___src__13s__anonymous2_1.__i__i_1));
    86     ((void)___constructor__F_P13s__anonymous213s__anonymous2_autogen___1((&___ret__13s__anonymous2_1), ___src__13s__anonymous2_1));
     85    ((void)((*___dst__R13s__anonymous2_1).__i__i_1=___src__13s__anonymous2_1.__i__i_1));
     86    ((void)___constructor__F_R13s__anonymous213s__anonymous2_autogen___1((&___ret__13s__anonymous2_1), ___src__13s__anonymous2_1));
    8787    return ((struct __anonymous2 )___ret__13s__anonymous2_1);
    8888}
    89 static inline void ___constructor__F_P13s__anonymous2i_autogen___1(struct __anonymous2 *___dst__P13s__anonymous2_1, int __i__i_1){
    90     ((void)((*((int *)(&(*___dst__P13s__anonymous2_1).__i__i_1)))=__i__i_1) /* ?{} */);
     89static inline void ___constructor__F_R13s__anonymous2i_autogen___1(struct __anonymous2 *___dst__R13s__anonymous2_1, int __i__i_1){
     90    ((void)((*___dst__R13s__anonymous2_1).__i__i_1=__i__i_1) /* ?{} */);
    9191}
    9292volatile const struct __anonymous2 __x12__CV13s__anonymous2_1;
     
    9494    int __i__i_1;
    9595};
    96 static inline void ___constructor__F_P13s__anonymous3_autogen___1(struct __anonymous3 *___dst__P13s__anonymous3_1);
    97 static inline void ___constructor__F_P13s__anonymous313s__anonymous3_autogen___1(struct __anonymous3 *___dst__P13s__anonymous3_1, struct __anonymous3 ___src__13s__anonymous3_1);
    98 static inline void ___destructor__F_P13s__anonymous3_autogen___1(struct __anonymous3 *___dst__P13s__anonymous3_1);
    99 static inline struct __anonymous3 ___operator_assign__F13s__anonymous3_P13s__anonymous313s__anonymous3_autogen___1(struct __anonymous3 *___dst__P13s__anonymous3_1, struct __anonymous3 ___src__13s__anonymous3_1);
    100 static inline void ___constructor__F_P13s__anonymous3_autogen___1(struct __anonymous3 *___dst__P13s__anonymous3_1){
    101     ((void)((*((int *)(&(*___dst__P13s__anonymous3_1).__i__i_1)))) /* ?{} */);
    102 }
    103 static inline void ___constructor__F_P13s__anonymous313s__anonymous3_autogen___1(struct __anonymous3 *___dst__P13s__anonymous3_1, struct __anonymous3 ___src__13s__anonymous3_1){
    104     ((void)((*((int *)(&(*___dst__P13s__anonymous3_1).__i__i_1)))=___src__13s__anonymous3_1.__i__i_1) /* ?{} */);
    105 }
    106 static inline void ___destructor__F_P13s__anonymous3_autogen___1(struct __anonymous3 *___dst__P13s__anonymous3_1){
    107     ((void)((*((int *)(&(*___dst__P13s__anonymous3_1).__i__i_1)))) /* ^?{} */);
    108 }
    109 static inline struct __anonymous3 ___operator_assign__F13s__anonymous3_P13s__anonymous313s__anonymous3_autogen___1(struct __anonymous3 *___dst__P13s__anonymous3_1, struct __anonymous3 ___src__13s__anonymous3_1){
     96static inline void ___constructor__F_R13s__anonymous3_autogen___1(struct __anonymous3 *___dst__R13s__anonymous3_1);
     97static inline void ___constructor__F_R13s__anonymous313s__anonymous3_autogen___1(struct __anonymous3 *___dst__R13s__anonymous3_1, struct __anonymous3 ___src__13s__anonymous3_1);
     98static inline void ___destructor__F_R13s__anonymous3_autogen___1(struct __anonymous3 *___dst__R13s__anonymous3_1);
     99static inline struct __anonymous3 ___operator_assign__F13s__anonymous3_R13s__anonymous313s__anonymous3_autogen___1(struct __anonymous3 *___dst__R13s__anonymous3_1, struct __anonymous3 ___src__13s__anonymous3_1);
     100static inline void ___constructor__F_R13s__anonymous3_autogen___1(struct __anonymous3 *___dst__R13s__anonymous3_1){
     101    ((void)((*___dst__R13s__anonymous3_1).__i__i_1) /* ?{} */);
     102}
     103static inline void ___constructor__F_R13s__anonymous313s__anonymous3_autogen___1(struct __anonymous3 *___dst__R13s__anonymous3_1, struct __anonymous3 ___src__13s__anonymous3_1){
     104    ((void)((*___dst__R13s__anonymous3_1).__i__i_1=___src__13s__anonymous3_1.__i__i_1) /* ?{} */);
     105}
     106static inline void ___destructor__F_R13s__anonymous3_autogen___1(struct __anonymous3 *___dst__R13s__anonymous3_1){
     107    ((void)((*___dst__R13s__anonymous3_1).__i__i_1) /* ^?{} */);
     108}
     109static inline struct __anonymous3 ___operator_assign__F13s__anonymous3_R13s__anonymous313s__anonymous3_autogen___1(struct __anonymous3 *___dst__R13s__anonymous3_1, struct __anonymous3 ___src__13s__anonymous3_1){
    110110    struct __anonymous3 ___ret__13s__anonymous3_1;
    111     ((void)((*___dst__P13s__anonymous3_1).__i__i_1=___src__13s__anonymous3_1.__i__i_1));
    112     ((void)___constructor__F_P13s__anonymous313s__anonymous3_autogen___1((&___ret__13s__anonymous3_1), ___src__13s__anonymous3_1));
     111    ((void)((*___dst__R13s__anonymous3_1).__i__i_1=___src__13s__anonymous3_1.__i__i_1));
     112    ((void)___constructor__F_R13s__anonymous313s__anonymous3_autogen___1((&___ret__13s__anonymous3_1), ___src__13s__anonymous3_1));
    113113    return ((struct __anonymous3 )___ret__13s__anonymous3_1);
    114114}
    115 static inline void ___constructor__F_P13s__anonymous3i_autogen___1(struct __anonymous3 *___dst__P13s__anonymous3_1, int __i__i_1){
    116     ((void)((*((int *)(&(*___dst__P13s__anonymous3_1).__i__i_1)))=__i__i_1) /* ?{} */);
     115static inline void ___constructor__F_R13s__anonymous3i_autogen___1(struct __anonymous3 *___dst__R13s__anonymous3_1, int __i__i_1){
     116    ((void)((*___dst__R13s__anonymous3_1).__i__i_1=__i__i_1) /* ?{} */);
    117117}
    118118static volatile const struct __anonymous3 __x13__CV13s__anonymous3_1;
     
    120120    int __i__i_1;
    121121};
    122 static inline void ___constructor__F_P13s__anonymous4_autogen___1(struct __anonymous4 *___dst__P13s__anonymous4_1);
    123 static inline void ___constructor__F_P13s__anonymous413s__anonymous4_autogen___1(struct __anonymous4 *___dst__P13s__anonymous4_1, struct __anonymous4 ___src__13s__anonymous4_1);
    124 static inline void ___destructor__F_P13s__anonymous4_autogen___1(struct __anonymous4 *___dst__P13s__anonymous4_1);
    125 static inline struct __anonymous4 ___operator_assign__F13s__anonymous4_P13s__anonymous413s__anonymous4_autogen___1(struct __anonymous4 *___dst__P13s__anonymous4_1, struct __anonymous4 ___src__13s__anonymous4_1);
    126 static inline void ___constructor__F_P13s__anonymous4_autogen___1(struct __anonymous4 *___dst__P13s__anonymous4_1){
    127     ((void)((*((int *)(&(*___dst__P13s__anonymous4_1).__i__i_1)))) /* ?{} */);
    128 }
    129 static inline void ___constructor__F_P13s__anonymous413s__anonymous4_autogen___1(struct __anonymous4 *___dst__P13s__anonymous4_1, struct __anonymous4 ___src__13s__anonymous4_1){
    130     ((void)((*((int *)(&(*___dst__P13s__anonymous4_1).__i__i_1)))=___src__13s__anonymous4_1.__i__i_1) /* ?{} */);
    131 }
    132 static inline void ___destructor__F_P13s__anonymous4_autogen___1(struct __anonymous4 *___dst__P13s__anonymous4_1){
    133     ((void)((*((int *)(&(*___dst__P13s__anonymous4_1).__i__i_1)))) /* ^?{} */);
    134 }
    135 static inline struct __anonymous4 ___operator_assign__F13s__anonymous4_P13s__anonymous413s__anonymous4_autogen___1(struct __anonymous4 *___dst__P13s__anonymous4_1, struct __anonymous4 ___src__13s__anonymous4_1){
     122static inline void ___constructor__F_R13s__anonymous4_autogen___1(struct __anonymous4 *___dst__R13s__anonymous4_1);
     123static inline void ___constructor__F_R13s__anonymous413s__anonymous4_autogen___1(struct __anonymous4 *___dst__R13s__anonymous4_1, struct __anonymous4 ___src__13s__anonymous4_1);
     124static inline void ___destructor__F_R13s__anonymous4_autogen___1(struct __anonymous4 *___dst__R13s__anonymous4_1);
     125static inline struct __anonymous4 ___operator_assign__F13s__anonymous4_R13s__anonymous413s__anonymous4_autogen___1(struct __anonymous4 *___dst__R13s__anonymous4_1, struct __anonymous4 ___src__13s__anonymous4_1);
     126static inline void ___constructor__F_R13s__anonymous4_autogen___1(struct __anonymous4 *___dst__R13s__anonymous4_1){
     127    ((void)((*___dst__R13s__anonymous4_1).__i__i_1) /* ?{} */);
     128}
     129static inline void ___constructor__F_R13s__anonymous413s__anonymous4_autogen___1(struct __anonymous4 *___dst__R13s__anonymous4_1, struct __anonymous4 ___src__13s__anonymous4_1){
     130    ((void)((*___dst__R13s__anonymous4_1).__i__i_1=___src__13s__anonymous4_1.__i__i_1) /* ?{} */);
     131}
     132static inline void ___destructor__F_R13s__anonymous4_autogen___1(struct __anonymous4 *___dst__R13s__anonymous4_1){
     133    ((void)((*___dst__R13s__anonymous4_1).__i__i_1) /* ^?{} */);
     134}
     135static inline struct __anonymous4 ___operator_assign__F13s__anonymous4_R13s__anonymous413s__anonymous4_autogen___1(struct __anonymous4 *___dst__R13s__anonymous4_1, struct __anonymous4 ___src__13s__anonymous4_1){
    136136    struct __anonymous4 ___ret__13s__anonymous4_1;
    137     ((void)((*___dst__P13s__anonymous4_1).__i__i_1=___src__13s__anonymous4_1.__i__i_1));
    138     ((void)___constructor__F_P13s__anonymous413s__anonymous4_autogen___1((&___ret__13s__anonymous4_1), ___src__13s__anonymous4_1));
     137    ((void)((*___dst__R13s__anonymous4_1).__i__i_1=___src__13s__anonymous4_1.__i__i_1));
     138    ((void)___constructor__F_R13s__anonymous413s__anonymous4_autogen___1((&___ret__13s__anonymous4_1), ___src__13s__anonymous4_1));
    139139    return ((struct __anonymous4 )___ret__13s__anonymous4_1);
    140140}
    141 static inline void ___constructor__F_P13s__anonymous4i_autogen___1(struct __anonymous4 *___dst__P13s__anonymous4_1, int __i__i_1){
    142     ((void)((*((int *)(&(*___dst__P13s__anonymous4_1).__i__i_1)))=__i__i_1) /* ?{} */);
     141static inline void ___constructor__F_R13s__anonymous4i_autogen___1(struct __anonymous4 *___dst__R13s__anonymous4_1, int __i__i_1){
     142    ((void)((*___dst__R13s__anonymous4_1).__i__i_1=__i__i_1) /* ?{} */);
    143143}
    144144static volatile const struct __anonymous4 __x14__CV13s__anonymous4_1;
     
    146146    int __i__i_1;
    147147};
    148 static inline void ___constructor__F_P13s__anonymous5_autogen___1(struct __anonymous5 *___dst__P13s__anonymous5_1);
    149 static inline void ___constructor__F_P13s__anonymous513s__anonymous5_autogen___1(struct __anonymous5 *___dst__P13s__anonymous5_1, struct __anonymous5 ___src__13s__anonymous5_1);
    150 static inline void ___destructor__F_P13s__anonymous5_autogen___1(struct __anonymous5 *___dst__P13s__anonymous5_1);
    151 static inline struct __anonymous5 ___operator_assign__F13s__anonymous5_P13s__anonymous513s__anonymous5_autogen___1(struct __anonymous5 *___dst__P13s__anonymous5_1, struct __anonymous5 ___src__13s__anonymous5_1);
    152 static inline void ___constructor__F_P13s__anonymous5_autogen___1(struct __anonymous5 *___dst__P13s__anonymous5_1){
    153     ((void)((*((int *)(&(*___dst__P13s__anonymous5_1).__i__i_1)))) /* ?{} */);
    154 }
    155 static inline void ___constructor__F_P13s__anonymous513s__anonymous5_autogen___1(struct __anonymous5 *___dst__P13s__anonymous5_1, struct __anonymous5 ___src__13s__anonymous5_1){
    156     ((void)((*((int *)(&(*___dst__P13s__anonymous5_1).__i__i_1)))=___src__13s__anonymous5_1.__i__i_1) /* ?{} */);
    157 }
    158 static inline void ___destructor__F_P13s__anonymous5_autogen___1(struct __anonymous5 *___dst__P13s__anonymous5_1){
    159     ((void)((*((int *)(&(*___dst__P13s__anonymous5_1).__i__i_1)))) /* ^?{} */);
    160 }
    161 static inline struct __anonymous5 ___operator_assign__F13s__anonymous5_P13s__anonymous513s__anonymous5_autogen___1(struct __anonymous5 *___dst__P13s__anonymous5_1, struct __anonymous5 ___src__13s__anonymous5_1){
     148static inline void ___constructor__F_R13s__anonymous5_autogen___1(struct __anonymous5 *___dst__R13s__anonymous5_1);
     149static inline void ___constructor__F_R13s__anonymous513s__anonymous5_autogen___1(struct __anonymous5 *___dst__R13s__anonymous5_1, struct __anonymous5 ___src__13s__anonymous5_1);
     150static inline void ___destructor__F_R13s__anonymous5_autogen___1(struct __anonymous5 *___dst__R13s__anonymous5_1);
     151static inline struct __anonymous5 ___operator_assign__F13s__anonymous5_R13s__anonymous513s__anonymous5_autogen___1(struct __anonymous5 *___dst__R13s__anonymous5_1, struct __anonymous5 ___src__13s__anonymous5_1);
     152static inline void ___constructor__F_R13s__anonymous5_autogen___1(struct __anonymous5 *___dst__R13s__anonymous5_1){
     153    ((void)((*___dst__R13s__anonymous5_1).__i__i_1) /* ?{} */);
     154}
     155static inline void ___constructor__F_R13s__anonymous513s__anonymous5_autogen___1(struct __anonymous5 *___dst__R13s__anonymous5_1, struct __anonymous5 ___src__13s__anonymous5_1){
     156    ((void)((*___dst__R13s__anonymous5_1).__i__i_1=___src__13s__anonymous5_1.__i__i_1) /* ?{} */);
     157}
     158static inline void ___destructor__F_R13s__anonymous5_autogen___1(struct __anonymous5 *___dst__R13s__anonymous5_1){
     159    ((void)((*___dst__R13s__anonymous5_1).__i__i_1) /* ^?{} */);
     160}
     161static inline struct __anonymous5 ___operator_assign__F13s__anonymous5_R13s__anonymous513s__anonymous5_autogen___1(struct __anonymous5 *___dst__R13s__anonymous5_1, struct __anonymous5 ___src__13s__anonymous5_1){
    162162    struct __anonymous5 ___ret__13s__anonymous5_1;
    163     ((void)((*___dst__P13s__anonymous5_1).__i__i_1=___src__13s__anonymous5_1.__i__i_1));
    164     ((void)___constructor__F_P13s__anonymous513s__anonymous5_autogen___1((&___ret__13s__anonymous5_1), ___src__13s__anonymous5_1));
     163    ((void)((*___dst__R13s__anonymous5_1).__i__i_1=___src__13s__anonymous5_1.__i__i_1));
     164    ((void)___constructor__F_R13s__anonymous513s__anonymous5_autogen___1((&___ret__13s__anonymous5_1), ___src__13s__anonymous5_1));
    165165    return ((struct __anonymous5 )___ret__13s__anonymous5_1);
    166166}
    167 static inline void ___constructor__F_P13s__anonymous5i_autogen___1(struct __anonymous5 *___dst__P13s__anonymous5_1, int __i__i_1){
    168     ((void)((*((int *)(&(*___dst__P13s__anonymous5_1).__i__i_1)))=__i__i_1) /* ?{} */);
     167static inline void ___constructor__F_R13s__anonymous5i_autogen___1(struct __anonymous5 *___dst__R13s__anonymous5_1, int __i__i_1){
     168    ((void)((*___dst__R13s__anonymous5_1).__i__i_1=__i__i_1) /* ?{} */);
    169169}
    170170static volatile const struct __anonymous5 __x15__CV13s__anonymous5_1;
     
    172172    int __i__i_1;
    173173};
    174 static inline void ___constructor__F_P13s__anonymous6_autogen___1(struct __anonymous6 *___dst__P13s__anonymous6_1);
    175 static inline void ___constructor__F_P13s__anonymous613s__anonymous6_autogen___1(struct __anonymous6 *___dst__P13s__anonymous6_1, struct __anonymous6 ___src__13s__anonymous6_1);
    176 static inline void ___destructor__F_P13s__anonymous6_autogen___1(struct __anonymous6 *___dst__P13s__anonymous6_1);
    177 static inline struct __anonymous6 ___operator_assign__F13s__anonymous6_P13s__anonymous613s__anonymous6_autogen___1(struct __anonymous6 *___dst__P13s__anonymous6_1, struct __anonymous6 ___src__13s__anonymous6_1);
    178 static inline void ___constructor__F_P13s__anonymous6_autogen___1(struct __anonymous6 *___dst__P13s__anonymous6_1){
    179     ((void)((*((int *)(&(*___dst__P13s__anonymous6_1).__i__i_1)))) /* ?{} */);
    180 }
    181 static inline void ___constructor__F_P13s__anonymous613s__anonymous6_autogen___1(struct __anonymous6 *___dst__P13s__anonymous6_1, struct __anonymous6 ___src__13s__anonymous6_1){
    182     ((void)((*((int *)(&(*___dst__P13s__anonymous6_1).__i__i_1)))=___src__13s__anonymous6_1.__i__i_1) /* ?{} */);
    183 }
    184 static inline void ___destructor__F_P13s__anonymous6_autogen___1(struct __anonymous6 *___dst__P13s__anonymous6_1){
    185     ((void)((*((int *)(&(*___dst__P13s__anonymous6_1).__i__i_1)))) /* ^?{} */);
    186 }
    187 static inline struct __anonymous6 ___operator_assign__F13s__anonymous6_P13s__anonymous613s__anonymous6_autogen___1(struct __anonymous6 *___dst__P13s__anonymous6_1, struct __anonymous6 ___src__13s__anonymous6_1){
     174static inline void ___constructor__F_R13s__anonymous6_autogen___1(struct __anonymous6 *___dst__R13s__anonymous6_1);
     175static inline void ___constructor__F_R13s__anonymous613s__anonymous6_autogen___1(struct __anonymous6 *___dst__R13s__anonymous6_1, struct __anonymous6 ___src__13s__anonymous6_1);
     176static inline void ___destructor__F_R13s__anonymous6_autogen___1(struct __anonymous6 *___dst__R13s__anonymous6_1);
     177static inline struct __anonymous6 ___operator_assign__F13s__anonymous6_R13s__anonymous613s__anonymous6_autogen___1(struct __anonymous6 *___dst__R13s__anonymous6_1, struct __anonymous6 ___src__13s__anonymous6_1);
     178static inline void ___constructor__F_R13s__anonymous6_autogen___1(struct __anonymous6 *___dst__R13s__anonymous6_1){
     179    ((void)((*___dst__R13s__anonymous6_1).__i__i_1) /* ?{} */);
     180}
     181static inline void ___constructor__F_R13s__anonymous613s__anonymous6_autogen___1(struct __anonymous6 *___dst__R13s__anonymous6_1, struct __anonymous6 ___src__13s__anonymous6_1){
     182    ((void)((*___dst__R13s__anonymous6_1).__i__i_1=___src__13s__anonymous6_1.__i__i_1) /* ?{} */);
     183}
     184static inline void ___destructor__F_R13s__anonymous6_autogen___1(struct __anonymous6 *___dst__R13s__anonymous6_1){
     185    ((void)((*___dst__R13s__anonymous6_1).__i__i_1) /* ^?{} */);
     186}
     187static inline struct __anonymous6 ___operator_assign__F13s__anonymous6_R13s__anonymous613s__anonymous6_autogen___1(struct __anonymous6 *___dst__R13s__anonymous6_1, struct __anonymous6 ___src__13s__anonymous6_1){
    188188    struct __anonymous6 ___ret__13s__anonymous6_1;
    189     ((void)((*___dst__P13s__anonymous6_1).__i__i_1=___src__13s__anonymous6_1.__i__i_1));
    190     ((void)___constructor__F_P13s__anonymous613s__anonymous6_autogen___1((&___ret__13s__anonymous6_1), ___src__13s__anonymous6_1));
     189    ((void)((*___dst__R13s__anonymous6_1).__i__i_1=___src__13s__anonymous6_1.__i__i_1));
     190    ((void)___constructor__F_R13s__anonymous613s__anonymous6_autogen___1((&___ret__13s__anonymous6_1), ___src__13s__anonymous6_1));
    191191    return ((struct __anonymous6 )___ret__13s__anonymous6_1);
    192192}
    193 static inline void ___constructor__F_P13s__anonymous6i_autogen___1(struct __anonymous6 *___dst__P13s__anonymous6_1, int __i__i_1){
    194     ((void)((*((int *)(&(*___dst__P13s__anonymous6_1).__i__i_1)))=__i__i_1) /* ?{} */);
     193static inline void ___constructor__F_R13s__anonymous6i_autogen___1(struct __anonymous6 *___dst__R13s__anonymous6_1, int __i__i_1){
     194    ((void)((*___dst__R13s__anonymous6_1).__i__i_1=__i__i_1) /* ?{} */);
    195195}
    196196static volatile const struct __anonymous6 __x16__CV13s__anonymous6_1;
     
    198198    int __i__i_1;
    199199};
    200 static inline void ___constructor__F_P13s__anonymous7_autogen___1(struct __anonymous7 *___dst__P13s__anonymous7_1);
    201 static inline void ___constructor__F_P13s__anonymous713s__anonymous7_autogen___1(struct __anonymous7 *___dst__P13s__anonymous7_1, struct __anonymous7 ___src__13s__anonymous7_1);
    202 static inline void ___destructor__F_P13s__anonymous7_autogen___1(struct __anonymous7 *___dst__P13s__anonymous7_1);
    203 static inline struct __anonymous7 ___operator_assign__F13s__anonymous7_P13s__anonymous713s__anonymous7_autogen___1(struct __anonymous7 *___dst__P13s__anonymous7_1, struct __anonymous7 ___src__13s__anonymous7_1);
    204 static inline void ___constructor__F_P13s__anonymous7_autogen___1(struct __anonymous7 *___dst__P13s__anonymous7_1){
    205     ((void)((*((int *)(&(*___dst__P13s__anonymous7_1).__i__i_1)))) /* ?{} */);
    206 }
    207 static inline void ___constructor__F_P13s__anonymous713s__anonymous7_autogen___1(struct __anonymous7 *___dst__P13s__anonymous7_1, struct __anonymous7 ___src__13s__anonymous7_1){
    208     ((void)((*((int *)(&(*___dst__P13s__anonymous7_1).__i__i_1)))=___src__13s__anonymous7_1.__i__i_1) /* ?{} */);
    209 }
    210 static inline void ___destructor__F_P13s__anonymous7_autogen___1(struct __anonymous7 *___dst__P13s__anonymous7_1){
    211     ((void)((*((int *)(&(*___dst__P13s__anonymous7_1).__i__i_1)))) /* ^?{} */);
    212 }
    213 static inline struct __anonymous7 ___operator_assign__F13s__anonymous7_P13s__anonymous713s__anonymous7_autogen___1(struct __anonymous7 *___dst__P13s__anonymous7_1, struct __anonymous7 ___src__13s__anonymous7_1){
     200static inline void ___constructor__F_R13s__anonymous7_autogen___1(struct __anonymous7 *___dst__R13s__anonymous7_1);
     201static inline void ___constructor__F_R13s__anonymous713s__anonymous7_autogen___1(struct __anonymous7 *___dst__R13s__anonymous7_1, struct __anonymous7 ___src__13s__anonymous7_1);
     202static inline void ___destructor__F_R13s__anonymous7_autogen___1(struct __anonymous7 *___dst__R13s__anonymous7_1);
     203static inline struct __anonymous7 ___operator_assign__F13s__anonymous7_R13s__anonymous713s__anonymous7_autogen___1(struct __anonymous7 *___dst__R13s__anonymous7_1, struct __anonymous7 ___src__13s__anonymous7_1);
     204static inline void ___constructor__F_R13s__anonymous7_autogen___1(struct __anonymous7 *___dst__R13s__anonymous7_1){
     205    ((void)((*___dst__R13s__anonymous7_1).__i__i_1) /* ?{} */);
     206}
     207static inline void ___constructor__F_R13s__anonymous713s__anonymous7_autogen___1(struct __anonymous7 *___dst__R13s__anonymous7_1, struct __anonymous7 ___src__13s__anonymous7_1){
     208    ((void)((*___dst__R13s__anonymous7_1).__i__i_1=___src__13s__anonymous7_1.__i__i_1) /* ?{} */);
     209}
     210static inline void ___destructor__F_R13s__anonymous7_autogen___1(struct __anonymous7 *___dst__R13s__anonymous7_1){
     211    ((void)((*___dst__R13s__anonymous7_1).__i__i_1) /* ^?{} */);
     212}
     213static inline struct __anonymous7 ___operator_assign__F13s__anonymous7_R13s__anonymous713s__anonymous7_autogen___1(struct __anonymous7 *___dst__R13s__anonymous7_1, struct __anonymous7 ___src__13s__anonymous7_1){
    214214    struct __anonymous7 ___ret__13s__anonymous7_1;
    215     ((void)((*___dst__P13s__anonymous7_1).__i__i_1=___src__13s__anonymous7_1.__i__i_1));
    216     ((void)___constructor__F_P13s__anonymous713s__anonymous7_autogen___1((&___ret__13s__anonymous7_1), ___src__13s__anonymous7_1));
     215    ((void)((*___dst__R13s__anonymous7_1).__i__i_1=___src__13s__anonymous7_1.__i__i_1));
     216    ((void)___constructor__F_R13s__anonymous713s__anonymous7_autogen___1((&___ret__13s__anonymous7_1), ___src__13s__anonymous7_1));
    217217    return ((struct __anonymous7 )___ret__13s__anonymous7_1);
    218218}
    219 static inline void ___constructor__F_P13s__anonymous7i_autogen___1(struct __anonymous7 *___dst__P13s__anonymous7_1, int __i__i_1){
    220     ((void)((*((int *)(&(*___dst__P13s__anonymous7_1).__i__i_1)))=__i__i_1) /* ?{} */);
     219static inline void ___constructor__F_R13s__anonymous7i_autogen___1(struct __anonymous7 *___dst__R13s__anonymous7_1, int __i__i_1){
     220    ((void)((*___dst__R13s__anonymous7_1).__i__i_1=__i__i_1) /* ?{} */);
    221221}
    222222static volatile const struct __anonymous7 __x17__CV13s__anonymous7_1;
     
    232232    short __i__s_1;
    233233};
    234 static inline void ___constructor__F_P13s__anonymous8_autogen___1(struct __anonymous8 *___dst__P13s__anonymous8_1);
    235 static inline void ___constructor__F_P13s__anonymous813s__anonymous8_autogen___1(struct __anonymous8 *___dst__P13s__anonymous8_1, struct __anonymous8 ___src__13s__anonymous8_1);
    236 static inline void ___destructor__F_P13s__anonymous8_autogen___1(struct __anonymous8 *___dst__P13s__anonymous8_1);
    237 static inline struct __anonymous8 ___operator_assign__F13s__anonymous8_P13s__anonymous813s__anonymous8_autogen___1(struct __anonymous8 *___dst__P13s__anonymous8_1, struct __anonymous8 ___src__13s__anonymous8_1);
    238 static inline void ___constructor__F_P13s__anonymous8_autogen___1(struct __anonymous8 *___dst__P13s__anonymous8_1){
    239     ((void)((*((short *)(&(*___dst__P13s__anonymous8_1).__i__s_1)))) /* ?{} */);
    240 }
    241 static inline void ___constructor__F_P13s__anonymous813s__anonymous8_autogen___1(struct __anonymous8 *___dst__P13s__anonymous8_1, struct __anonymous8 ___src__13s__anonymous8_1){
    242     ((void)((*((short *)(&(*___dst__P13s__anonymous8_1).__i__s_1)))=___src__13s__anonymous8_1.__i__s_1) /* ?{} */);
    243 }
    244 static inline void ___destructor__F_P13s__anonymous8_autogen___1(struct __anonymous8 *___dst__P13s__anonymous8_1){
    245     ((void)((*((short *)(&(*___dst__P13s__anonymous8_1).__i__s_1)))) /* ^?{} */);
    246 }
    247 static inline struct __anonymous8 ___operator_assign__F13s__anonymous8_P13s__anonymous813s__anonymous8_autogen___1(struct __anonymous8 *___dst__P13s__anonymous8_1, struct __anonymous8 ___src__13s__anonymous8_1){
     234static inline void ___constructor__F_R13s__anonymous8_autogen___1(struct __anonymous8 *___dst__R13s__anonymous8_1);
     235static inline void ___constructor__F_R13s__anonymous813s__anonymous8_autogen___1(struct __anonymous8 *___dst__R13s__anonymous8_1, struct __anonymous8 ___src__13s__anonymous8_1);
     236static inline void ___destructor__F_R13s__anonymous8_autogen___1(struct __anonymous8 *___dst__R13s__anonymous8_1);
     237static inline struct __anonymous8 ___operator_assign__F13s__anonymous8_R13s__anonymous813s__anonymous8_autogen___1(struct __anonymous8 *___dst__R13s__anonymous8_1, struct __anonymous8 ___src__13s__anonymous8_1);
     238static inline void ___constructor__F_R13s__anonymous8_autogen___1(struct __anonymous8 *___dst__R13s__anonymous8_1){
     239    ((void)((*___dst__R13s__anonymous8_1).__i__s_1) /* ?{} */);
     240}
     241static inline void ___constructor__F_R13s__anonymous813s__anonymous8_autogen___1(struct __anonymous8 *___dst__R13s__anonymous8_1, struct __anonymous8 ___src__13s__anonymous8_1){
     242    ((void)((*___dst__R13s__anonymous8_1).__i__s_1=___src__13s__anonymous8_1.__i__s_1) /* ?{} */);
     243}
     244static inline void ___destructor__F_R13s__anonymous8_autogen___1(struct __anonymous8 *___dst__R13s__anonymous8_1){
     245    ((void)((*___dst__R13s__anonymous8_1).__i__s_1) /* ^?{} */);
     246}
     247static inline struct __anonymous8 ___operator_assign__F13s__anonymous8_R13s__anonymous813s__anonymous8_autogen___1(struct __anonymous8 *___dst__R13s__anonymous8_1, struct __anonymous8 ___src__13s__anonymous8_1){
    248248    struct __anonymous8 ___ret__13s__anonymous8_1;
    249     ((void)((*___dst__P13s__anonymous8_1).__i__s_1=___src__13s__anonymous8_1.__i__s_1));
    250     ((void)___constructor__F_P13s__anonymous813s__anonymous8_autogen___1((&___ret__13s__anonymous8_1), ___src__13s__anonymous8_1));
     249    ((void)((*___dst__R13s__anonymous8_1).__i__s_1=___src__13s__anonymous8_1.__i__s_1));
     250    ((void)___constructor__F_R13s__anonymous813s__anonymous8_autogen___1((&___ret__13s__anonymous8_1), ___src__13s__anonymous8_1));
    251251    return ((struct __anonymous8 )___ret__13s__anonymous8_1);
    252252}
    253 static inline void ___constructor__F_P13s__anonymous8s_autogen___1(struct __anonymous8 *___dst__P13s__anonymous8_1, short __i__s_1){
    254     ((void)((*((short *)(&(*___dst__P13s__anonymous8_1).__i__s_1)))=__i__s_1) /* ?{} */);
     253static inline void ___constructor__F_R13s__anonymous8s_autogen___1(struct __anonymous8 *___dst__R13s__anonymous8_1, short __i__s_1){
     254    ((void)((*___dst__R13s__anonymous8_1).__i__s_1=__i__s_1) /* ?{} */);
    255255}
    256256volatile const struct __anonymous8 __x29__CV13s__anonymous8_1;
     
    258258    short __i__s_1;
    259259};
    260 static inline void ___constructor__F_P13s__anonymous9_autogen___1(struct __anonymous9 *___dst__P13s__anonymous9_1);
    261 static inline void ___constructor__F_P13s__anonymous913s__anonymous9_autogen___1(struct __anonymous9 *___dst__P13s__anonymous9_1, struct __anonymous9 ___src__13s__anonymous9_1);
    262 static inline void ___destructor__F_P13s__anonymous9_autogen___1(struct __anonymous9 *___dst__P13s__anonymous9_1);
    263 static inline struct __anonymous9 ___operator_assign__F13s__anonymous9_P13s__anonymous913s__anonymous9_autogen___1(struct __anonymous9 *___dst__P13s__anonymous9_1, struct __anonymous9 ___src__13s__anonymous9_1);
    264 static inline void ___constructor__F_P13s__anonymous9_autogen___1(struct __anonymous9 *___dst__P13s__anonymous9_1){
    265     ((void)((*((short *)(&(*___dst__P13s__anonymous9_1).__i__s_1)))) /* ?{} */);
    266 }
    267 static inline void ___constructor__F_P13s__anonymous913s__anonymous9_autogen___1(struct __anonymous9 *___dst__P13s__anonymous9_1, struct __anonymous9 ___src__13s__anonymous9_1){
    268     ((void)((*((short *)(&(*___dst__P13s__anonymous9_1).__i__s_1)))=___src__13s__anonymous9_1.__i__s_1) /* ?{} */);
    269 }
    270 static inline void ___destructor__F_P13s__anonymous9_autogen___1(struct __anonymous9 *___dst__P13s__anonymous9_1){
    271     ((void)((*((short *)(&(*___dst__P13s__anonymous9_1).__i__s_1)))) /* ^?{} */);
    272 }
    273 static inline struct __anonymous9 ___operator_assign__F13s__anonymous9_P13s__anonymous913s__anonymous9_autogen___1(struct __anonymous9 *___dst__P13s__anonymous9_1, struct __anonymous9 ___src__13s__anonymous9_1){
     260static inline void ___constructor__F_R13s__anonymous9_autogen___1(struct __anonymous9 *___dst__R13s__anonymous9_1);
     261static inline void ___constructor__F_R13s__anonymous913s__anonymous9_autogen___1(struct __anonymous9 *___dst__R13s__anonymous9_1, struct __anonymous9 ___src__13s__anonymous9_1);
     262static inline void ___destructor__F_R13s__anonymous9_autogen___1(struct __anonymous9 *___dst__R13s__anonymous9_1);
     263static inline struct __anonymous9 ___operator_assign__F13s__anonymous9_R13s__anonymous913s__anonymous9_autogen___1(struct __anonymous9 *___dst__R13s__anonymous9_1, struct __anonymous9 ___src__13s__anonymous9_1);
     264static inline void ___constructor__F_R13s__anonymous9_autogen___1(struct __anonymous9 *___dst__R13s__anonymous9_1){
     265    ((void)((*___dst__R13s__anonymous9_1).__i__s_1) /* ?{} */);
     266}
     267static inline void ___constructor__F_R13s__anonymous913s__anonymous9_autogen___1(struct __anonymous9 *___dst__R13s__anonymous9_1, struct __anonymous9 ___src__13s__anonymous9_1){
     268    ((void)((*___dst__R13s__anonymous9_1).__i__s_1=___src__13s__anonymous9_1.__i__s_1) /* ?{} */);
     269}
     270static inline void ___destructor__F_R13s__anonymous9_autogen___1(struct __anonymous9 *___dst__R13s__anonymous9_1){
     271    ((void)((*___dst__R13s__anonymous9_1).__i__s_1) /* ^?{} */);
     272}
     273static inline struct __anonymous9 ___operator_assign__F13s__anonymous9_R13s__anonymous913s__anonymous9_autogen___1(struct __anonymous9 *___dst__R13s__anonymous9_1, struct __anonymous9 ___src__13s__anonymous9_1){
    274274    struct __anonymous9 ___ret__13s__anonymous9_1;
    275     ((void)((*___dst__P13s__anonymous9_1).__i__s_1=___src__13s__anonymous9_1.__i__s_1));
    276     ((void)___constructor__F_P13s__anonymous913s__anonymous9_autogen___1((&___ret__13s__anonymous9_1), ___src__13s__anonymous9_1));
     275    ((void)((*___dst__R13s__anonymous9_1).__i__s_1=___src__13s__anonymous9_1.__i__s_1));
     276    ((void)___constructor__F_R13s__anonymous913s__anonymous9_autogen___1((&___ret__13s__anonymous9_1), ___src__13s__anonymous9_1));
    277277    return ((struct __anonymous9 )___ret__13s__anonymous9_1);
    278278}
    279 static inline void ___constructor__F_P13s__anonymous9s_autogen___1(struct __anonymous9 *___dst__P13s__anonymous9_1, short __i__s_1){
    280     ((void)((*((short *)(&(*___dst__P13s__anonymous9_1).__i__s_1)))=__i__s_1) /* ?{} */);
     279static inline void ___constructor__F_R13s__anonymous9s_autogen___1(struct __anonymous9 *___dst__R13s__anonymous9_1, short __i__s_1){
     280    ((void)((*___dst__R13s__anonymous9_1).__i__s_1=__i__s_1) /* ?{} */);
    281281}
    282282volatile const struct __anonymous9 __x30__CV13s__anonymous9_1;
     
    284284    short __i__s_1;
    285285};
    286 static inline void ___constructor__F_P14s__anonymous10_autogen___1(struct __anonymous10 *___dst__P14s__anonymous10_1);
    287 static inline void ___constructor__F_P14s__anonymous1014s__anonymous10_autogen___1(struct __anonymous10 *___dst__P14s__anonymous10_1, struct __anonymous10 ___src__14s__anonymous10_1);
    288 static inline void ___destructor__F_P14s__anonymous10_autogen___1(struct __anonymous10 *___dst__P14s__anonymous10_1);
    289 static inline struct __anonymous10 ___operator_assign__F14s__anonymous10_P14s__anonymous1014s__anonymous10_autogen___1(struct __anonymous10 *___dst__P14s__anonymous10_1, struct __anonymous10 ___src__14s__anonymous10_1);
    290 static inline void ___constructor__F_P14s__anonymous10_autogen___1(struct __anonymous10 *___dst__P14s__anonymous10_1){
    291     ((void)((*((short *)(&(*___dst__P14s__anonymous10_1).__i__s_1)))) /* ?{} */);
    292 }
    293 static inline void ___constructor__F_P14s__anonymous1014s__anonymous10_autogen___1(struct __anonymous10 *___dst__P14s__anonymous10_1, struct __anonymous10 ___src__14s__anonymous10_1){
    294     ((void)((*((short *)(&(*___dst__P14s__anonymous10_1).__i__s_1)))=___src__14s__anonymous10_1.__i__s_1) /* ?{} */);
    295 }
    296 static inline void ___destructor__F_P14s__anonymous10_autogen___1(struct __anonymous10 *___dst__P14s__anonymous10_1){
    297     ((void)((*((short *)(&(*___dst__P14s__anonymous10_1).__i__s_1)))) /* ^?{} */);
    298 }
    299 static inline struct __anonymous10 ___operator_assign__F14s__anonymous10_P14s__anonymous1014s__anonymous10_autogen___1(struct __anonymous10 *___dst__P14s__anonymous10_1, struct __anonymous10 ___src__14s__anonymous10_1){
     286static inline void ___constructor__F_R14s__anonymous10_autogen___1(struct __anonymous10 *___dst__R14s__anonymous10_1);
     287static inline void ___constructor__F_R14s__anonymous1014s__anonymous10_autogen___1(struct __anonymous10 *___dst__R14s__anonymous10_1, struct __anonymous10 ___src__14s__anonymous10_1);
     288static inline void ___destructor__F_R14s__anonymous10_autogen___1(struct __anonymous10 *___dst__R14s__anonymous10_1);
     289static inline struct __anonymous10 ___operator_assign__F14s__anonymous10_R14s__anonymous1014s__anonymous10_autogen___1(struct __anonymous10 *___dst__R14s__anonymous10_1, struct __anonymous10 ___src__14s__anonymous10_1);
     290static inline void ___constructor__F_R14s__anonymous10_autogen___1(struct __anonymous10 *___dst__R14s__anonymous10_1){
     291    ((void)((*___dst__R14s__anonymous10_1).__i__s_1) /* ?{} */);
     292}
     293static inline void ___constructor__F_R14s__anonymous1014s__anonymous10_autogen___1(struct __anonymous10 *___dst__R14s__anonymous10_1, struct __anonymous10 ___src__14s__anonymous10_1){
     294    ((void)((*___dst__R14s__anonymous10_1).__i__s_1=___src__14s__anonymous10_1.__i__s_1) /* ?{} */);
     295}
     296static inline void ___destructor__F_R14s__anonymous10_autogen___1(struct __anonymous10 *___dst__R14s__anonymous10_1){
     297    ((void)((*___dst__R14s__anonymous10_1).__i__s_1) /* ^?{} */);
     298}
     299static inline struct __anonymous10 ___operator_assign__F14s__anonymous10_R14s__anonymous1014s__anonymous10_autogen___1(struct __anonymous10 *___dst__R14s__anonymous10_1, struct __anonymous10 ___src__14s__anonymous10_1){
    300300    struct __anonymous10 ___ret__14s__anonymous10_1;
    301     ((void)((*___dst__P14s__anonymous10_1).__i__s_1=___src__14s__anonymous10_1.__i__s_1));
    302     ((void)___constructor__F_P14s__anonymous1014s__anonymous10_autogen___1((&___ret__14s__anonymous10_1), ___src__14s__anonymous10_1));
     301    ((void)((*___dst__R14s__anonymous10_1).__i__s_1=___src__14s__anonymous10_1.__i__s_1));
     302    ((void)___constructor__F_R14s__anonymous1014s__anonymous10_autogen___1((&___ret__14s__anonymous10_1), ___src__14s__anonymous10_1));
    303303    return ((struct __anonymous10 )___ret__14s__anonymous10_1);
    304304}
    305 static inline void ___constructor__F_P14s__anonymous10s_autogen___1(struct __anonymous10 *___dst__P14s__anonymous10_1, short __i__s_1){
    306     ((void)((*((short *)(&(*___dst__P14s__anonymous10_1).__i__s_1)))=__i__s_1) /* ?{} */);
     305static inline void ___constructor__F_R14s__anonymous10s_autogen___1(struct __anonymous10 *___dst__R14s__anonymous10_1, short __i__s_1){
     306    ((void)((*___dst__R14s__anonymous10_1).__i__s_1=__i__s_1) /* ?{} */);
    307307}
    308308volatile const struct __anonymous10 __x31__CV14s__anonymous10_1;
     
    310310    short __i__s_1;
    311311};
    312 static inline void ___constructor__F_P14s__anonymous11_autogen___1(struct __anonymous11 *___dst__P14s__anonymous11_1);
    313 static inline void ___constructor__F_P14s__anonymous1114s__anonymous11_autogen___1(struct __anonymous11 *___dst__P14s__anonymous11_1, struct __anonymous11 ___src__14s__anonymous11_1);
    314 static inline void ___destructor__F_P14s__anonymous11_autogen___1(struct __anonymous11 *___dst__P14s__anonymous11_1);
    315 static inline struct __anonymous11 ___operator_assign__F14s__anonymous11_P14s__anonymous1114s__anonymous11_autogen___1(struct __anonymous11 *___dst__P14s__anonymous11_1, struct __anonymous11 ___src__14s__anonymous11_1);
    316 static inline void ___constructor__F_P14s__anonymous11_autogen___1(struct __anonymous11 *___dst__P14s__anonymous11_1){
    317     ((void)((*((short *)(&(*___dst__P14s__anonymous11_1).__i__s_1)))) /* ?{} */);
    318 }
    319 static inline void ___constructor__F_P14s__anonymous1114s__anonymous11_autogen___1(struct __anonymous11 *___dst__P14s__anonymous11_1, struct __anonymous11 ___src__14s__anonymous11_1){
    320     ((void)((*((short *)(&(*___dst__P14s__anonymous11_1).__i__s_1)))=___src__14s__anonymous11_1.__i__s_1) /* ?{} */);
    321 }
    322 static inline void ___destructor__F_P14s__anonymous11_autogen___1(struct __anonymous11 *___dst__P14s__anonymous11_1){
    323     ((void)((*((short *)(&(*___dst__P14s__anonymous11_1).__i__s_1)))) /* ^?{} */);
    324 }
    325 static inline struct __anonymous11 ___operator_assign__F14s__anonymous11_P14s__anonymous1114s__anonymous11_autogen___1(struct __anonymous11 *___dst__P14s__anonymous11_1, struct __anonymous11 ___src__14s__anonymous11_1){
     312static inline void ___constructor__F_R14s__anonymous11_autogen___1(struct __anonymous11 *___dst__R14s__anonymous11_1);
     313static inline void ___constructor__F_R14s__anonymous1114s__anonymous11_autogen___1(struct __anonymous11 *___dst__R14s__anonymous11_1, struct __anonymous11 ___src__14s__anonymous11_1);
     314static inline void ___destructor__F_R14s__anonymous11_autogen___1(struct __anonymous11 *___dst__R14s__anonymous11_1);
     315static inline struct __anonymous11 ___operator_assign__F14s__anonymous11_R14s__anonymous1114s__anonymous11_autogen___1(struct __anonymous11 *___dst__R14s__anonymous11_1, struct __anonymous11 ___src__14s__anonymous11_1);
     316static inline void ___constructor__F_R14s__anonymous11_autogen___1(struct __anonymous11 *___dst__R14s__anonymous11_1){
     317    ((void)((*___dst__R14s__anonymous11_1).__i__s_1) /* ?{} */);
     318}
     319static inline void ___constructor__F_R14s__anonymous1114s__anonymous11_autogen___1(struct __anonymous11 *___dst__R14s__anonymous11_1, struct __anonymous11 ___src__14s__anonymous11_1){
     320    ((void)((*___dst__R14s__anonymous11_1).__i__s_1=___src__14s__anonymous11_1.__i__s_1) /* ?{} */);
     321}
     322static inline void ___destructor__F_R14s__anonymous11_autogen___1(struct __anonymous11 *___dst__R14s__anonymous11_1){
     323    ((void)((*___dst__R14s__anonymous11_1).__i__s_1) /* ^?{} */);
     324}
     325static inline struct __anonymous11 ___operator_assign__F14s__anonymous11_R14s__anonymous1114s__anonymous11_autogen___1(struct __anonymous11 *___dst__R14s__anonymous11_1, struct __anonymous11 ___src__14s__anonymous11_1){
    326326    struct __anonymous11 ___ret__14s__anonymous11_1;
    327     ((void)((*___dst__P14s__anonymous11_1).__i__s_1=___src__14s__anonymous11_1.__i__s_1));
    328     ((void)___constructor__F_P14s__anonymous1114s__anonymous11_autogen___1((&___ret__14s__anonymous11_1), ___src__14s__anonymous11_1));
     327    ((void)((*___dst__R14s__anonymous11_1).__i__s_1=___src__14s__anonymous11_1.__i__s_1));
     328    ((void)___constructor__F_R14s__anonymous1114s__anonymous11_autogen___1((&___ret__14s__anonymous11_1), ___src__14s__anonymous11_1));
    329329    return ((struct __anonymous11 )___ret__14s__anonymous11_1);
    330330}
    331 static inline void ___constructor__F_P14s__anonymous11s_autogen___1(struct __anonymous11 *___dst__P14s__anonymous11_1, short __i__s_1){
    332     ((void)((*((short *)(&(*___dst__P14s__anonymous11_1).__i__s_1)))=__i__s_1) /* ?{} */);
     331static inline void ___constructor__F_R14s__anonymous11s_autogen___1(struct __anonymous11 *___dst__R14s__anonymous11_1, short __i__s_1){
     332    ((void)((*___dst__R14s__anonymous11_1).__i__s_1=__i__s_1) /* ?{} */);
    333333}
    334334static volatile const struct __anonymous11 __x32__CV14s__anonymous11_1;
     
    336336    short __i__s_1;
    337337};
    338 static inline void ___constructor__F_P14s__anonymous12_autogen___1(struct __anonymous12 *___dst__P14s__anonymous12_1);
    339 static inline void ___constructor__F_P14s__anonymous1214s__anonymous12_autogen___1(struct __anonymous12 *___dst__P14s__anonymous12_1, struct __anonymous12 ___src__14s__anonymous12_1);
    340 static inline void ___destructor__F_P14s__anonymous12_autogen___1(struct __anonymous12 *___dst__P14s__anonymous12_1);
    341 static inline struct __anonymous12 ___operator_assign__F14s__anonymous12_P14s__anonymous1214s__anonymous12_autogen___1(struct __anonymous12 *___dst__P14s__anonymous12_1, struct __anonymous12 ___src__14s__anonymous12_1);
    342 static inline void ___constructor__F_P14s__anonymous12_autogen___1(struct __anonymous12 *___dst__P14s__anonymous12_1){
    343     ((void)((*((short *)(&(*___dst__P14s__anonymous12_1).__i__s_1)))) /* ?{} */);
    344 }
    345 static inline void ___constructor__F_P14s__anonymous1214s__anonymous12_autogen___1(struct __anonymous12 *___dst__P14s__anonymous12_1, struct __anonymous12 ___src__14s__anonymous12_1){
    346     ((void)((*((short *)(&(*___dst__P14s__anonymous12_1).__i__s_1)))=___src__14s__anonymous12_1.__i__s_1) /* ?{} */);
    347 }
    348 static inline void ___destructor__F_P14s__anonymous12_autogen___1(struct __anonymous12 *___dst__P14s__anonymous12_1){
    349     ((void)((*((short *)(&(*___dst__P14s__anonymous12_1).__i__s_1)))) /* ^?{} */);
    350 }
    351 static inline struct __anonymous12 ___operator_assign__F14s__anonymous12_P14s__anonymous1214s__anonymous12_autogen___1(struct __anonymous12 *___dst__P14s__anonymous12_1, struct __anonymous12 ___src__14s__anonymous12_1){
     338static inline void ___constructor__F_R14s__anonymous12_autogen___1(struct __anonymous12 *___dst__R14s__anonymous12_1);
     339static inline void ___constructor__F_R14s__anonymous1214s__anonymous12_autogen___1(struct __anonymous12 *___dst__R14s__anonymous12_1, struct __anonymous12 ___src__14s__anonymous12_1);
     340static inline void ___destructor__F_R14s__anonymous12_autogen___1(struct __anonymous12 *___dst__R14s__anonymous12_1);
     341static inline struct __anonymous12 ___operator_assign__F14s__anonymous12_R14s__anonymous1214s__anonymous12_autogen___1(struct __anonymous12 *___dst__R14s__anonymous12_1, struct __anonymous12 ___src__14s__anonymous12_1);
     342static inline void ___constructor__F_R14s__anonymous12_autogen___1(struct __anonymous12 *___dst__R14s__anonymous12_1){
     343    ((void)((*___dst__R14s__anonymous12_1).__i__s_1) /* ?{} */);
     344}
     345static inline void ___constructor__F_R14s__anonymous1214s__anonymous12_autogen___1(struct __anonymous12 *___dst__R14s__anonymous12_1, struct __anonymous12 ___src__14s__anonymous12_1){
     346    ((void)((*___dst__R14s__anonymous12_1).__i__s_1=___src__14s__anonymous12_1.__i__s_1) /* ?{} */);
     347}
     348static inline void ___destructor__F_R14s__anonymous12_autogen___1(struct __anonymous12 *___dst__R14s__anonymous12_1){
     349    ((void)((*___dst__R14s__anonymous12_1).__i__s_1) /* ^?{} */);
     350}
     351static inline struct __anonymous12 ___operator_assign__F14s__anonymous12_R14s__anonymous1214s__anonymous12_autogen___1(struct __anonymous12 *___dst__R14s__anonymous12_1, struct __anonymous12 ___src__14s__anonymous12_1){
    352352    struct __anonymous12 ___ret__14s__anonymous12_1;
    353     ((void)((*___dst__P14s__anonymous12_1).__i__s_1=___src__14s__anonymous12_1.__i__s_1));
    354     ((void)___constructor__F_P14s__anonymous1214s__anonymous12_autogen___1((&___ret__14s__anonymous12_1), ___src__14s__anonymous12_1));
     353    ((void)((*___dst__R14s__anonymous12_1).__i__s_1=___src__14s__anonymous12_1.__i__s_1));
     354    ((void)___constructor__F_R14s__anonymous1214s__anonymous12_autogen___1((&___ret__14s__anonymous12_1), ___src__14s__anonymous12_1));
    355355    return ((struct __anonymous12 )___ret__14s__anonymous12_1);
    356356}
    357 static inline void ___constructor__F_P14s__anonymous12s_autogen___1(struct __anonymous12 *___dst__P14s__anonymous12_1, short __i__s_1){
    358     ((void)((*((short *)(&(*___dst__P14s__anonymous12_1).__i__s_1)))=__i__s_1) /* ?{} */);
     357static inline void ___constructor__F_R14s__anonymous12s_autogen___1(struct __anonymous12 *___dst__R14s__anonymous12_1, short __i__s_1){
     358    ((void)((*___dst__R14s__anonymous12_1).__i__s_1=__i__s_1) /* ?{} */);
    359359}
    360360static volatile const struct __anonymous12 __x33__CV14s__anonymous12_1;
     
    362362    short __i__s_1;
    363363};
    364 static inline void ___constructor__F_P14s__anonymous13_autogen___1(struct __anonymous13 *___dst__P14s__anonymous13_1);
    365 static inline void ___constructor__F_P14s__anonymous1314s__anonymous13_autogen___1(struct __anonymous13 *___dst__P14s__anonymous13_1, struct __anonymous13 ___src__14s__anonymous13_1);
    366 static inline void ___destructor__F_P14s__anonymous13_autogen___1(struct __anonymous13 *___dst__P14s__anonymous13_1);
    367 static inline struct __anonymous13 ___operator_assign__F14s__anonymous13_P14s__anonymous1314s__anonymous13_autogen___1(struct __anonymous13 *___dst__P14s__anonymous13_1, struct __anonymous13 ___src__14s__anonymous13_1);
    368 static inline void ___constructor__F_P14s__anonymous13_autogen___1(struct __anonymous13 *___dst__P14s__anonymous13_1){
    369     ((void)((*((short *)(&(*___dst__P14s__anonymous13_1).__i__s_1)))) /* ?{} */);
    370 }
    371 static inline void ___constructor__F_P14s__anonymous1314s__anonymous13_autogen___1(struct __anonymous13 *___dst__P14s__anonymous13_1, struct __anonymous13 ___src__14s__anonymous13_1){
    372     ((void)((*((short *)(&(*___dst__P14s__anonymous13_1).__i__s_1)))=___src__14s__anonymous13_1.__i__s_1) /* ?{} */);
    373 }
    374 static inline void ___destructor__F_P14s__anonymous13_autogen___1(struct __anonymous13 *___dst__P14s__anonymous13_1){
    375     ((void)((*((short *)(&(*___dst__P14s__anonymous13_1).__i__s_1)))) /* ^?{} */);
    376 }
    377 static inline struct __anonymous13 ___operator_assign__F14s__anonymous13_P14s__anonymous1314s__anonymous13_autogen___1(struct __anonymous13 *___dst__P14s__anonymous13_1, struct __anonymous13 ___src__14s__anonymous13_1){
     364static inline void ___constructor__F_R14s__anonymous13_autogen___1(struct __anonymous13 *___dst__R14s__anonymous13_1);
     365static inline void ___constructor__F_R14s__anonymous1314s__anonymous13_autogen___1(struct __anonymous13 *___dst__R14s__anonymous13_1, struct __anonymous13 ___src__14s__anonymous13_1);
     366static inline void ___destructor__F_R14s__anonymous13_autogen___1(struct __anonymous13 *___dst__R14s__anonymous13_1);
     367static inline struct __anonymous13 ___operator_assign__F14s__anonymous13_R14s__anonymous1314s__anonymous13_autogen___1(struct __anonymous13 *___dst__R14s__anonymous13_1, struct __anonymous13 ___src__14s__anonymous13_1);
     368static inline void ___constructor__F_R14s__anonymous13_autogen___1(struct __anonymous13 *___dst__R14s__anonymous13_1){
     369    ((void)((*___dst__R14s__anonymous13_1).__i__s_1) /* ?{} */);
     370}
     371static inline void ___constructor__F_R14s__anonymous1314s__anonymous13_autogen___1(struct __anonymous13 *___dst__R14s__anonymous13_1, struct __anonymous13 ___src__14s__anonymous13_1){
     372    ((void)((*___dst__R14s__anonymous13_1).__i__s_1=___src__14s__anonymous13_1.__i__s_1) /* ?{} */);
     373}
     374static inline void ___destructor__F_R14s__anonymous13_autogen___1(struct __anonymous13 *___dst__R14s__anonymous13_1){
     375    ((void)((*___dst__R14s__anonymous13_1).__i__s_1) /* ^?{} */);
     376}
     377static inline struct __anonymous13 ___operator_assign__F14s__anonymous13_R14s__anonymous1314s__anonymous13_autogen___1(struct __anonymous13 *___dst__R14s__anonymous13_1, struct __anonymous13 ___src__14s__anonymous13_1){
    378378    struct __anonymous13 ___ret__14s__anonymous13_1;
    379     ((void)((*___dst__P14s__anonymous13_1).__i__s_1=___src__14s__anonymous13_1.__i__s_1));
    380     ((void)___constructor__F_P14s__anonymous1314s__anonymous13_autogen___1((&___ret__14s__anonymous13_1), ___src__14s__anonymous13_1));
     379    ((void)((*___dst__R14s__anonymous13_1).__i__s_1=___src__14s__anonymous13_1.__i__s_1));
     380    ((void)___constructor__F_R14s__anonymous1314s__anonymous13_autogen___1((&___ret__14s__anonymous13_1), ___src__14s__anonymous13_1));
    381381    return ((struct __anonymous13 )___ret__14s__anonymous13_1);
    382382}
    383 static inline void ___constructor__F_P14s__anonymous13s_autogen___1(struct __anonymous13 *___dst__P14s__anonymous13_1, short __i__s_1){
    384     ((void)((*((short *)(&(*___dst__P14s__anonymous13_1).__i__s_1)))=__i__s_1) /* ?{} */);
     383static inline void ___constructor__F_R14s__anonymous13s_autogen___1(struct __anonymous13 *___dst__R14s__anonymous13_1, short __i__s_1){
     384    ((void)((*___dst__R14s__anonymous13_1).__i__s_1=__i__s_1) /* ?{} */);
    385385}
    386386static volatile const struct __anonymous13 __x34__CV14s__anonymous13_1;
     
    388388    short __i__s_1;
    389389};
    390 static inline void ___constructor__F_P14s__anonymous14_autogen___1(struct __anonymous14 *___dst__P14s__anonymous14_1);
    391 static inline void ___constructor__F_P14s__anonymous1414s__anonymous14_autogen___1(struct __anonymous14 *___dst__P14s__anonymous14_1, struct __anonymous14 ___src__14s__anonymous14_1);
    392 static inline void ___destructor__F_P14s__anonymous14_autogen___1(struct __anonymous14 *___dst__P14s__anonymous14_1);
    393 static inline struct __anonymous14 ___operator_assign__F14s__anonymous14_P14s__anonymous1414s__anonymous14_autogen___1(struct __anonymous14 *___dst__P14s__anonymous14_1, struct __anonymous14 ___src__14s__anonymous14_1);
    394 static inline void ___constructor__F_P14s__anonymous14_autogen___1(struct __anonymous14 *___dst__P14s__anonymous14_1){
    395     ((void)((*((short *)(&(*___dst__P14s__anonymous14_1).__i__s_1)))) /* ?{} */);
    396 }
    397 static inline void ___constructor__F_P14s__anonymous1414s__anonymous14_autogen___1(struct __anonymous14 *___dst__P14s__anonymous14_1, struct __anonymous14 ___src__14s__anonymous14_1){
    398     ((void)((*((short *)(&(*___dst__P14s__anonymous14_1).__i__s_1)))=___src__14s__anonymous14_1.__i__s_1) /* ?{} */);
    399 }
    400 static inline void ___destructor__F_P14s__anonymous14_autogen___1(struct __anonymous14 *___dst__P14s__anonymous14_1){
    401     ((void)((*((short *)(&(*___dst__P14s__anonymous14_1).__i__s_1)))) /* ^?{} */);
    402 }
    403 static inline struct __anonymous14 ___operator_assign__F14s__anonymous14_P14s__anonymous1414s__anonymous14_autogen___1(struct __anonymous14 *___dst__P14s__anonymous14_1, struct __anonymous14 ___src__14s__anonymous14_1){
     390static inline void ___constructor__F_R14s__anonymous14_autogen___1(struct __anonymous14 *___dst__R14s__anonymous14_1);
     391static inline void ___constructor__F_R14s__anonymous1414s__anonymous14_autogen___1(struct __anonymous14 *___dst__R14s__anonymous14_1, struct __anonymous14 ___src__14s__anonymous14_1);
     392static inline void ___destructor__F_R14s__anonymous14_autogen___1(struct __anonymous14 *___dst__R14s__anonymous14_1);
     393static inline struct __anonymous14 ___operator_assign__F14s__anonymous14_R14s__anonymous1414s__anonymous14_autogen___1(struct __anonymous14 *___dst__R14s__anonymous14_1, struct __anonymous14 ___src__14s__anonymous14_1);
     394static inline void ___constructor__F_R14s__anonymous14_autogen___1(struct __anonymous14 *___dst__R14s__anonymous14_1){
     395    ((void)((*___dst__R14s__anonymous14_1).__i__s_1) /* ?{} */);
     396}
     397static inline void ___constructor__F_R14s__anonymous1414s__anonymous14_autogen___1(struct __anonymous14 *___dst__R14s__anonymous14_1, struct __anonymous14 ___src__14s__anonymous14_1){
     398    ((void)((*___dst__R14s__anonymous14_1).__i__s_1=___src__14s__anonymous14_1.__i__s_1) /* ?{} */);
     399}
     400static inline void ___destructor__F_R14s__anonymous14_autogen___1(struct __anonymous14 *___dst__R14s__anonymous14_1){
     401    ((void)((*___dst__R14s__anonymous14_1).__i__s_1) /* ^?{} */);
     402}
     403static inline struct __anonymous14 ___operator_assign__F14s__anonymous14_R14s__anonymous1414s__anonymous14_autogen___1(struct __anonymous14 *___dst__R14s__anonymous14_1, struct __anonymous14 ___src__14s__anonymous14_1){
    404404    struct __anonymous14 ___ret__14s__anonymous14_1;
    405     ((void)((*___dst__P14s__anonymous14_1).__i__s_1=___src__14s__anonymous14_1.__i__s_1));
    406     ((void)___constructor__F_P14s__anonymous1414s__anonymous14_autogen___1((&___ret__14s__anonymous14_1), ___src__14s__anonymous14_1));
     405    ((void)((*___dst__R14s__anonymous14_1).__i__s_1=___src__14s__anonymous14_1.__i__s_1));
     406    ((void)___constructor__F_R14s__anonymous1414s__anonymous14_autogen___1((&___ret__14s__anonymous14_1), ___src__14s__anonymous14_1));
    407407    return ((struct __anonymous14 )___ret__14s__anonymous14_1);
    408408}
    409 static inline void ___constructor__F_P14s__anonymous14s_autogen___1(struct __anonymous14 *___dst__P14s__anonymous14_1, short __i__s_1){
    410     ((void)((*((short *)(&(*___dst__P14s__anonymous14_1).__i__s_1)))=__i__s_1) /* ?{} */);
     409static inline void ___constructor__F_R14s__anonymous14s_autogen___1(struct __anonymous14 *___dst__R14s__anonymous14_1, short __i__s_1){
     410    ((void)((*___dst__R14s__anonymous14_1).__i__s_1=__i__s_1) /* ?{} */);
    411411}
    412412static volatile const struct __anonymous14 __x35__CV14s__anonymous14_1;
     
    414414    short __i__s_1;
    415415};
    416 static inline void ___constructor__F_P14s__anonymous15_autogen___1(struct __anonymous15 *___dst__P14s__anonymous15_1);
    417 static inline void ___constructor__F_P14s__anonymous1514s__anonymous15_autogen___1(struct __anonymous15 *___dst__P14s__anonymous15_1, struct __anonymous15 ___src__14s__anonymous15_1);
    418 static inline void ___destructor__F_P14s__anonymous15_autogen___1(struct __anonymous15 *___dst__P14s__anonymous15_1);
    419 static inline struct __anonymous15 ___operator_assign__F14s__anonymous15_P14s__anonymous1514s__anonymous15_autogen___1(struct __anonymous15 *___dst__P14s__anonymous15_1, struct __anonymous15 ___src__14s__anonymous15_1);
    420 static inline void ___constructor__F_P14s__anonymous15_autogen___1(struct __anonymous15 *___dst__P14s__anonymous15_1){
    421     ((void)((*((short *)(&(*___dst__P14s__anonymous15_1).__i__s_1)))) /* ?{} */);
    422 }
    423 static inline void ___constructor__F_P14s__anonymous1514s__anonymous15_autogen___1(struct __anonymous15 *___dst__P14s__anonymous15_1, struct __anonymous15 ___src__14s__anonymous15_1){
    424     ((void)((*((short *)(&(*___dst__P14s__anonymous15_1).__i__s_1)))=___src__14s__anonymous15_1.__i__s_1) /* ?{} */);
    425 }
    426 static inline void ___destructor__F_P14s__anonymous15_autogen___1(struct __anonymous15 *___dst__P14s__anonymous15_1){
    427     ((void)((*((short *)(&(*___dst__P14s__anonymous15_1).__i__s_1)))) /* ^?{} */);
    428 }
    429 static inline struct __anonymous15 ___operator_assign__F14s__anonymous15_P14s__anonymous1514s__anonymous15_autogen___1(struct __anonymous15 *___dst__P14s__anonymous15_1, struct __anonymous15 ___src__14s__anonymous15_1){
     416static inline void ___constructor__F_R14s__anonymous15_autogen___1(struct __anonymous15 *___dst__R14s__anonymous15_1);
     417static inline void ___constructor__F_R14s__anonymous1514s__anonymous15_autogen___1(struct __anonymous15 *___dst__R14s__anonymous15_1, struct __anonymous15 ___src__14s__anonymous15_1);
     418static inline void ___destructor__F_R14s__anonymous15_autogen___1(struct __anonymous15 *___dst__R14s__anonymous15_1);
     419static inline struct __anonymous15 ___operator_assign__F14s__anonymous15_R14s__anonymous1514s__anonymous15_autogen___1(struct __anonymous15 *___dst__R14s__anonymous15_1, struct __anonymous15 ___src__14s__anonymous15_1);
     420static inline void ___constructor__F_R14s__anonymous15_autogen___1(struct __anonymous15 *___dst__R14s__anonymous15_1){
     421    ((void)((*___dst__R14s__anonymous15_1).__i__s_1) /* ?{} */);
     422}
     423static inline void ___constructor__F_R14s__anonymous1514s__anonymous15_autogen___1(struct __anonymous15 *___dst__R14s__anonymous15_1, struct __anonymous15 ___src__14s__anonymous15_1){
     424    ((void)((*___dst__R14s__anonymous15_1).__i__s_1=___src__14s__anonymous15_1.__i__s_1) /* ?{} */);
     425}
     426static inline void ___destructor__F_R14s__anonymous15_autogen___1(struct __anonymous15 *___dst__R14s__anonymous15_1){
     427    ((void)((*___dst__R14s__anonymous15_1).__i__s_1) /* ^?{} */);
     428}
     429static inline struct __anonymous15 ___operator_assign__F14s__anonymous15_R14s__anonymous1514s__anonymous15_autogen___1(struct __anonymous15 *___dst__R14s__anonymous15_1, struct __anonymous15 ___src__14s__anonymous15_1){
    430430    struct __anonymous15 ___ret__14s__anonymous15_1;
    431     ((void)((*___dst__P14s__anonymous15_1).__i__s_1=___src__14s__anonymous15_1.__i__s_1));
    432     ((void)___constructor__F_P14s__anonymous1514s__anonymous15_autogen___1((&___ret__14s__anonymous15_1), ___src__14s__anonymous15_1));
     431    ((void)((*___dst__R14s__anonymous15_1).__i__s_1=___src__14s__anonymous15_1.__i__s_1));
     432    ((void)___constructor__F_R14s__anonymous1514s__anonymous15_autogen___1((&___ret__14s__anonymous15_1), ___src__14s__anonymous15_1));
    433433    return ((struct __anonymous15 )___ret__14s__anonymous15_1);
    434434}
    435 static inline void ___constructor__F_P14s__anonymous15s_autogen___1(struct __anonymous15 *___dst__P14s__anonymous15_1, short __i__s_1){
    436     ((void)((*((short *)(&(*___dst__P14s__anonymous15_1).__i__s_1)))=__i__s_1) /* ?{} */);
     435static inline void ___constructor__F_R14s__anonymous15s_autogen___1(struct __anonymous15 *___dst__R14s__anonymous15_1, short __i__s_1){
     436    ((void)((*___dst__R14s__anonymous15_1).__i__s_1=__i__s_1) /* ?{} */);
    437437}
    438438static volatile const struct __anonymous15 __x36__CV14s__anonymous15_1;
     
    456456    int __i__i_1;
    457457};
    458 static inline void ___constructor__F_P14s__anonymous16_autogen___1(struct __anonymous16 *___dst__P14s__anonymous16_1);
    459 static inline void ___constructor__F_P14s__anonymous1614s__anonymous16_autogen___1(struct __anonymous16 *___dst__P14s__anonymous16_1, struct __anonymous16 ___src__14s__anonymous16_1);
    460 static inline void ___destructor__F_P14s__anonymous16_autogen___1(struct __anonymous16 *___dst__P14s__anonymous16_1);
    461 static inline struct __anonymous16 ___operator_assign__F14s__anonymous16_P14s__anonymous1614s__anonymous16_autogen___1(struct __anonymous16 *___dst__P14s__anonymous16_1, struct __anonymous16 ___src__14s__anonymous16_1);
    462 static inline void ___constructor__F_P14s__anonymous16_autogen___1(struct __anonymous16 *___dst__P14s__anonymous16_1){
    463     ((void)((*((int *)(&(*___dst__P14s__anonymous16_1).__i__i_1)))) /* ?{} */);
    464 }
    465 static inline void ___constructor__F_P14s__anonymous1614s__anonymous16_autogen___1(struct __anonymous16 *___dst__P14s__anonymous16_1, struct __anonymous16 ___src__14s__anonymous16_1){
    466     ((void)((*((int *)(&(*___dst__P14s__anonymous16_1).__i__i_1)))=___src__14s__anonymous16_1.__i__i_1) /* ?{} */);
    467 }
    468 static inline void ___destructor__F_P14s__anonymous16_autogen___1(struct __anonymous16 *___dst__P14s__anonymous16_1){
    469     ((void)((*((int *)(&(*___dst__P14s__anonymous16_1).__i__i_1)))) /* ^?{} */);
    470 }
    471 static inline struct __anonymous16 ___operator_assign__F14s__anonymous16_P14s__anonymous1614s__anonymous16_autogen___1(struct __anonymous16 *___dst__P14s__anonymous16_1, struct __anonymous16 ___src__14s__anonymous16_1){
     458static inline void ___constructor__F_R14s__anonymous16_autogen___1(struct __anonymous16 *___dst__R14s__anonymous16_1);
     459static inline void ___constructor__F_R14s__anonymous1614s__anonymous16_autogen___1(struct __anonymous16 *___dst__R14s__anonymous16_1, struct __anonymous16 ___src__14s__anonymous16_1);
     460static inline void ___destructor__F_R14s__anonymous16_autogen___1(struct __anonymous16 *___dst__R14s__anonymous16_1);
     461static inline struct __anonymous16 ___operator_assign__F14s__anonymous16_R14s__anonymous1614s__anonymous16_autogen___1(struct __anonymous16 *___dst__R14s__anonymous16_1, struct __anonymous16 ___src__14s__anonymous16_1);
     462static inline void ___constructor__F_R14s__anonymous16_autogen___1(struct __anonymous16 *___dst__R14s__anonymous16_1){
     463    ((void)((*___dst__R14s__anonymous16_1).__i__i_1) /* ?{} */);
     464}
     465static inline void ___constructor__F_R14s__anonymous1614s__anonymous16_autogen___1(struct __anonymous16 *___dst__R14s__anonymous16_1, struct __anonymous16 ___src__14s__anonymous16_1){
     466    ((void)((*___dst__R14s__anonymous16_1).__i__i_1=___src__14s__anonymous16_1.__i__i_1) /* ?{} */);
     467}
     468static inline void ___destructor__F_R14s__anonymous16_autogen___1(struct __anonymous16 *___dst__R14s__anonymous16_1){
     469    ((void)((*___dst__R14s__anonymous16_1).__i__i_1) /* ^?{} */);
     470}
     471static inline struct __anonymous16 ___operator_assign__F14s__anonymous16_R14s__anonymous1614s__anonymous16_autogen___1(struct __anonymous16 *___dst__R14s__anonymous16_1, struct __anonymous16 ___src__14s__anonymous16_1){
    472472    struct __anonymous16 ___ret__14s__anonymous16_1;
    473     ((void)((*___dst__P14s__anonymous16_1).__i__i_1=___src__14s__anonymous16_1.__i__i_1));
    474     ((void)___constructor__F_P14s__anonymous1614s__anonymous16_autogen___1((&___ret__14s__anonymous16_1), ___src__14s__anonymous16_1));
     473    ((void)((*___dst__R14s__anonymous16_1).__i__i_1=___src__14s__anonymous16_1.__i__i_1));
     474    ((void)___constructor__F_R14s__anonymous1614s__anonymous16_autogen___1((&___ret__14s__anonymous16_1), ___src__14s__anonymous16_1));
    475475    return ((struct __anonymous16 )___ret__14s__anonymous16_1);
    476476}
    477 static inline void ___constructor__F_P14s__anonymous16i_autogen___1(struct __anonymous16 *___dst__P14s__anonymous16_1, int __i__i_1){
    478     ((void)((*((int *)(&(*___dst__P14s__anonymous16_1).__i__i_1)))=__i__i_1) /* ?{} */);
     477static inline void ___constructor__F_R14s__anonymous16i_autogen___1(struct __anonymous16 *___dst__R14s__anonymous16_1, int __i__i_1){
     478    ((void)((*___dst__R14s__anonymous16_1).__i__i_1=__i__i_1) /* ?{} */);
    479479}
    480480static inline volatile const struct __anonymous16 __f31__FCV14s__anonymous16___1();
     
    482482    int __i__i_1;
    483483};
    484 static inline void ___constructor__F_P14s__anonymous17_autogen___1(struct __anonymous17 *___dst__P14s__anonymous17_1);
    485 static inline void ___constructor__F_P14s__anonymous1714s__anonymous17_autogen___1(struct __anonymous17 *___dst__P14s__anonymous17_1, struct __anonymous17 ___src__14s__anonymous17_1);
    486 static inline void ___destructor__F_P14s__anonymous17_autogen___1(struct __anonymous17 *___dst__P14s__anonymous17_1);
    487 static inline struct __anonymous17 ___operator_assign__F14s__anonymous17_P14s__anonymous1714s__anonymous17_autogen___1(struct __anonymous17 *___dst__P14s__anonymous17_1, struct __anonymous17 ___src__14s__anonymous17_1);
    488 static inline void ___constructor__F_P14s__anonymous17_autogen___1(struct __anonymous17 *___dst__P14s__anonymous17_1){
    489     ((void)((*((int *)(&(*___dst__P14s__anonymous17_1).__i__i_1)))) /* ?{} */);
    490 }
    491 static inline void ___constructor__F_P14s__anonymous1714s__anonymous17_autogen___1(struct __anonymous17 *___dst__P14s__anonymous17_1, struct __anonymous17 ___src__14s__anonymous17_1){
    492     ((void)((*((int *)(&(*___dst__P14s__anonymous17_1).__i__i_1)))=___src__14s__anonymous17_1.__i__i_1) /* ?{} */);
    493 }
    494 static inline void ___destructor__F_P14s__anonymous17_autogen___1(struct __anonymous17 *___dst__P14s__anonymous17_1){
    495     ((void)((*((int *)(&(*___dst__P14s__anonymous17_1).__i__i_1)))) /* ^?{} */);
    496 }
    497 static inline struct __anonymous17 ___operator_assign__F14s__anonymous17_P14s__anonymous1714s__anonymous17_autogen___1(struct __anonymous17 *___dst__P14s__anonymous17_1, struct __anonymous17 ___src__14s__anonymous17_1){
     484static inline void ___constructor__F_R14s__anonymous17_autogen___1(struct __anonymous17 *___dst__R14s__anonymous17_1);
     485static inline void ___constructor__F_R14s__anonymous1714s__anonymous17_autogen___1(struct __anonymous17 *___dst__R14s__anonymous17_1, struct __anonymous17 ___src__14s__anonymous17_1);
     486static inline void ___destructor__F_R14s__anonymous17_autogen___1(struct __anonymous17 *___dst__R14s__anonymous17_1);
     487static inline struct __anonymous17 ___operator_assign__F14s__anonymous17_R14s__anonymous1714s__anonymous17_autogen___1(struct __anonymous17 *___dst__R14s__anonymous17_1, struct __anonymous17 ___src__14s__anonymous17_1);
     488static inline void ___constructor__F_R14s__anonymous17_autogen___1(struct __anonymous17 *___dst__R14s__anonymous17_1){
     489    ((void)((*___dst__R14s__anonymous17_1).__i__i_1) /* ?{} */);
     490}
     491static inline void ___constructor__F_R14s__anonymous1714s__anonymous17_autogen___1(struct __anonymous17 *___dst__R14s__anonymous17_1, struct __anonymous17 ___src__14s__anonymous17_1){
     492    ((void)((*___dst__R14s__anonymous17_1).__i__i_1=___src__14s__anonymous17_1.__i__i_1) /* ?{} */);
     493}
     494static inline void ___destructor__F_R14s__anonymous17_autogen___1(struct __anonymous17 *___dst__R14s__anonymous17_1){
     495    ((void)((*___dst__R14s__anonymous17_1).__i__i_1) /* ^?{} */);
     496}
     497static inline struct __anonymous17 ___operator_assign__F14s__anonymous17_R14s__anonymous1714s__anonymous17_autogen___1(struct __anonymous17 *___dst__R14s__anonymous17_1, struct __anonymous17 ___src__14s__anonymous17_1){
    498498    struct __anonymous17 ___ret__14s__anonymous17_1;
    499     ((void)((*___dst__P14s__anonymous17_1).__i__i_1=___src__14s__anonymous17_1.__i__i_1));
    500     ((void)___constructor__F_P14s__anonymous1714s__anonymous17_autogen___1((&___ret__14s__anonymous17_1), ___src__14s__anonymous17_1));
     499    ((void)((*___dst__R14s__anonymous17_1).__i__i_1=___src__14s__anonymous17_1.__i__i_1));
     500    ((void)___constructor__F_R14s__anonymous1714s__anonymous17_autogen___1((&___ret__14s__anonymous17_1), ___src__14s__anonymous17_1));
    501501    return ((struct __anonymous17 )___ret__14s__anonymous17_1);
    502502}
    503 static inline void ___constructor__F_P14s__anonymous17i_autogen___1(struct __anonymous17 *___dst__P14s__anonymous17_1, int __i__i_1){
    504     ((void)((*((int *)(&(*___dst__P14s__anonymous17_1).__i__i_1)))=__i__i_1) /* ?{} */);
     503static inline void ___constructor__F_R14s__anonymous17i_autogen___1(struct __anonymous17 *___dst__R14s__anonymous17_1, int __i__i_1){
     504    ((void)((*___dst__R14s__anonymous17_1).__i__i_1=__i__i_1) /* ?{} */);
    505505}
    506506static inline volatile const struct __anonymous17 __f32__FCV14s__anonymous17___1();
     
    508508    int __i__i_1;
    509509};
    510 static inline void ___constructor__F_P14s__anonymous18_autogen___1(struct __anonymous18 *___dst__P14s__anonymous18_1);
    511 static inline void ___constructor__F_P14s__anonymous1814s__anonymous18_autogen___1(struct __anonymous18 *___dst__P14s__anonymous18_1, struct __anonymous18 ___src__14s__anonymous18_1);
    512 static inline void ___destructor__F_P14s__anonymous18_autogen___1(struct __anonymous18 *___dst__P14s__anonymous18_1);
    513 static inline struct __anonymous18 ___operator_assign__F14s__anonymous18_P14s__anonymous1814s__anonymous18_autogen___1(struct __anonymous18 *___dst__P14s__anonymous18_1, struct __anonymous18 ___src__14s__anonymous18_1);
    514 static inline void ___constructor__F_P14s__anonymous18_autogen___1(struct __anonymous18 *___dst__P14s__anonymous18_1){
    515     ((void)((*((int *)(&(*___dst__P14s__anonymous18_1).__i__i_1)))) /* ?{} */);
    516 }
    517 static inline void ___constructor__F_P14s__anonymous1814s__anonymous18_autogen___1(struct __anonymous18 *___dst__P14s__anonymous18_1, struct __anonymous18 ___src__14s__anonymous18_1){
    518     ((void)((*((int *)(&(*___dst__P14s__anonymous18_1).__i__i_1)))=___src__14s__anonymous18_1.__i__i_1) /* ?{} */);
    519 }
    520 static inline void ___destructor__F_P14s__anonymous18_autogen___1(struct __anonymous18 *___dst__P14s__anonymous18_1){
    521     ((void)((*((int *)(&(*___dst__P14s__anonymous18_1).__i__i_1)))) /* ^?{} */);
    522 }
    523 static inline struct __anonymous18 ___operator_assign__F14s__anonymous18_P14s__anonymous1814s__anonymous18_autogen___1(struct __anonymous18 *___dst__P14s__anonymous18_1, struct __anonymous18 ___src__14s__anonymous18_1){
     510static inline void ___constructor__F_R14s__anonymous18_autogen___1(struct __anonymous18 *___dst__R14s__anonymous18_1);
     511static inline void ___constructor__F_R14s__anonymous1814s__anonymous18_autogen___1(struct __anonymous18 *___dst__R14s__anonymous18_1, struct __anonymous18 ___src__14s__anonymous18_1);
     512static inline void ___destructor__F_R14s__anonymous18_autogen___1(struct __anonymous18 *___dst__R14s__anonymous18_1);
     513static inline struct __anonymous18 ___operator_assign__F14s__anonymous18_R14s__anonymous1814s__anonymous18_autogen___1(struct __anonymous18 *___dst__R14s__anonymous18_1, struct __anonymous18 ___src__14s__anonymous18_1);
     514static inline void ___constructor__F_R14s__anonymous18_autogen___1(struct __anonymous18 *___dst__R14s__anonymous18_1){
     515    ((void)((*___dst__R14s__anonymous18_1).__i__i_1) /* ?{} */);
     516}
     517static inline void ___constructor__F_R14s__anonymous1814s__anonymous18_autogen___1(struct __anonymous18 *___dst__R14s__anonymous18_1, struct __anonymous18 ___src__14s__anonymous18_1){
     518    ((void)((*___dst__R14s__anonymous18_1).__i__i_1=___src__14s__anonymous18_1.__i__i_1) /* ?{} */);
     519}
     520static inline void ___destructor__F_R14s__anonymous18_autogen___1(struct __anonymous18 *___dst__R14s__anonymous18_1){
     521    ((void)((*___dst__R14s__anonymous18_1).__i__i_1) /* ^?{} */);
     522}
     523static inline struct __anonymous18 ___operator_assign__F14s__anonymous18_R14s__anonymous1814s__anonymous18_autogen___1(struct __anonymous18 *___dst__R14s__anonymous18_1, struct __anonymous18 ___src__14s__anonymous18_1){
    524524    struct __anonymous18 ___ret__14s__anonymous18_1;
    525     ((void)((*___dst__P14s__anonymous18_1).__i__i_1=___src__14s__anonymous18_1.__i__i_1));
    526     ((void)___constructor__F_P14s__anonymous1814s__anonymous18_autogen___1((&___ret__14s__anonymous18_1), ___src__14s__anonymous18_1));
     525    ((void)((*___dst__R14s__anonymous18_1).__i__i_1=___src__14s__anonymous18_1.__i__i_1));
     526    ((void)___constructor__F_R14s__anonymous1814s__anonymous18_autogen___1((&___ret__14s__anonymous18_1), ___src__14s__anonymous18_1));
    527527    return ((struct __anonymous18 )___ret__14s__anonymous18_1);
    528528}
    529 static inline void ___constructor__F_P14s__anonymous18i_autogen___1(struct __anonymous18 *___dst__P14s__anonymous18_1, int __i__i_1){
    530     ((void)((*((int *)(&(*___dst__P14s__anonymous18_1).__i__i_1)))=__i__i_1) /* ?{} */);
     529static inline void ___constructor__F_R14s__anonymous18i_autogen___1(struct __anonymous18 *___dst__R14s__anonymous18_1, int __i__i_1){
     530    ((void)((*___dst__R14s__anonymous18_1).__i__i_1=__i__i_1) /* ?{} */);
    531531}
    532532static inline volatile const struct __anonymous18 __f33__FCV14s__anonymous18___1();
     
    534534    int __i__i_1;
    535535};
    536 static inline void ___constructor__F_P14s__anonymous19_autogen___1(struct __anonymous19 *___dst__P14s__anonymous19_1);
    537 static inline void ___constructor__F_P14s__anonymous1914s__anonymous19_autogen___1(struct __anonymous19 *___dst__P14s__anonymous19_1, struct __anonymous19 ___src__14s__anonymous19_1);
    538 static inline void ___destructor__F_P14s__anonymous19_autogen___1(struct __anonymous19 *___dst__P14s__anonymous19_1);
    539 static inline struct __anonymous19 ___operator_assign__F14s__anonymous19_P14s__anonymous1914s__anonymous19_autogen___1(struct __anonymous19 *___dst__P14s__anonymous19_1, struct __anonymous19 ___src__14s__anonymous19_1);
    540 static inline void ___constructor__F_P14s__anonymous19_autogen___1(struct __anonymous19 *___dst__P14s__anonymous19_1){
    541     ((void)((*((int *)(&(*___dst__P14s__anonymous19_1).__i__i_1)))) /* ?{} */);
    542 }
    543 static inline void ___constructor__F_P14s__anonymous1914s__anonymous19_autogen___1(struct __anonymous19 *___dst__P14s__anonymous19_1, struct __anonymous19 ___src__14s__anonymous19_1){
    544     ((void)((*((int *)(&(*___dst__P14s__anonymous19_1).__i__i_1)))=___src__14s__anonymous19_1.__i__i_1) /* ?{} */);
    545 }
    546 static inline void ___destructor__F_P14s__anonymous19_autogen___1(struct __anonymous19 *___dst__P14s__anonymous19_1){
    547     ((void)((*((int *)(&(*___dst__P14s__anonymous19_1).__i__i_1)))) /* ^?{} */);
    548 }
    549 static inline struct __anonymous19 ___operator_assign__F14s__anonymous19_P14s__anonymous1914s__anonymous19_autogen___1(struct __anonymous19 *___dst__P14s__anonymous19_1, struct __anonymous19 ___src__14s__anonymous19_1){
     536static inline void ___constructor__F_R14s__anonymous19_autogen___1(struct __anonymous19 *___dst__R14s__anonymous19_1);
     537static inline void ___constructor__F_R14s__anonymous1914s__anonymous19_autogen___1(struct __anonymous19 *___dst__R14s__anonymous19_1, struct __anonymous19 ___src__14s__anonymous19_1);
     538static inline void ___destructor__F_R14s__anonymous19_autogen___1(struct __anonymous19 *___dst__R14s__anonymous19_1);
     539static inline struct __anonymous19 ___operator_assign__F14s__anonymous19_R14s__anonymous1914s__anonymous19_autogen___1(struct __anonymous19 *___dst__R14s__anonymous19_1, struct __anonymous19 ___src__14s__anonymous19_1);
     540static inline void ___constructor__F_R14s__anonymous19_autogen___1(struct __anonymous19 *___dst__R14s__anonymous19_1){
     541    ((void)((*___dst__R14s__anonymous19_1).__i__i_1) /* ?{} */);
     542}
     543static inline void ___constructor__F_R14s__anonymous1914s__anonymous19_autogen___1(struct __anonymous19 *___dst__R14s__anonymous19_1, struct __anonymous19 ___src__14s__anonymous19_1){
     544    ((void)((*___dst__R14s__anonymous19_1).__i__i_1=___src__14s__anonymous19_1.__i__i_1) /* ?{} */);
     545}
     546static inline void ___destructor__F_R14s__anonymous19_autogen___1(struct __anonymous19 *___dst__R14s__anonymous19_1){
     547    ((void)((*___dst__R14s__anonymous19_1).__i__i_1) /* ^?{} */);
     548}
     549static inline struct __anonymous19 ___operator_assign__F14s__anonymous19_R14s__anonymous1914s__anonymous19_autogen___1(struct __anonymous19 *___dst__R14s__anonymous19_1, struct __anonymous19 ___src__14s__anonymous19_1){
    550550    struct __anonymous19 ___ret__14s__anonymous19_1;
    551     ((void)((*___dst__P14s__anonymous19_1).__i__i_1=___src__14s__anonymous19_1.__i__i_1));
    552     ((void)___constructor__F_P14s__anonymous1914s__anonymous19_autogen___1((&___ret__14s__anonymous19_1), ___src__14s__anonymous19_1));
     551    ((void)((*___dst__R14s__anonymous19_1).__i__i_1=___src__14s__anonymous19_1.__i__i_1));
     552    ((void)___constructor__F_R14s__anonymous1914s__anonymous19_autogen___1((&___ret__14s__anonymous19_1), ___src__14s__anonymous19_1));
    553553    return ((struct __anonymous19 )___ret__14s__anonymous19_1);
    554554}
    555 static inline void ___constructor__F_P14s__anonymous19i_autogen___1(struct __anonymous19 *___dst__P14s__anonymous19_1, int __i__i_1){
    556     ((void)((*((int *)(&(*___dst__P14s__anonymous19_1).__i__i_1)))=__i__i_1) /* ?{} */);
     555static inline void ___constructor__F_R14s__anonymous19i_autogen___1(struct __anonymous19 *___dst__R14s__anonymous19_1, int __i__i_1){
     556    ((void)((*___dst__R14s__anonymous19_1).__i__i_1=__i__i_1) /* ?{} */);
    557557}
    558558static inline volatile const struct __anonymous19 __f34__FCV14s__anonymous19___1();
     
    560560    int __i__i_1;
    561561};
    562 static inline void ___constructor__F_P14s__anonymous20_autogen___1(struct __anonymous20 *___dst__P14s__anonymous20_1);
    563 static inline void ___constructor__F_P14s__anonymous2014s__anonymous20_autogen___1(struct __anonymous20 *___dst__P14s__anonymous20_1, struct __anonymous20 ___src__14s__anonymous20_1);
    564 static inline void ___destructor__F_P14s__anonymous20_autogen___1(struct __anonymous20 *___dst__P14s__anonymous20_1);
    565 static inline struct __anonymous20 ___operator_assign__F14s__anonymous20_P14s__anonymous2014s__anonymous20_autogen___1(struct __anonymous20 *___dst__P14s__anonymous20_1, struct __anonymous20 ___src__14s__anonymous20_1);
    566 static inline void ___constructor__F_P14s__anonymous20_autogen___1(struct __anonymous20 *___dst__P14s__anonymous20_1){
    567     ((void)((*((int *)(&(*___dst__P14s__anonymous20_1).__i__i_1)))) /* ?{} */);
    568 }
    569 static inline void ___constructor__F_P14s__anonymous2014s__anonymous20_autogen___1(struct __anonymous20 *___dst__P14s__anonymous20_1, struct __anonymous20 ___src__14s__anonymous20_1){
    570     ((void)((*((int *)(&(*___dst__P14s__anonymous20_1).__i__i_1)))=___src__14s__anonymous20_1.__i__i_1) /* ?{} */);
    571 }
    572 static inline void ___destructor__F_P14s__anonymous20_autogen___1(struct __anonymous20 *___dst__P14s__anonymous20_1){
    573     ((void)((*((int *)(&(*___dst__P14s__anonymous20_1).__i__i_1)))) /* ^?{} */);
    574 }
    575 static inline struct __anonymous20 ___operator_assign__F14s__anonymous20_P14s__anonymous2014s__anonymous20_autogen___1(struct __anonymous20 *___dst__P14s__anonymous20_1, struct __anonymous20 ___src__14s__anonymous20_1){
     562static inline void ___constructor__F_R14s__anonymous20_autogen___1(struct __anonymous20 *___dst__R14s__anonymous20_1);
     563static inline void ___constructor__F_R14s__anonymous2014s__anonymous20_autogen___1(struct __anonymous20 *___dst__R14s__anonymous20_1, struct __anonymous20 ___src__14s__anonymous20_1);
     564static inline void ___destructor__F_R14s__anonymous20_autogen___1(struct __anonymous20 *___dst__R14s__anonymous20_1);
     565static inline struct __anonymous20 ___operator_assign__F14s__anonymous20_R14s__anonymous2014s__anonymous20_autogen___1(struct __anonymous20 *___dst__R14s__anonymous20_1, struct __anonymous20 ___src__14s__anonymous20_1);
     566static inline void ___constructor__F_R14s__anonymous20_autogen___1(struct __anonymous20 *___dst__R14s__anonymous20_1){
     567    ((void)((*___dst__R14s__anonymous20_1).__i__i_1) /* ?{} */);
     568}
     569static inline void ___constructor__F_R14s__anonymous2014s__anonymous20_autogen___1(struct __anonymous20 *___dst__R14s__anonymous20_1, struct __anonymous20 ___src__14s__anonymous20_1){
     570    ((void)((*___dst__R14s__anonymous20_1).__i__i_1=___src__14s__anonymous20_1.__i__i_1) /* ?{} */);
     571}
     572static inline void ___destructor__F_R14s__anonymous20_autogen___1(struct __anonymous20 *___dst__R14s__anonymous20_1){
     573    ((void)((*___dst__R14s__anonymous20_1).__i__i_1) /* ^?{} */);
     574}
     575static inline struct __anonymous20 ___operator_assign__F14s__anonymous20_R14s__anonymous2014s__anonymous20_autogen___1(struct __anonymous20 *___dst__R14s__anonymous20_1, struct __anonymous20 ___src__14s__anonymous20_1){
    576576    struct __anonymous20 ___ret__14s__anonymous20_1;
    577     ((void)((*___dst__P14s__anonymous20_1).__i__i_1=___src__14s__anonymous20_1.__i__i_1));
    578     ((void)___constructor__F_P14s__anonymous2014s__anonymous20_autogen___1((&___ret__14s__anonymous20_1), ___src__14s__anonymous20_1));
     577    ((void)((*___dst__R14s__anonymous20_1).__i__i_1=___src__14s__anonymous20_1.__i__i_1));
     578    ((void)___constructor__F_R14s__anonymous2014s__anonymous20_autogen___1((&___ret__14s__anonymous20_1), ___src__14s__anonymous20_1));
    579579    return ((struct __anonymous20 )___ret__14s__anonymous20_1);
    580580}
    581 static inline void ___constructor__F_P14s__anonymous20i_autogen___1(struct __anonymous20 *___dst__P14s__anonymous20_1, int __i__i_1){
    582     ((void)((*((int *)(&(*___dst__P14s__anonymous20_1).__i__i_1)))=__i__i_1) /* ?{} */);
     581static inline void ___constructor__F_R14s__anonymous20i_autogen___1(struct __anonymous20 *___dst__R14s__anonymous20_1, int __i__i_1){
     582    ((void)((*___dst__R14s__anonymous20_1).__i__i_1=__i__i_1) /* ?{} */);
    583583}
    584584static inline volatile const struct __anonymous20 __f35__FCV14s__anonymous20___1();
     
    586586    int __i__i_1;
    587587};
    588 static inline void ___constructor__F_P14s__anonymous21_autogen___1(struct __anonymous21 *___dst__P14s__anonymous21_1);
    589 static inline void ___constructor__F_P14s__anonymous2114s__anonymous21_autogen___1(struct __anonymous21 *___dst__P14s__anonymous21_1, struct __anonymous21 ___src__14s__anonymous21_1);
    590 static inline void ___destructor__F_P14s__anonymous21_autogen___1(struct __anonymous21 *___dst__P14s__anonymous21_1);
    591 static inline struct __anonymous21 ___operator_assign__F14s__anonymous21_P14s__anonymous2114s__anonymous21_autogen___1(struct __anonymous21 *___dst__P14s__anonymous21_1, struct __anonymous21 ___src__14s__anonymous21_1);
    592 static inline void ___constructor__F_P14s__anonymous21_autogen___1(struct __anonymous21 *___dst__P14s__anonymous21_1){
    593     ((void)((*((int *)(&(*___dst__P14s__anonymous21_1).__i__i_1)))) /* ?{} */);
    594 }
    595 static inline void ___constructor__F_P14s__anonymous2114s__anonymous21_autogen___1(struct __anonymous21 *___dst__P14s__anonymous21_1, struct __anonymous21 ___src__14s__anonymous21_1){
    596     ((void)((*((int *)(&(*___dst__P14s__anonymous21_1).__i__i_1)))=___src__14s__anonymous21_1.__i__i_1) /* ?{} */);
    597 }
    598 static inline void ___destructor__F_P14s__anonymous21_autogen___1(struct __anonymous21 *___dst__P14s__anonymous21_1){
    599     ((void)((*((int *)(&(*___dst__P14s__anonymous21_1).__i__i_1)))) /* ^?{} */);
    600 }
    601 static inline struct __anonymous21 ___operator_assign__F14s__anonymous21_P14s__anonymous2114s__anonymous21_autogen___1(struct __anonymous21 *___dst__P14s__anonymous21_1, struct __anonymous21 ___src__14s__anonymous21_1){
     588static inline void ___constructor__F_R14s__anonymous21_autogen___1(struct __anonymous21 *___dst__R14s__anonymous21_1);
     589static inline void ___constructor__F_R14s__anonymous2114s__anonymous21_autogen___1(struct __anonymous21 *___dst__R14s__anonymous21_1, struct __anonymous21 ___src__14s__anonymous21_1);
     590static inline void ___destructor__F_R14s__anonymous21_autogen___1(struct __anonymous21 *___dst__R14s__anonymous21_1);
     591static inline struct __anonymous21 ___operator_assign__F14s__anonymous21_R14s__anonymous2114s__anonymous21_autogen___1(struct __anonymous21 *___dst__R14s__anonymous21_1, struct __anonymous21 ___src__14s__anonymous21_1);
     592static inline void ___constructor__F_R14s__anonymous21_autogen___1(struct __anonymous21 *___dst__R14s__anonymous21_1){
     593    ((void)((*___dst__R14s__anonymous21_1).__i__i_1) /* ?{} */);
     594}
     595static inline void ___constructor__F_R14s__anonymous2114s__anonymous21_autogen___1(struct __anonymous21 *___dst__R14s__anonymous21_1, struct __anonymous21 ___src__14s__anonymous21_1){
     596    ((void)((*___dst__R14s__anonymous21_1).__i__i_1=___src__14s__anonymous21_1.__i__i_1) /* ?{} */);
     597}
     598static inline void ___destructor__F_R14s__anonymous21_autogen___1(struct __anonymous21 *___dst__R14s__anonymous21_1){
     599    ((void)((*___dst__R14s__anonymous21_1).__i__i_1) /* ^?{} */);
     600}
     601static inline struct __anonymous21 ___operator_assign__F14s__anonymous21_R14s__anonymous2114s__anonymous21_autogen___1(struct __anonymous21 *___dst__R14s__anonymous21_1, struct __anonymous21 ___src__14s__anonymous21_1){
    602602    struct __anonymous21 ___ret__14s__anonymous21_1;
    603     ((void)((*___dst__P14s__anonymous21_1).__i__i_1=___src__14s__anonymous21_1.__i__i_1));
    604     ((void)___constructor__F_P14s__anonymous2114s__anonymous21_autogen___1((&___ret__14s__anonymous21_1), ___src__14s__anonymous21_1));
     603    ((void)((*___dst__R14s__anonymous21_1).__i__i_1=___src__14s__anonymous21_1.__i__i_1));
     604    ((void)___constructor__F_R14s__anonymous2114s__anonymous21_autogen___1((&___ret__14s__anonymous21_1), ___src__14s__anonymous21_1));
    605605    return ((struct __anonymous21 )___ret__14s__anonymous21_1);
    606606}
    607 static inline void ___constructor__F_P14s__anonymous21i_autogen___1(struct __anonymous21 *___dst__P14s__anonymous21_1, int __i__i_1){
    608     ((void)((*((int *)(&(*___dst__P14s__anonymous21_1).__i__i_1)))=__i__i_1) /* ?{} */);
     607static inline void ___constructor__F_R14s__anonymous21i_autogen___1(struct __anonymous21 *___dst__R14s__anonymous21_1, int __i__i_1){
     608    ((void)((*___dst__R14s__anonymous21_1).__i__i_1=__i__i_1) /* ?{} */);
    609609}
    610610static inline volatile const struct __anonymous21 __f36__FCV14s__anonymous21___1();
     
    612612    int __i__i_1;
    613613};
    614 static inline void ___constructor__F_P14s__anonymous22_autogen___1(struct __anonymous22 *___dst__P14s__anonymous22_1);
    615 static inline void ___constructor__F_P14s__anonymous2214s__anonymous22_autogen___1(struct __anonymous22 *___dst__P14s__anonymous22_1, struct __anonymous22 ___src__14s__anonymous22_1);
    616 static inline void ___destructor__F_P14s__anonymous22_autogen___1(struct __anonymous22 *___dst__P14s__anonymous22_1);
    617 static inline struct __anonymous22 ___operator_assign__F14s__anonymous22_P14s__anonymous2214s__anonymous22_autogen___1(struct __anonymous22 *___dst__P14s__anonymous22_1, struct __anonymous22 ___src__14s__anonymous22_1);
    618 static inline void ___constructor__F_P14s__anonymous22_autogen___1(struct __anonymous22 *___dst__P14s__anonymous22_1){
    619     ((void)((*((int *)(&(*___dst__P14s__anonymous22_1).__i__i_1)))) /* ?{} */);
    620 }
    621 static inline void ___constructor__F_P14s__anonymous2214s__anonymous22_autogen___1(struct __anonymous22 *___dst__P14s__anonymous22_1, struct __anonymous22 ___src__14s__anonymous22_1){
    622     ((void)((*((int *)(&(*___dst__P14s__anonymous22_1).__i__i_1)))=___src__14s__anonymous22_1.__i__i_1) /* ?{} */);
    623 }
    624 static inline void ___destructor__F_P14s__anonymous22_autogen___1(struct __anonymous22 *___dst__P14s__anonymous22_1){
    625     ((void)((*((int *)(&(*___dst__P14s__anonymous22_1).__i__i_1)))) /* ^?{} */);
    626 }
    627 static inline struct __anonymous22 ___operator_assign__F14s__anonymous22_P14s__anonymous2214s__anonymous22_autogen___1(struct __anonymous22 *___dst__P14s__anonymous22_1, struct __anonymous22 ___src__14s__anonymous22_1){
     614static inline void ___constructor__F_R14s__anonymous22_autogen___1(struct __anonymous22 *___dst__R14s__anonymous22_1);
     615static inline void ___constructor__F_R14s__anonymous2214s__anonymous22_autogen___1(struct __anonymous22 *___dst__R14s__anonymous22_1, struct __anonymous22 ___src__14s__anonymous22_1);
     616static inline void ___destructor__F_R14s__anonymous22_autogen___1(struct __anonymous22 *___dst__R14s__anonymous22_1);
     617static inline struct __anonymous22 ___operator_assign__F14s__anonymous22_R14s__anonymous2214s__anonymous22_autogen___1(struct __anonymous22 *___dst__R14s__anonymous22_1, struct __anonymous22 ___src__14s__anonymous22_1);
     618static inline void ___constructor__F_R14s__anonymous22_autogen___1(struct __anonymous22 *___dst__R14s__anonymous22_1){
     619    ((void)((*___dst__R14s__anonymous22_1).__i__i_1) /* ?{} */);
     620}
     621static inline void ___constructor__F_R14s__anonymous2214s__anonymous22_autogen___1(struct __anonymous22 *___dst__R14s__anonymous22_1, struct __anonymous22 ___src__14s__anonymous22_1){
     622    ((void)((*___dst__R14s__anonymous22_1).__i__i_1=___src__14s__anonymous22_1.__i__i_1) /* ?{} */);
     623}
     624static inline void ___destructor__F_R14s__anonymous22_autogen___1(struct __anonymous22 *___dst__R14s__anonymous22_1){
     625    ((void)((*___dst__R14s__anonymous22_1).__i__i_1) /* ^?{} */);
     626}
     627static inline struct __anonymous22 ___operator_assign__F14s__anonymous22_R14s__anonymous2214s__anonymous22_autogen___1(struct __anonymous22 *___dst__R14s__anonymous22_1, struct __anonymous22 ___src__14s__anonymous22_1){
    628628    struct __anonymous22 ___ret__14s__anonymous22_1;
    629     ((void)((*___dst__P14s__anonymous22_1).__i__i_1=___src__14s__anonymous22_1.__i__i_1));
    630     ((void)___constructor__F_P14s__anonymous2214s__anonymous22_autogen___1((&___ret__14s__anonymous22_1), ___src__14s__anonymous22_1));
     629    ((void)((*___dst__R14s__anonymous22_1).__i__i_1=___src__14s__anonymous22_1.__i__i_1));
     630    ((void)___constructor__F_R14s__anonymous2214s__anonymous22_autogen___1((&___ret__14s__anonymous22_1), ___src__14s__anonymous22_1));
    631631    return ((struct __anonymous22 )___ret__14s__anonymous22_1);
    632632}
    633 static inline void ___constructor__F_P14s__anonymous22i_autogen___1(struct __anonymous22 *___dst__P14s__anonymous22_1, int __i__i_1){
    634     ((void)((*((int *)(&(*___dst__P14s__anonymous22_1).__i__i_1)))=__i__i_1) /* ?{} */);
     633static inline void ___constructor__F_R14s__anonymous22i_autogen___1(struct __anonymous22 *___dst__R14s__anonymous22_1, int __i__i_1){
     634    ((void)((*___dst__R14s__anonymous22_1).__i__i_1=__i__i_1) /* ?{} */);
    635635}
    636636static inline volatile const struct __anonymous22 __f37__FCV14s__anonymous22___1();
     
    638638    int __i__i_1;
    639639};
    640 static inline void ___constructor__F_P14s__anonymous23_autogen___1(struct __anonymous23 *___dst__P14s__anonymous23_1);
    641 static inline void ___constructor__F_P14s__anonymous2314s__anonymous23_autogen___1(struct __anonymous23 *___dst__P14s__anonymous23_1, struct __anonymous23 ___src__14s__anonymous23_1);
    642 static inline void ___destructor__F_P14s__anonymous23_autogen___1(struct __anonymous23 *___dst__P14s__anonymous23_1);
    643 static inline struct __anonymous23 ___operator_assign__F14s__anonymous23_P14s__anonymous2314s__anonymous23_autogen___1(struct __anonymous23 *___dst__P14s__anonymous23_1, struct __anonymous23 ___src__14s__anonymous23_1);
    644 static inline void ___constructor__F_P14s__anonymous23_autogen___1(struct __anonymous23 *___dst__P14s__anonymous23_1){
    645     ((void)((*((int *)(&(*___dst__P14s__anonymous23_1).__i__i_1)))) /* ?{} */);
    646 }
    647 static inline void ___constructor__F_P14s__anonymous2314s__anonymous23_autogen___1(struct __anonymous23 *___dst__P14s__anonymous23_1, struct __anonymous23 ___src__14s__anonymous23_1){
    648     ((void)((*((int *)(&(*___dst__P14s__anonymous23_1).__i__i_1)))=___src__14s__anonymous23_1.__i__i_1) /* ?{} */);
    649 }
    650 static inline void ___destructor__F_P14s__anonymous23_autogen___1(struct __anonymous23 *___dst__P14s__anonymous23_1){
    651     ((void)((*((int *)(&(*___dst__P14s__anonymous23_1).__i__i_1)))) /* ^?{} */);
    652 }
    653 static inline struct __anonymous23 ___operator_assign__F14s__anonymous23_P14s__anonymous2314s__anonymous23_autogen___1(struct __anonymous23 *___dst__P14s__anonymous23_1, struct __anonymous23 ___src__14s__anonymous23_1){
     640static inline void ___constructor__F_R14s__anonymous23_autogen___1(struct __anonymous23 *___dst__R14s__anonymous23_1);
     641static inline void ___constructor__F_R14s__anonymous2314s__anonymous23_autogen___1(struct __anonymous23 *___dst__R14s__anonymous23_1, struct __anonymous23 ___src__14s__anonymous23_1);
     642static inline void ___destructor__F_R14s__anonymous23_autogen___1(struct __anonymous23 *___dst__R14s__anonymous23_1);
     643static inline struct __anonymous23 ___operator_assign__F14s__anonymous23_R14s__anonymous2314s__anonymous23_autogen___1(struct __anonymous23 *___dst__R14s__anonymous23_1, struct __anonymous23 ___src__14s__anonymous23_1);
     644static inline void ___constructor__F_R14s__anonymous23_autogen___1(struct __anonymous23 *___dst__R14s__anonymous23_1){
     645    ((void)((*___dst__R14s__anonymous23_1).__i__i_1) /* ?{} */);
     646}
     647static inline void ___constructor__F_R14s__anonymous2314s__anonymous23_autogen___1(struct __anonymous23 *___dst__R14s__anonymous23_1, struct __anonymous23 ___src__14s__anonymous23_1){
     648    ((void)((*___dst__R14s__anonymous23_1).__i__i_1=___src__14s__anonymous23_1.__i__i_1) /* ?{} */);
     649}
     650static inline void ___destructor__F_R14s__anonymous23_autogen___1(struct __anonymous23 *___dst__R14s__anonymous23_1){
     651    ((void)((*___dst__R14s__anonymous23_1).__i__i_1) /* ^?{} */);
     652}
     653static inline struct __anonymous23 ___operator_assign__F14s__anonymous23_R14s__anonymous2314s__anonymous23_autogen___1(struct __anonymous23 *___dst__R14s__anonymous23_1, struct __anonymous23 ___src__14s__anonymous23_1){
    654654    struct __anonymous23 ___ret__14s__anonymous23_1;
    655     ((void)((*___dst__P14s__anonymous23_1).__i__i_1=___src__14s__anonymous23_1.__i__i_1));
    656     ((void)___constructor__F_P14s__anonymous2314s__anonymous23_autogen___1((&___ret__14s__anonymous23_1), ___src__14s__anonymous23_1));
     655    ((void)((*___dst__R14s__anonymous23_1).__i__i_1=___src__14s__anonymous23_1.__i__i_1));
     656    ((void)___constructor__F_R14s__anonymous2314s__anonymous23_autogen___1((&___ret__14s__anonymous23_1), ___src__14s__anonymous23_1));
    657657    return ((struct __anonymous23 )___ret__14s__anonymous23_1);
    658658}
    659 static inline void ___constructor__F_P14s__anonymous23i_autogen___1(struct __anonymous23 *___dst__P14s__anonymous23_1, int __i__i_1){
    660     ((void)((*((int *)(&(*___dst__P14s__anonymous23_1).__i__i_1)))=__i__i_1) /* ?{} */);
     659static inline void ___constructor__F_R14s__anonymous23i_autogen___1(struct __anonymous23 *___dst__R14s__anonymous23_1, int __i__i_1){
     660    ((void)((*___dst__R14s__anonymous23_1).__i__i_1=__i__i_1) /* ?{} */);
    661661}
    662662static inline volatile const struct __anonymous23 __f38__FCV14s__anonymous23___1();
     
    687687    __attribute__ ((unused)) int ___retval_main__i_1;
    688688    int _tmp_cp_ret0;
    689     ((void)(___retval_main__i_1=((_tmp_cp_ret0=invoke_main(__argc__i_1, __argv__PPc_1, __envp__PPc_1)) , _tmp_cp_ret0)) /* ?{} */);
    690     ((void)((*((int *)(&_tmp_cp_ret0)))) /* ^?{} */);
     689    ((void)(___retval_main__i_1=(((void)(_tmp_cp_ret0=invoke_main(__argc__i_1, __argv__PPc_1, __envp__PPc_1))) , _tmp_cp_ret0)) /* ?{} */);
     690    ((void)(_tmp_cp_ret0) /* ^?{} */);
    691691    return ((int )___retval_main__i_1);
    692692}
  • src/tests/.expect/32/extension.txt

    raf08051 r28e58fd  
    1313    __extension__ int __c__i_1;
    1414};
    15 static inline void ___constructor__F_P2sS_autogen___1(struct S *___dst__P2sS_1);
    16 static inline void ___constructor__F_P2sS2sS_autogen___1(struct S *___dst__P2sS_1, struct S ___src__2sS_1);
    17 static inline void ___destructor__F_P2sS_autogen___1(struct S *___dst__P2sS_1);
    18 static inline struct S ___operator_assign__F2sS_P2sS2sS_autogen___1(struct S *___dst__P2sS_1, struct S ___src__2sS_1);
    19 static inline void ___constructor__F_P2sS_autogen___1(struct S *___dst__P2sS_1){
    20     ((void)((*((int *)(&(*___dst__P2sS_1).__a__i_1)))) /* ?{} */);
    21     ((void)((*((int *)(&(*___dst__P2sS_1).__b__i_1)))) /* ?{} */);
    22     ((void)((*((int *)(&(*___dst__P2sS_1).__c__i_1)))) /* ?{} */);
     15static inline void ___constructor__F_R2sS_autogen___1(struct S *___dst__R2sS_1);
     16static inline void ___constructor__F_R2sS2sS_autogen___1(struct S *___dst__R2sS_1, struct S ___src__2sS_1);
     17static inline void ___destructor__F_R2sS_autogen___1(struct S *___dst__R2sS_1);
     18static inline struct S ___operator_assign__F2sS_R2sS2sS_autogen___1(struct S *___dst__R2sS_1, struct S ___src__2sS_1);
     19static inline void ___constructor__F_R2sS_autogen___1(struct S *___dst__R2sS_1){
     20    ((void)((*___dst__R2sS_1).__a__i_1) /* ?{} */);
     21    ((void)((*___dst__R2sS_1).__b__i_1) /* ?{} */);
     22    ((void)((*___dst__R2sS_1).__c__i_1) /* ?{} */);
    2323}
    24 static inline void ___constructor__F_P2sS2sS_autogen___1(struct S *___dst__P2sS_1, struct S ___src__2sS_1){
    25     ((void)((*((int *)(&(*___dst__P2sS_1).__a__i_1)))=___src__2sS_1.__a__i_1) /* ?{} */);
    26     ((void)((*((int *)(&(*___dst__P2sS_1).__b__i_1)))=___src__2sS_1.__b__i_1) /* ?{} */);
    27     ((void)((*((int *)(&(*___dst__P2sS_1).__c__i_1)))=___src__2sS_1.__c__i_1) /* ?{} */);
     24static inline void ___constructor__F_R2sS2sS_autogen___1(struct S *___dst__R2sS_1, struct S ___src__2sS_1){
     25    ((void)((*___dst__R2sS_1).__a__i_1=___src__2sS_1.__a__i_1) /* ?{} */);
     26    ((void)((*___dst__R2sS_1).__b__i_1=___src__2sS_1.__b__i_1) /* ?{} */);
     27    ((void)((*___dst__R2sS_1).__c__i_1=___src__2sS_1.__c__i_1) /* ?{} */);
    2828}
    29 static inline void ___destructor__F_P2sS_autogen___1(struct S *___dst__P2sS_1){
    30     ((void)((*((int *)(&(*___dst__P2sS_1).__c__i_1)))) /* ^?{} */);
    31     ((void)((*((int *)(&(*___dst__P2sS_1).__b__i_1)))) /* ^?{} */);
    32     ((void)((*((int *)(&(*___dst__P2sS_1).__a__i_1)))) /* ^?{} */);
     29static inline void ___destructor__F_R2sS_autogen___1(struct S *___dst__R2sS_1){
     30    ((void)((*___dst__R2sS_1).__c__i_1) /* ^?{} */);
     31    ((void)((*___dst__R2sS_1).__b__i_1) /* ^?{} */);
     32    ((void)((*___dst__R2sS_1).__a__i_1) /* ^?{} */);
    3333}
    34 static inline struct S ___operator_assign__F2sS_P2sS2sS_autogen___1(struct S *___dst__P2sS_1, struct S ___src__2sS_1){
     34static inline struct S ___operator_assign__F2sS_R2sS2sS_autogen___1(struct S *___dst__R2sS_1, struct S ___src__2sS_1){
    3535    struct S ___ret__2sS_1;
    36     ((void)((*___dst__P2sS_1).__a__i_1=___src__2sS_1.__a__i_1));
    37     ((void)((*___dst__P2sS_1).__b__i_1=___src__2sS_1.__b__i_1));
    38     ((void)((*___dst__P2sS_1).__c__i_1=___src__2sS_1.__c__i_1));
    39     ((void)___constructor__F_P2sS2sS_autogen___1((&___ret__2sS_1), ___src__2sS_1));
     36    ((void)((*___dst__R2sS_1).__a__i_1=___src__2sS_1.__a__i_1));
     37    ((void)((*___dst__R2sS_1).__b__i_1=___src__2sS_1.__b__i_1));
     38    ((void)((*___dst__R2sS_1).__c__i_1=___src__2sS_1.__c__i_1));
     39    ((void)___constructor__F_R2sS2sS_autogen___1((&___ret__2sS_1), ___src__2sS_1));
    4040    return ((struct S )___ret__2sS_1);
    4141}
    42 static inline void ___constructor__F_P2sSi_autogen___1(struct S *___dst__P2sS_1, int __a__i_1){
    43     ((void)((*((int *)(&(*___dst__P2sS_1).__a__i_1)))=__a__i_1) /* ?{} */);
    44     ((void)((*((int *)(&(*___dst__P2sS_1).__b__i_1)))) /* ?{} */);
    45     ((void)((*((int *)(&(*___dst__P2sS_1).__c__i_1)))) /* ?{} */);
     42static inline void ___constructor__F_R2sSi_autogen___1(struct S *___dst__R2sS_1, int __a__i_1){
     43    ((void)((*___dst__R2sS_1).__a__i_1=__a__i_1) /* ?{} */);
     44    ((void)((*___dst__R2sS_1).__b__i_1) /* ?{} */);
     45    ((void)((*___dst__R2sS_1).__c__i_1) /* ?{} */);
    4646}
    47 static inline void ___constructor__F_P2sSii_autogen___1(struct S *___dst__P2sS_1, int __a__i_1, int __b__i_1){
    48     ((void)((*((int *)(&(*___dst__P2sS_1).__a__i_1)))=__a__i_1) /* ?{} */);
    49     ((void)((*((int *)(&(*___dst__P2sS_1).__b__i_1)))=__b__i_1) /* ?{} */);
    50     ((void)((*((int *)(&(*___dst__P2sS_1).__c__i_1)))) /* ?{} */);
     47static inline void ___constructor__F_R2sSii_autogen___1(struct S *___dst__R2sS_1, int __a__i_1, int __b__i_1){
     48    ((void)((*___dst__R2sS_1).__a__i_1=__a__i_1) /* ?{} */);
     49    ((void)((*___dst__R2sS_1).__b__i_1=__b__i_1) /* ?{} */);
     50    ((void)((*___dst__R2sS_1).__c__i_1) /* ?{} */);
    5151}
    52 static inline void ___constructor__F_P2sSiii_autogen___1(struct S *___dst__P2sS_1, int __a__i_1, int __b__i_1, int __c__i_1){
    53     ((void)((*((int *)(&(*___dst__P2sS_1).__a__i_1)))=__a__i_1) /* ?{} */);
    54     ((void)((*((int *)(&(*___dst__P2sS_1).__b__i_1)))=__b__i_1) /* ?{} */);
    55     ((void)((*((int *)(&(*___dst__P2sS_1).__c__i_1)))=__c__i_1) /* ?{} */);
     52static inline void ___constructor__F_R2sSiii_autogen___1(struct S *___dst__R2sS_1, int __a__i_1, int __b__i_1, int __c__i_1){
     53    ((void)((*___dst__R2sS_1).__a__i_1=__a__i_1) /* ?{} */);
     54    ((void)((*___dst__R2sS_1).__b__i_1=__b__i_1) /* ?{} */);
     55    ((void)((*___dst__R2sS_1).__c__i_1=__c__i_1) /* ?{} */);
    5656}
    5757__extension__ union U {
     
    6060    __extension__ int __c__i_1;
    6161};
    62 static inline void ___constructor__F_P2uU_autogen___1(union U *___dst__P2uU_1){
     62static inline void ___constructor__F_R2uU_autogen___1(__attribute__ ((unused)) union U *___dst__R2uU_1){
    6363}
    64 static inline void ___constructor__F_P2uU2uU_autogen___1(union U *___dst__P2uU_1, union U ___src__2uU_1){
    65     ((void)__builtin_memcpy(((void *)___dst__P2uU_1), ((const void *)(&___src__2uU_1)), sizeof(union U )));
     64static inline void ___constructor__F_R2uU2uU_autogen___1(union U *___dst__R2uU_1, union U ___src__2uU_1){
     65    ((void)__builtin_memcpy(((void *)___dst__R2uU_1), ((const void *)(&___src__2uU_1)), sizeof(union U )));
    6666}
    67 static inline void ___destructor__F_P2uU_autogen___1(union U *___dst__P2uU_1){
     67static inline void ___destructor__F_R2uU_autogen___1(__attribute__ ((unused)) union U *___dst__R2uU_1){
    6868}
    69 static inline union U ___operator_assign__F2uU_P2uU2uU_autogen___1(union U *___dst__P2uU_1, union U ___src__2uU_1){
     69static inline union U ___operator_assign__F2uU_R2uU2uU_autogen___1(union U *___dst__R2uU_1, union U ___src__2uU_1){
    7070    union U ___ret__2uU_1;
    71     ((void)__builtin_memcpy(((void *)___dst__P2uU_1), ((const void *)(&___src__2uU_1)), sizeof(union U )));
    72     ((void)___constructor__F_P2uU2uU_autogen___1((&___ret__2uU_1), ___src__2uU_1));
     71    ((void)__builtin_memcpy(((void *)___dst__R2uU_1), ((const void *)(&___src__2uU_1)), sizeof(union U )));
     72    ((void)___constructor__F_R2uU2uU_autogen___1((&___ret__2uU_1), ___src__2uU_1));
    7373    return ((union U )___ret__2uU_1);
    7474}
    75 static inline void ___constructor__F_P2uUi_autogen___1(union U *___dst__P2uU_1, int __src__i_1){
    76     ((void)__builtin_memcpy(((void *)___dst__P2uU_1), ((const void *)(&__src__i_1)), sizeof(int )));
     75static inline void ___constructor__F_R2uUi_autogen___1(__attribute__ ((unused)) union U *___dst__R2uU_1, int __src__i_1){
     76    ((void)__builtin_memcpy(((void *)___dst__R2uU_1), ((const void *)(&__src__i_1)), sizeof(int )));
    7777}
    7878__extension__ enum E {
     
    102102    ((void)(__extension__ __a__i_2=(__extension__ __b__i_2+__extension__ __c__i_2)));
    103103    int _tmp_cp_ret0;
    104     ((void)((_tmp_cp_ret0=__extension__ __fred__Fi_i__1(3)) , _tmp_cp_ret0));
    105     ((void)((*((int *)(&_tmp_cp_ret0)))) /* ^?{} */);
     104    ((void)(((void)(_tmp_cp_ret0=__extension__ __fred__Fi_i__1(3))) , _tmp_cp_ret0));
     105    ((void)(_tmp_cp_ret0) /* ^?{} */);
    106106    __extension__ int __mary__Fi_i__2(int __p__i_2){
    107107        __attribute__ ((unused)) int ___retval_mary__i_2;
     
    113113    ((void)(((int )((__extension__ __a__i_2>__extension__ __b__i_2)!=((int )0))) ? __extension__ __c__i_2 : __extension__ __c__i_2));
    114114    ((void)(__extension__ __a__i_2=__extension__ (__extension__ __b__i_2+__extension__ __c__i_2)));
    115     ((void)((__extension__ __a__i_2 , __extension__ __b__i_2) , __extension__ __c__i_2));
     115    ((void)(((void)(((void)__extension__ __a__i_2) , __extension__ __b__i_2)) , __extension__ __c__i_2));
    116116}
  • src/tests/.expect/32/gccExtensions.txt

    raf08051 r28e58fd  
    4343        __extension__ int __c__i_2;
    4444    };
    45     inline void ___constructor__F_P2sS_autogen___2(struct S *___dst__P2sS_2){
    46         ((void)((*((int *)(&(*___dst__P2sS_2).__a__i_2)))) /* ?{} */);
    47         ((void)((*((int *)(&(*___dst__P2sS_2).__b__i_2)))) /* ?{} */);
    48         ((void)((*((int *)(&(*___dst__P2sS_2).__c__i_2)))) /* ?{} */);
     45    inline void ___constructor__F_R2sS_autogen___2(struct S *___dst__R2sS_2){
     46        ((void)((*___dst__R2sS_2).__a__i_2) /* ?{} */);
     47        ((void)((*___dst__R2sS_2).__b__i_2) /* ?{} */);
     48        ((void)((*___dst__R2sS_2).__c__i_2) /* ?{} */);
    4949    }
    50     inline void ___constructor__F_P2sS2sS_autogen___2(struct S *___dst__P2sS_2, struct S ___src__2sS_2){
    51         ((void)((*((int *)(&(*___dst__P2sS_2).__a__i_2)))=___src__2sS_2.__a__i_2) /* ?{} */);
    52         ((void)((*((int *)(&(*___dst__P2sS_2).__b__i_2)))=___src__2sS_2.__b__i_2) /* ?{} */);
    53         ((void)((*((int *)(&(*___dst__P2sS_2).__c__i_2)))=___src__2sS_2.__c__i_2) /* ?{} */);
     50    inline void ___constructor__F_R2sS2sS_autogen___2(struct S *___dst__R2sS_2, struct S ___src__2sS_2){
     51        ((void)((*___dst__R2sS_2).__a__i_2=___src__2sS_2.__a__i_2) /* ?{} */);
     52        ((void)((*___dst__R2sS_2).__b__i_2=___src__2sS_2.__b__i_2) /* ?{} */);
     53        ((void)((*___dst__R2sS_2).__c__i_2=___src__2sS_2.__c__i_2) /* ?{} */);
    5454    }
    55     inline void ___destructor__F_P2sS_autogen___2(struct S *___dst__P2sS_2){
    56         ((void)((*((int *)(&(*___dst__P2sS_2).__c__i_2)))) /* ^?{} */);
    57         ((void)((*((int *)(&(*___dst__P2sS_2).__b__i_2)))) /* ^?{} */);
    58         ((void)((*((int *)(&(*___dst__P2sS_2).__a__i_2)))) /* ^?{} */);
     55    inline void ___destructor__F_R2sS_autogen___2(struct S *___dst__R2sS_2){
     56        ((void)((*___dst__R2sS_2).__c__i_2) /* ^?{} */);
     57        ((void)((*___dst__R2sS_2).__b__i_2) /* ^?{} */);
     58        ((void)((*___dst__R2sS_2).__a__i_2) /* ^?{} */);
    5959    }
    60     inline struct S ___operator_assign__F2sS_P2sS2sS_autogen___2(struct S *___dst__P2sS_2, struct S ___src__2sS_2){
     60    inline struct S ___operator_assign__F2sS_R2sS2sS_autogen___2(struct S *___dst__R2sS_2, struct S ___src__2sS_2){
    6161        struct S ___ret__2sS_2;
    62         ((void)((*___dst__P2sS_2).__a__i_2=___src__2sS_2.__a__i_2));
    63         ((void)((*___dst__P2sS_2).__b__i_2=___src__2sS_2.__b__i_2));
    64         ((void)((*___dst__P2sS_2).__c__i_2=___src__2sS_2.__c__i_2));
    65         ((void)___constructor__F_P2sS2sS_autogen___2((&___ret__2sS_2), ___src__2sS_2));
     62        ((void)((*___dst__R2sS_2).__a__i_2=___src__2sS_2.__a__i_2));
     63        ((void)((*___dst__R2sS_2).__b__i_2=___src__2sS_2.__b__i_2));
     64        ((void)((*___dst__R2sS_2).__c__i_2=___src__2sS_2.__c__i_2));
     65        ((void)___constructor__F_R2sS2sS_autogen___2((&___ret__2sS_2), ___src__2sS_2));
    6666        return ((struct S )___ret__2sS_2);
    6767    }
    68     inline void ___constructor__F_P2sSi_autogen___2(struct S *___dst__P2sS_2, int __a__i_2){
    69         ((void)((*((int *)(&(*___dst__P2sS_2).__a__i_2)))=__a__i_2) /* ?{} */);
    70         ((void)((*((int *)(&(*___dst__P2sS_2).__b__i_2)))) /* ?{} */);
    71         ((void)((*((int *)(&(*___dst__P2sS_2).__c__i_2)))) /* ?{} */);
     68    inline void ___constructor__F_R2sSi_autogen___2(struct S *___dst__R2sS_2, int __a__i_2){
     69        ((void)((*___dst__R2sS_2).__a__i_2=__a__i_2) /* ?{} */);
     70        ((void)((*___dst__R2sS_2).__b__i_2) /* ?{} */);
     71        ((void)((*___dst__R2sS_2).__c__i_2) /* ?{} */);
    7272    }
    73     inline void ___constructor__F_P2sSii_autogen___2(struct S *___dst__P2sS_2, int __a__i_2, int __b__i_2){
    74         ((void)((*((int *)(&(*___dst__P2sS_2).__a__i_2)))=__a__i_2) /* ?{} */);
    75         ((void)((*((int *)(&(*___dst__P2sS_2).__b__i_2)))=__b__i_2) /* ?{} */);
    76         ((void)((*((int *)(&(*___dst__P2sS_2).__c__i_2)))) /* ?{} */);
     73    inline void ___constructor__F_R2sSii_autogen___2(struct S *___dst__R2sS_2, int __a__i_2, int __b__i_2){
     74        ((void)((*___dst__R2sS_2).__a__i_2=__a__i_2) /* ?{} */);
     75        ((void)((*___dst__R2sS_2).__b__i_2=__b__i_2) /* ?{} */);
     76        ((void)((*___dst__R2sS_2).__c__i_2) /* ?{} */);
    7777    }
    78     inline void ___constructor__F_P2sSiii_autogen___2(struct S *___dst__P2sS_2, int __a__i_2, int __b__i_2, int __c__i_2){
    79         ((void)((*((int *)(&(*___dst__P2sS_2).__a__i_2)))=__a__i_2) /* ?{} */);
    80         ((void)((*((int *)(&(*___dst__P2sS_2).__b__i_2)))=__b__i_2) /* ?{} */);
    81         ((void)((*((int *)(&(*___dst__P2sS_2).__c__i_2)))=__c__i_2) /* ?{} */);
     78    inline void ___constructor__F_R2sSiii_autogen___2(struct S *___dst__R2sS_2, int __a__i_2, int __b__i_2, int __c__i_2){
     79        ((void)((*___dst__R2sS_2).__a__i_2=__a__i_2) /* ?{} */);
     80        ((void)((*___dst__R2sS_2).__b__i_2=__b__i_2) /* ?{} */);
     81        ((void)((*___dst__R2sS_2).__c__i_2=__c__i_2) /* ?{} */);
    8282    }
    8383    int __i__i_2 = ((int )__extension__ 3);
     
    8585    __extension__ int __b__i_2;
    8686    __extension__ int __c__i_2;
    87     ((void)((__extension__ __a__i_2 , __extension__ __b__i_2) , __extension__ __c__i_2));
     87    ((void)(((void)(((void)__extension__ __a__i_2) , __extension__ __b__i_2)) , __extension__ __c__i_2));
    8888    ((void)(__extension__ __a__i_2=(__extension__ __b__i_2+__extension__ __c__i_2)));
    8989    ((void)(__extension__ __a__i_2=__extension__ (__extension__ __b__i_2+__extension__ __c__i_2)));
     
    101101        int __i__i_2;
    102102    };
    103     inline void ___constructor__F_P3ss2_autogen___2(struct s2 *___dst__P3ss2_2){
    104         ((void)((*((int *)(&(*___dst__P3ss2_2).__i__i_2)))) /* ?{} */);
     103    inline void ___constructor__F_R3ss2_autogen___2(struct s2 *___dst__R3ss2_2){
     104        ((void)((*___dst__R3ss2_2).__i__i_2) /* ?{} */);
    105105    }
    106     inline void ___constructor__F_P3ss23ss2_autogen___2(struct s2 *___dst__P3ss2_2, struct s2 ___src__3ss2_2){
    107         ((void)((*((int *)(&(*___dst__P3ss2_2).__i__i_2)))=___src__3ss2_2.__i__i_2) /* ?{} */);
     106    inline void ___constructor__F_R3ss23ss2_autogen___2(struct s2 *___dst__R3ss2_2, struct s2 ___src__3ss2_2){
     107        ((void)((*___dst__R3ss2_2).__i__i_2=___src__3ss2_2.__i__i_2) /* ?{} */);
    108108    }
    109     inline void ___destructor__F_P3ss2_autogen___2(struct s2 *___dst__P3ss2_2){
    110         ((void)((*((int *)(&(*___dst__P3ss2_2).__i__i_2)))) /* ^?{} */);
     109    inline void ___destructor__F_R3ss2_autogen___2(struct s2 *___dst__R3ss2_2){
     110        ((void)((*___dst__R3ss2_2).__i__i_2) /* ^?{} */);
    111111    }
    112     inline struct s2 ___operator_assign__F3ss2_P3ss23ss2_autogen___2(struct s2 *___dst__P3ss2_2, struct s2 ___src__3ss2_2){
     112    inline struct s2 ___operator_assign__F3ss2_R3ss23ss2_autogen___2(struct s2 *___dst__R3ss2_2, struct s2 ___src__3ss2_2){
    113113        struct s2 ___ret__3ss2_2;
    114         ((void)((*___dst__P3ss2_2).__i__i_2=___src__3ss2_2.__i__i_2));
    115         ((void)___constructor__F_P3ss23ss2_autogen___2((&___ret__3ss2_2), ___src__3ss2_2));
     114        ((void)((*___dst__R3ss2_2).__i__i_2=___src__3ss2_2.__i__i_2));
     115        ((void)___constructor__F_R3ss23ss2_autogen___2((&___ret__3ss2_2), ___src__3ss2_2));
    116116        return ((struct s2 )___ret__3ss2_2);
    117117    }
    118     inline void ___constructor__F_P3ss2i_autogen___2(struct s2 *___dst__P3ss2_2, int __i__i_2){
    119         ((void)((*((int *)(&(*___dst__P3ss2_2).__i__i_2)))=__i__i_2) /* ?{} */);
     118    inline void ___constructor__F_R3ss2i_autogen___2(struct s2 *___dst__R3ss2_2, int __i__i_2){
     119        ((void)((*___dst__R3ss2_2).__i__i_2=__i__i_2) /* ?{} */);
    120120    }
    121121    struct s3 {
    122122        int __i__i_2;
    123123    };
    124     inline void ___constructor__F_P3ss3_autogen___2(struct s3 *___dst__P3ss3_2){
    125         ((void)((*((int *)(&(*___dst__P3ss3_2).__i__i_2)))) /* ?{} */);
     124    inline void ___constructor__F_R3ss3_autogen___2(struct s3 *___dst__R3ss3_2){
     125        ((void)((*___dst__R3ss3_2).__i__i_2) /* ?{} */);
    126126    }
    127     inline void ___constructor__F_P3ss33ss3_autogen___2(struct s3 *___dst__P3ss3_2, struct s3 ___src__3ss3_2){
    128         ((void)((*((int *)(&(*___dst__P3ss3_2).__i__i_2)))=___src__3ss3_2.__i__i_2) /* ?{} */);
     127    inline void ___constructor__F_R3ss33ss3_autogen___2(struct s3 *___dst__R3ss3_2, struct s3 ___src__3ss3_2){
     128        ((void)((*___dst__R3ss3_2).__i__i_2=___src__3ss3_2.__i__i_2) /* ?{} */);
    129129    }
    130     inline void ___destructor__F_P3ss3_autogen___2(struct s3 *___dst__P3ss3_2){
    131         ((void)((*((int *)(&(*___dst__P3ss3_2).__i__i_2)))) /* ^?{} */);
     130    inline void ___destructor__F_R3ss3_autogen___2(struct s3 *___dst__R3ss3_2){
     131        ((void)((*___dst__R3ss3_2).__i__i_2) /* ^?{} */);
    132132    }
    133     inline struct s3 ___operator_assign__F3ss3_P3ss33ss3_autogen___2(struct s3 *___dst__P3ss3_2, struct s3 ___src__3ss3_2){
     133    inline struct s3 ___operator_assign__F3ss3_R3ss33ss3_autogen___2(struct s3 *___dst__R3ss3_2, struct s3 ___src__3ss3_2){
    134134        struct s3 ___ret__3ss3_2;
    135         ((void)((*___dst__P3ss3_2).__i__i_2=___src__3ss3_2.__i__i_2));
    136         ((void)___constructor__F_P3ss33ss3_autogen___2((&___ret__3ss3_2), ___src__3ss3_2));
     135        ((void)((*___dst__R3ss3_2).__i__i_2=___src__3ss3_2.__i__i_2));
     136        ((void)___constructor__F_R3ss33ss3_autogen___2((&___ret__3ss3_2), ___src__3ss3_2));
    137137        return ((struct s3 )___ret__3ss3_2);
    138138    }
    139     inline void ___constructor__F_P3ss3i_autogen___2(struct s3 *___dst__P3ss3_2, int __i__i_2){
    140         ((void)((*((int *)(&(*___dst__P3ss3_2).__i__i_2)))=__i__i_2) /* ?{} */);
     139    inline void ___constructor__F_R3ss3i_autogen___2(struct s3 *___dst__R3ss3_2, int __i__i_2){
     140        ((void)((*___dst__R3ss3_2).__i__i_2=__i__i_2) /* ?{} */);
    141141    }
    142142    struct s3 __x1__3ss3_2;
     
    145145        int __i__i_2;
    146146    };
    147     inline void ___constructor__F_P3ss4_autogen___2(struct s4 *___dst__P3ss4_2){
    148         ((void)((*((int *)(&(*___dst__P3ss4_2).__i__i_2)))) /* ?{} */);
     147    inline void ___constructor__F_R3ss4_autogen___2(struct s4 *___dst__R3ss4_2){
     148        ((void)((*___dst__R3ss4_2).__i__i_2) /* ?{} */);
    149149    }
    150     inline void ___constructor__F_P3ss43ss4_autogen___2(struct s4 *___dst__P3ss4_2, struct s4 ___src__3ss4_2){
    151         ((void)((*((int *)(&(*___dst__P3ss4_2).__i__i_2)))=___src__3ss4_2.__i__i_2) /* ?{} */);
     150    inline void ___constructor__F_R3ss43ss4_autogen___2(struct s4 *___dst__R3ss4_2, struct s4 ___src__3ss4_2){
     151        ((void)((*___dst__R3ss4_2).__i__i_2=___src__3ss4_2.__i__i_2) /* ?{} */);
    152152    }
    153     inline void ___destructor__F_P3ss4_autogen___2(struct s4 *___dst__P3ss4_2){
    154         ((void)((*((int *)(&(*___dst__P3ss4_2).__i__i_2)))) /* ^?{} */);
     153    inline void ___destructor__F_R3ss4_autogen___2(struct s4 *___dst__R3ss4_2){
     154        ((void)((*___dst__R3ss4_2).__i__i_2) /* ^?{} */);
    155155    }
    156     inline struct s4 ___operator_assign__F3ss4_P3ss43ss4_autogen___2(struct s4 *___dst__P3ss4_2, struct s4 ___src__3ss4_2){
     156    inline struct s4 ___operator_assign__F3ss4_R3ss43ss4_autogen___2(struct s4 *___dst__R3ss4_2, struct s4 ___src__3ss4_2){
    157157        struct s4 ___ret__3ss4_2;
    158         ((void)((*___dst__P3ss4_2).__i__i_2=___src__3ss4_2.__i__i_2));
    159         ((void)___constructor__F_P3ss43ss4_autogen___2((&___ret__3ss4_2), ___src__3ss4_2));
     158        ((void)((*___dst__R3ss4_2).__i__i_2=___src__3ss4_2.__i__i_2));
     159        ((void)___constructor__F_R3ss43ss4_autogen___2((&___ret__3ss4_2), ___src__3ss4_2));
    160160        return ((struct s4 )___ret__3ss4_2);
    161161    }
    162     inline void ___constructor__F_P3ss4i_autogen___2(struct s4 *___dst__P3ss4_2, int __i__i_2){
    163         ((void)((*((int *)(&(*___dst__P3ss4_2).__i__i_2)))=__i__i_2) /* ?{} */);
     162    inline void ___constructor__F_R3ss4i_autogen___2(struct s4 *___dst__R3ss4_2, int __i__i_2){
     163        ((void)((*___dst__R3ss4_2).__i__i_2=__i__i_2) /* ?{} */);
    164164    }
    165165    struct s4 __x2__3ss4_2;
     
    184184    __attribute__ ((unused)) int ___retval_main__i_1;
    185185    int _tmp_cp_ret0;
    186     ((void)(___retval_main__i_1=((_tmp_cp_ret0=invoke_main(__argc__i_1, __argv__PPc_1, __envp__PPc_1)) , _tmp_cp_ret0)) /* ?{} */);
    187     ((void)((*((int *)(&_tmp_cp_ret0)))) /* ^?{} */);
     186    ((void)(___retval_main__i_1=(((void)(_tmp_cp_ret0=invoke_main(__argc__i_1, __argv__PPc_1, __envp__PPc_1))) , _tmp_cp_ret0)) /* ?{} */);
     187    ((void)(_tmp_cp_ret0) /* ^?{} */);
    188188    return ((int )___retval_main__i_1);
    189189}
  • src/tests/.expect/64/KRfunctions.txt

    raf08051 r28e58fd  
    1717    int __i__i_1;
    1818};
    19 static inline void ___constructor__F_P2sS_autogen___1(struct S *___dst__P2sS_1);
    20 static inline void ___constructor__F_P2sS2sS_autogen___1(struct S *___dst__P2sS_1, struct S ___src__2sS_1);
    21 static inline void ___destructor__F_P2sS_autogen___1(struct S *___dst__P2sS_1);
    22 static inline struct S ___operator_assign__F2sS_P2sS2sS_autogen___1(struct S *___dst__P2sS_1, struct S ___src__2sS_1);
    23 static inline void ___constructor__F_P2sS_autogen___1(struct S *___dst__P2sS_1){
    24     ((void)((*((int *)(&(*___dst__P2sS_1).__i__i_1)))) /* ?{} */);
     19static inline void ___constructor__F_R2sS_autogen___1(struct S *___dst__R2sS_1);
     20static inline void ___constructor__F_R2sS2sS_autogen___1(struct S *___dst__R2sS_1, struct S ___src__2sS_1);
     21static inline void ___destructor__F_R2sS_autogen___1(struct S *___dst__R2sS_1);
     22static inline struct S ___operator_assign__F2sS_R2sS2sS_autogen___1(struct S *___dst__R2sS_1, struct S ___src__2sS_1);
     23static inline void ___constructor__F_R2sS_autogen___1(struct S *___dst__R2sS_1){
     24    ((void)((*___dst__R2sS_1).__i__i_1) /* ?{} */);
    2525}
    26 static inline void ___constructor__F_P2sS2sS_autogen___1(struct S *___dst__P2sS_1, struct S ___src__2sS_1){
    27     ((void)((*((int *)(&(*___dst__P2sS_1).__i__i_1)))=___src__2sS_1.__i__i_1) /* ?{} */);
     26static inline void ___constructor__F_R2sS2sS_autogen___1(struct S *___dst__R2sS_1, struct S ___src__2sS_1){
     27    ((void)((*___dst__R2sS_1).__i__i_1=___src__2sS_1.__i__i_1) /* ?{} */);
    2828}
    29 static inline void ___destructor__F_P2sS_autogen___1(struct S *___dst__P2sS_1){
    30     ((void)((*((int *)(&(*___dst__P2sS_1).__i__i_1)))) /* ^?{} */);
     29static inline void ___destructor__F_R2sS_autogen___1(struct S *___dst__R2sS_1){
     30    ((void)((*___dst__R2sS_1).__i__i_1) /* ^?{} */);
    3131}
    32 static inline struct S ___operator_assign__F2sS_P2sS2sS_autogen___1(struct S *___dst__P2sS_1, struct S ___src__2sS_1){
     32static inline struct S ___operator_assign__F2sS_R2sS2sS_autogen___1(struct S *___dst__R2sS_1, struct S ___src__2sS_1){
    3333    struct S ___ret__2sS_1;
    34     ((void)((*___dst__P2sS_1).__i__i_1=___src__2sS_1.__i__i_1));
    35     ((void)___constructor__F_P2sS2sS_autogen___1((&___ret__2sS_1), ___src__2sS_1));
     34    ((void)((*___dst__R2sS_1).__i__i_1=___src__2sS_1.__i__i_1));
     35    ((void)___constructor__F_R2sS2sS_autogen___1((&___ret__2sS_1), ___src__2sS_1));
    3636    return ((struct S )___ret__2sS_1);
    3737}
    38 static inline void ___constructor__F_P2sSi_autogen___1(struct S *___dst__P2sS_1, int __i__i_1){
    39     ((void)((*((int *)(&(*___dst__P2sS_1).__i__i_1)))=__i__i_1) /* ?{} */);
     38static inline void ___constructor__F_R2sSi_autogen___1(struct S *___dst__R2sS_1, int __i__i_1){
     39    ((void)((*___dst__R2sS_1).__i__i_1=__i__i_1) /* ?{} */);
    4040}
    4141int __f3__Fi_2sS2sSPi__1(struct S __a__2sS_1, struct S __b__2sS_1, int *__c__Pi_1){
     
    8888    int __b__i_2;
    8989    int *(*_tmp_cp_ret0)(int __x__i_1, int __y__i_1);
    90     ((void)(__x__PFPi_ii__2=((_tmp_cp_ret0=__f10__FPFPi_ii__iPiPid__1(3, (&__a__i_2), (&__b__i_2), 3.5)) , _tmp_cp_ret0)));
    91     ((void)((*((int *(**)(int __x__i_1, int __y__i_1))(&_tmp_cp_ret0)))) /* ^?{} */);
     90    ((void)(__x__PFPi_ii__2=(((void)(_tmp_cp_ret0=__f10__FPFPi_ii__iPiPid__1(3, (&__a__i_2), (&__b__i_2), 3.5))) , _tmp_cp_ret0)));
     91    ((void)(_tmp_cp_ret0) /* ^?{} */);
    9292    const int __f1__FCi_iPiPi__2(int __a__i_2, int *__b__Pi_2, int *__c__Pi_2){
    9393        __attribute__ ((unused)) const int ___retval_f1__Ci_2;
  • src/tests/.expect/64/attributes.txt

    raf08051 r28e58fd  
    1111__attribute__ ((unused)) struct __anonymous0 {
    1212};
    13 static inline void ___constructor__F_P13s__anonymous0_autogen___1(struct __anonymous0 *___dst__P13s__anonymous0_1);
    14 static inline void ___constructor__F_P13s__anonymous013s__anonymous0_autogen___1(struct __anonymous0 *___dst__P13s__anonymous0_1, struct __anonymous0 ___src__13s__anonymous0_1);
    15 static inline void ___destructor__F_P13s__anonymous0_autogen___1(struct __anonymous0 *___dst__P13s__anonymous0_1);
    16 static inline struct __anonymous0 ___operator_assign__F13s__anonymous0_P13s__anonymous013s__anonymous0_autogen___1(struct __anonymous0 *___dst__P13s__anonymous0_1, struct __anonymous0 ___src__13s__anonymous0_1);
    17 static inline void ___constructor__F_P13s__anonymous0_autogen___1(struct __anonymous0 *___dst__P13s__anonymous0_1){
    18 }
    19 static inline void ___constructor__F_P13s__anonymous013s__anonymous0_autogen___1(struct __anonymous0 *___dst__P13s__anonymous0_1, struct __anonymous0 ___src__13s__anonymous0_1){
    20 }
    21 static inline void ___destructor__F_P13s__anonymous0_autogen___1(struct __anonymous0 *___dst__P13s__anonymous0_1){
    22 }
    23 static inline struct __anonymous0 ___operator_assign__F13s__anonymous0_P13s__anonymous013s__anonymous0_autogen___1(struct __anonymous0 *___dst__P13s__anonymous0_1, struct __anonymous0 ___src__13s__anonymous0_1){
     13static inline void ___constructor__F_R13s__anonymous0_autogen___1(struct __anonymous0 *___dst__R13s__anonymous0_1);
     14static inline void ___constructor__F_R13s__anonymous013s__anonymous0_autogen___1(struct __anonymous0 *___dst__R13s__anonymous0_1, struct __anonymous0 ___src__13s__anonymous0_1);
     15static inline void ___destructor__F_R13s__anonymous0_autogen___1(struct __anonymous0 *___dst__R13s__anonymous0_1);
     16static inline struct __anonymous0 ___operator_assign__F13s__anonymous0_R13s__anonymous013s__anonymous0_autogen___1(struct __anonymous0 *___dst__R13s__anonymous0_1, struct __anonymous0 ___src__13s__anonymous0_1);
     17static inline void ___constructor__F_R13s__anonymous0_autogen___1(struct __anonymous0 *___dst__R13s__anonymous0_1){
     18}
     19static inline void ___constructor__F_R13s__anonymous013s__anonymous0_autogen___1(struct __anonymous0 *___dst__R13s__anonymous0_1, struct __anonymous0 ___src__13s__anonymous0_1){
     20}
     21static inline void ___destructor__F_R13s__anonymous0_autogen___1(struct __anonymous0 *___dst__R13s__anonymous0_1){
     22}
     23static inline struct __anonymous0 ___operator_assign__F13s__anonymous0_R13s__anonymous013s__anonymous0_autogen___1(struct __anonymous0 *___dst__R13s__anonymous0_1, struct __anonymous0 ___src__13s__anonymous0_1){
    2424    struct __anonymous0 ___ret__13s__anonymous0_1;
    25     ((void)___constructor__F_P13s__anonymous013s__anonymous0_autogen___1((&___ret__13s__anonymous0_1), ___src__13s__anonymous0_1));
     25    ((void)___constructor__F_R13s__anonymous013s__anonymous0_autogen___1((&___ret__13s__anonymous0_1), ___src__13s__anonymous0_1));
    2626    return ((struct __anonymous0 )___ret__13s__anonymous0_1);
    2727}
     
    2929__attribute__ ((unused)) struct Agn2 {
    3030};
    31 static inline void ___constructor__F_P5sAgn2_autogen___1(struct Agn2 *___dst__P5sAgn2_1);
    32 static inline void ___constructor__F_P5sAgn25sAgn2_autogen___1(struct Agn2 *___dst__P5sAgn2_1, struct Agn2 ___src__5sAgn2_1);
    33 static inline void ___destructor__F_P5sAgn2_autogen___1(struct Agn2 *___dst__P5sAgn2_1);
    34 static inline struct Agn2 ___operator_assign__F5sAgn2_P5sAgn25sAgn2_autogen___1(struct Agn2 *___dst__P5sAgn2_1, struct Agn2 ___src__5sAgn2_1);
    35 static inline void ___constructor__F_P5sAgn2_autogen___1(struct Agn2 *___dst__P5sAgn2_1){
    36 }
    37 static inline void ___constructor__F_P5sAgn25sAgn2_autogen___1(struct Agn2 *___dst__P5sAgn2_1, struct Agn2 ___src__5sAgn2_1){
    38 }
    39 static inline void ___destructor__F_P5sAgn2_autogen___1(struct Agn2 *___dst__P5sAgn2_1){
    40 }
    41 static inline struct Agn2 ___operator_assign__F5sAgn2_P5sAgn25sAgn2_autogen___1(struct Agn2 *___dst__P5sAgn2_1, struct Agn2 ___src__5sAgn2_1){
     31static inline void ___constructor__F_R5sAgn2_autogen___1(struct Agn2 *___dst__R5sAgn2_1);
     32static inline void ___constructor__F_R5sAgn25sAgn2_autogen___1(struct Agn2 *___dst__R5sAgn2_1, struct Agn2 ___src__5sAgn2_1);
     33static inline void ___destructor__F_R5sAgn2_autogen___1(struct Agn2 *___dst__R5sAgn2_1);
     34static inline struct Agn2 ___operator_assign__F5sAgn2_R5sAgn25sAgn2_autogen___1(struct Agn2 *___dst__R5sAgn2_1, struct Agn2 ___src__5sAgn2_1);
     35static inline void ___constructor__F_R5sAgn2_autogen___1(struct Agn2 *___dst__R5sAgn2_1){
     36}
     37static inline void ___constructor__F_R5sAgn25sAgn2_autogen___1(struct Agn2 *___dst__R5sAgn2_1, struct Agn2 ___src__5sAgn2_1){
     38}
     39static inline void ___destructor__F_R5sAgn2_autogen___1(struct Agn2 *___dst__R5sAgn2_1){
     40}
     41static inline struct Agn2 ___operator_assign__F5sAgn2_R5sAgn25sAgn2_autogen___1(struct Agn2 *___dst__R5sAgn2_1, struct Agn2 ___src__5sAgn2_1){
    4242    struct Agn2 ___ret__5sAgn2_1;
    43     ((void)___constructor__F_P5sAgn25sAgn2_autogen___1((&___ret__5sAgn2_1), ___src__5sAgn2_1));
     43    ((void)___constructor__F_R5sAgn25sAgn2_autogen___1((&___ret__5sAgn2_1), ___src__5sAgn2_1));
    4444    return ((struct Agn2 )___ret__5sAgn2_1);
    4545}
     
    6565    __attribute__ ((unused,unused)) int *__f9__Pi_1;
    6666};
    67 static inline void ___constructor__F_P4sFdl_autogen___1(struct Fdl *___dst__P4sFdl_1);
    68 static inline void ___constructor__F_P4sFdl4sFdl_autogen___1(struct Fdl *___dst__P4sFdl_1, struct Fdl ___src__4sFdl_1);
    69 static inline void ___destructor__F_P4sFdl_autogen___1(struct Fdl *___dst__P4sFdl_1);
    70 static inline struct Fdl ___operator_assign__F4sFdl_P4sFdl4sFdl_autogen___1(struct Fdl *___dst__P4sFdl_1, struct Fdl ___src__4sFdl_1);
    71 static inline void ___constructor__F_P4sFdl_autogen___1(struct Fdl *___dst__P4sFdl_1){
    72     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f1__i_1)))) /* ?{} */);
    73     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f2__i_1)))) /* ?{} */);
    74     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f3__i_1)))) /* ?{} */);
    75     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f4__i_1)))) /* ?{} */);
    76     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f5__i_1)))) /* ?{} */);
    77     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f6__i_1)))) /* ?{} */);
    78     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f7__i_1)))) /* ?{} */);
    79     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f8__i_1)))) /* ?{} */);
    80     ((void)((*((int **)(&(*___dst__P4sFdl_1).__f9__Pi_1)))) /* ?{} */);
    81 }
    82 static inline void ___constructor__F_P4sFdl4sFdl_autogen___1(struct Fdl *___dst__P4sFdl_1, struct Fdl ___src__4sFdl_1){
    83     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f1__i_1)))=___src__4sFdl_1.__f1__i_1) /* ?{} */);
    84     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f2__i_1)))=___src__4sFdl_1.__f2__i_1) /* ?{} */);
    85     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f3__i_1)))=___src__4sFdl_1.__f3__i_1) /* ?{} */);
    86     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f4__i_1)))=___src__4sFdl_1.__f4__i_1) /* ?{} */);
    87     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f5__i_1)))=___src__4sFdl_1.__f5__i_1) /* ?{} */);
    88     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f6__i_1)))=___src__4sFdl_1.__f6__i_1) /* ?{} */);
    89     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f7__i_1)))=___src__4sFdl_1.__f7__i_1) /* ?{} */);
    90     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f8__i_1)))=___src__4sFdl_1.__f8__i_1) /* ?{} */);
    91     ((void)((*((int **)(&(*___dst__P4sFdl_1).__f9__Pi_1)))=___src__4sFdl_1.__f9__Pi_1) /* ?{} */);
    92 }
    93 static inline void ___destructor__F_P4sFdl_autogen___1(struct Fdl *___dst__P4sFdl_1){
    94     ((void)((*((int **)(&(*___dst__P4sFdl_1).__f9__Pi_1)))) /* ^?{} */);
    95     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f8__i_1)))) /* ^?{} */);
    96     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f7__i_1)))) /* ^?{} */);
    97     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f6__i_1)))) /* ^?{} */);
    98     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f5__i_1)))) /* ^?{} */);
    99     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f4__i_1)))) /* ^?{} */);
    100     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f3__i_1)))) /* ^?{} */);
    101     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f2__i_1)))) /* ^?{} */);
    102     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f1__i_1)))) /* ^?{} */);
    103 }
    104 static inline struct Fdl ___operator_assign__F4sFdl_P4sFdl4sFdl_autogen___1(struct Fdl *___dst__P4sFdl_1, struct Fdl ___src__4sFdl_1){
     67static inline void ___constructor__F_R4sFdl_autogen___1(struct Fdl *___dst__R4sFdl_1);
     68static inline void ___constructor__F_R4sFdl4sFdl_autogen___1(struct Fdl *___dst__R4sFdl_1, struct Fdl ___src__4sFdl_1);
     69static inline void ___destructor__F_R4sFdl_autogen___1(struct Fdl *___dst__R4sFdl_1);
     70static inline struct Fdl ___operator_assign__F4sFdl_R4sFdl4sFdl_autogen___1(struct Fdl *___dst__R4sFdl_1, struct Fdl ___src__4sFdl_1);
     71static inline void ___constructor__F_R4sFdl_autogen___1(struct Fdl *___dst__R4sFdl_1){
     72    ((void)((*___dst__R4sFdl_1).__f1__i_1) /* ?{} */);
     73    ((void)((*___dst__R4sFdl_1).__f2__i_1) /* ?{} */);
     74    ((void)((*___dst__R4sFdl_1).__f3__i_1) /* ?{} */);
     75    ((void)((*___dst__R4sFdl_1).__f4__i_1) /* ?{} */);
     76    ((void)((*___dst__R4sFdl_1).__f5__i_1) /* ?{} */);
     77    ((void)((*___dst__R4sFdl_1).__f6__i_1) /* ?{} */);
     78    ((void)((*___dst__R4sFdl_1).__f7__i_1) /* ?{} */);
     79    ((void)((*___dst__R4sFdl_1).__f8__i_1) /* ?{} */);
     80    ((void)((*___dst__R4sFdl_1).__f9__Pi_1) /* ?{} */);
     81}
     82static inline void ___constructor__F_R4sFdl4sFdl_autogen___1(struct Fdl *___dst__R4sFdl_1, struct Fdl ___src__4sFdl_1){
     83    ((void)((*___dst__R4sFdl_1).__f1__i_1=___src__4sFdl_1.__f1__i_1) /* ?{} */);
     84    ((void)((*___dst__R4sFdl_1).__f2__i_1=___src__4sFdl_1.__f2__i_1) /* ?{} */);
     85    ((void)((*___dst__R4sFdl_1).__f3__i_1=___src__4sFdl_1.__f3__i_1) /* ?{} */);
     86    ((void)((*___dst__R4sFdl_1).__f4__i_1=___src__4sFdl_1.__f4__i_1) /* ?{} */);
     87    ((void)((*___dst__R4sFdl_1).__f5__i_1=___src__4sFdl_1.__f5__i_1) /* ?{} */);
     88    ((void)((*___dst__R4sFdl_1).__f6__i_1=___src__4sFdl_1.__f6__i_1) /* ?{} */);
     89    ((void)((*___dst__R4sFdl_1).__f7__i_1=___src__4sFdl_1.__f7__i_1) /* ?{} */);
     90    ((void)((*___dst__R4sFdl_1).__f8__i_1=___src__4sFdl_1.__f8__i_1) /* ?{} */);
     91    ((void)((*___dst__R4sFdl_1).__f9__Pi_1=___src__4sFdl_1.__f9__Pi_1) /* ?{} */);
     92}
     93static inline void ___destructor__F_R4sFdl_autogen___1(struct Fdl *___dst__R4sFdl_1){
     94    ((void)((*___dst__R4sFdl_1).__f9__Pi_1) /* ^?{} */);
     95    ((void)((*___dst__R4sFdl_1).__f8__i_1) /* ^?{} */);
     96    ((void)((*___dst__R4sFdl_1).__f7__i_1) /* ^?{} */);
     97    ((void)((*___dst__R4sFdl_1).__f6__i_1) /* ^?{} */);
     98    ((void)((*___dst__R4sFdl_1).__f5__i_1) /* ^?{} */);
     99    ((void)((*___dst__R4sFdl_1).__f4__i_1) /* ^?{} */);
     100    ((void)((*___dst__R4sFdl_1).__f3__i_1) /* ^?{} */);
     101    ((void)((*___dst__R4sFdl_1).__f2__i_1) /* ^?{} */);
     102    ((void)((*___dst__R4sFdl_1).__f1__i_1) /* ^?{} */);
     103}
     104static inline struct Fdl ___operator_assign__F4sFdl_R4sFdl4sFdl_autogen___1(struct Fdl *___dst__R4sFdl_1, struct Fdl ___src__4sFdl_1){
    105105    struct Fdl ___ret__4sFdl_1;
    106     ((void)((*___dst__P4sFdl_1).__f1__i_1=___src__4sFdl_1.__f1__i_1));
    107     ((void)((*___dst__P4sFdl_1).__f2__i_1=___src__4sFdl_1.__f2__i_1));
    108     ((void)((*___dst__P4sFdl_1).__f3__i_1=___src__4sFdl_1.__f3__i_1));
    109     ((void)((*___dst__P4sFdl_1).__f4__i_1=___src__4sFdl_1.__f4__i_1));
    110     ((void)((*___dst__P4sFdl_1).__f5__i_1=___src__4sFdl_1.__f5__i_1));
    111     ((void)((*___dst__P4sFdl_1).__f6__i_1=___src__4sFdl_1.__f6__i_1));
    112     ((void)((*___dst__P4sFdl_1).__f7__i_1=___src__4sFdl_1.__f7__i_1));
    113     ((void)((*___dst__P4sFdl_1).__f8__i_1=___src__4sFdl_1.__f8__i_1));
    114     ((void)((*___dst__P4sFdl_1).__f9__Pi_1=___src__4sFdl_1.__f9__Pi_1));
    115     ((void)___constructor__F_P4sFdl4sFdl_autogen___1((&___ret__4sFdl_1), ___src__4sFdl_1));
     106    ((void)((*___dst__R4sFdl_1).__f1__i_1=___src__4sFdl_1.__f1__i_1));
     107    ((void)((*___dst__R4sFdl_1).__f2__i_1=___src__4sFdl_1.__f2__i_1));
     108    ((void)((*___dst__R4sFdl_1).__f3__i_1=___src__4sFdl_1.__f3__i_1));
     109    ((void)((*___dst__R4sFdl_1).__f4__i_1=___src__4sFdl_1.__f4__i_1));
     110    ((void)((*___dst__R4sFdl_1).__f5__i_1=___src__4sFdl_1.__f5__i_1));
     111    ((void)((*___dst__R4sFdl_1).__f6__i_1=___src__4sFdl_1.__f6__i_1));
     112    ((void)((*___dst__R4sFdl_1).__f7__i_1=___src__4sFdl_1.__f7__i_1));
     113    ((void)((*___dst__R4sFdl_1).__f8__i_1=___src__4sFdl_1.__f8__i_1));
     114    ((void)((*___dst__R4sFdl_1).__f9__Pi_1=___src__4sFdl_1.__f9__Pi_1));
     115    ((void)___constructor__F_R4sFdl4sFdl_autogen___1((&___ret__4sFdl_1), ___src__4sFdl_1));
    116116    return ((struct Fdl )___ret__4sFdl_1);
    117117}
    118 static inline void ___constructor__F_P4sFdli_autogen___1(struct Fdl *___dst__P4sFdl_1, int __f1__i_1){
    119     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f1__i_1)))=__f1__i_1) /* ?{} */);
    120     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f2__i_1)))) /* ?{} */);
    121     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f3__i_1)))) /* ?{} */);
    122     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f4__i_1)))) /* ?{} */);
    123     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f5__i_1)))) /* ?{} */);
    124     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f6__i_1)))) /* ?{} */);
    125     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f7__i_1)))) /* ?{} */);
    126     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f8__i_1)))) /* ?{} */);
    127     ((void)((*((int **)(&(*___dst__P4sFdl_1).__f9__Pi_1)))) /* ?{} */);
    128 }
    129 static inline void ___constructor__F_P4sFdlii_autogen___1(struct Fdl *___dst__P4sFdl_1, int __f1__i_1, int __f2__i_1){
    130     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f1__i_1)))=__f1__i_1) /* ?{} */);
    131     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f2__i_1)))=__f2__i_1) /* ?{} */);
    132     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f3__i_1)))) /* ?{} */);
    133     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f4__i_1)))) /* ?{} */);
    134     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f5__i_1)))) /* ?{} */);
    135     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f6__i_1)))) /* ?{} */);
    136     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f7__i_1)))) /* ?{} */);
    137     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f8__i_1)))) /* ?{} */);
    138     ((void)((*((int **)(&(*___dst__P4sFdl_1).__f9__Pi_1)))) /* ?{} */);
    139 }
    140 static inline void ___constructor__F_P4sFdliii_autogen___1(struct Fdl *___dst__P4sFdl_1, int __f1__i_1, int __f2__i_1, int __f3__i_1){
    141     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f1__i_1)))=__f1__i_1) /* ?{} */);
    142     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f2__i_1)))=__f2__i_1) /* ?{} */);
    143     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f3__i_1)))=__f3__i_1) /* ?{} */);
    144     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f4__i_1)))) /* ?{} */);
    145     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f5__i_1)))) /* ?{} */);
    146     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f6__i_1)))) /* ?{} */);
    147     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f7__i_1)))) /* ?{} */);
    148     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f8__i_1)))) /* ?{} */);
    149     ((void)((*((int **)(&(*___dst__P4sFdl_1).__f9__Pi_1)))) /* ?{} */);
    150 }
    151 static inline void ___constructor__F_P4sFdliiii_autogen___1(struct Fdl *___dst__P4sFdl_1, int __f1__i_1, int __f2__i_1, int __f3__i_1, int __f4__i_1){
    152     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f1__i_1)))=__f1__i_1) /* ?{} */);
    153     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f2__i_1)))=__f2__i_1) /* ?{} */);
    154     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f3__i_1)))=__f3__i_1) /* ?{} */);
    155     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f4__i_1)))=__f4__i_1) /* ?{} */);
    156     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f5__i_1)))) /* ?{} */);
    157     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f6__i_1)))) /* ?{} */);
    158     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f7__i_1)))) /* ?{} */);
    159     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f8__i_1)))) /* ?{} */);
    160     ((void)((*((int **)(&(*___dst__P4sFdl_1).__f9__Pi_1)))) /* ?{} */);
    161 }
    162 static inline void ___constructor__F_P4sFdliiiii_autogen___1(struct Fdl *___dst__P4sFdl_1, int __f1__i_1, int __f2__i_1, int __f3__i_1, int __f4__i_1, int __f5__i_1){
    163     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f1__i_1)))=__f1__i_1) /* ?{} */);
    164     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f2__i_1)))=__f2__i_1) /* ?{} */);
    165     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f3__i_1)))=__f3__i_1) /* ?{} */);
    166     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f4__i_1)))=__f4__i_1) /* ?{} */);
    167     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f5__i_1)))=__f5__i_1) /* ?{} */);
    168     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f6__i_1)))) /* ?{} */);
    169     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f7__i_1)))) /* ?{} */);
    170     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f8__i_1)))) /* ?{} */);
    171     ((void)((*((int **)(&(*___dst__P4sFdl_1).__f9__Pi_1)))) /* ?{} */);
    172 }
    173 static inline void ___constructor__F_P4sFdliiiiii_autogen___1(struct Fdl *___dst__P4sFdl_1, int __f1__i_1, int __f2__i_1, int __f3__i_1, int __f4__i_1, int __f5__i_1, int __f6__i_1){
    174     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f1__i_1)))=__f1__i_1) /* ?{} */);
    175     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f2__i_1)))=__f2__i_1) /* ?{} */);
    176     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f3__i_1)))=__f3__i_1) /* ?{} */);
    177     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f4__i_1)))=__f4__i_1) /* ?{} */);
    178     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f5__i_1)))=__f5__i_1) /* ?{} */);
    179     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f6__i_1)))=__f6__i_1) /* ?{} */);
    180     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f7__i_1)))) /* ?{} */);
    181     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f8__i_1)))) /* ?{} */);
    182     ((void)((*((int **)(&(*___dst__P4sFdl_1).__f9__Pi_1)))) /* ?{} */);
    183 }
    184 static inline void ___constructor__F_P4sFdliiiiiii_autogen___1(struct Fdl *___dst__P4sFdl_1, int __f1__i_1, int __f2__i_1, int __f3__i_1, int __f4__i_1, int __f5__i_1, int __f6__i_1, int __f7__i_1){
    185     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f1__i_1)))=__f1__i_1) /* ?{} */);
    186     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f2__i_1)))=__f2__i_1) /* ?{} */);
    187     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f3__i_1)))=__f3__i_1) /* ?{} */);
    188     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f4__i_1)))=__f4__i_1) /* ?{} */);
    189     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f5__i_1)))=__f5__i_1) /* ?{} */);
    190     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f6__i_1)))=__f6__i_1) /* ?{} */);
    191     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f7__i_1)))=__f7__i_1) /* ?{} */);
    192     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f8__i_1)))) /* ?{} */);
    193     ((void)((*((int **)(&(*___dst__P4sFdl_1).__f9__Pi_1)))) /* ?{} */);
    194 }
    195 static inline void ___constructor__F_P4sFdliiiiiiii_autogen___1(struct Fdl *___dst__P4sFdl_1, int __f1__i_1, int __f2__i_1, int __f3__i_1, int __f4__i_1, int __f5__i_1, int __f6__i_1, int __f7__i_1, int __f8__i_1){
    196     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f1__i_1)))=__f1__i_1) /* ?{} */);
    197     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f2__i_1)))=__f2__i_1) /* ?{} */);
    198     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f3__i_1)))=__f3__i_1) /* ?{} */);
    199     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f4__i_1)))=__f4__i_1) /* ?{} */);
    200     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f5__i_1)))=__f5__i_1) /* ?{} */);
    201     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f6__i_1)))=__f6__i_1) /* ?{} */);
    202     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f7__i_1)))=__f7__i_1) /* ?{} */);
    203     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f8__i_1)))=__f8__i_1) /* ?{} */);
    204     ((void)((*((int **)(&(*___dst__P4sFdl_1).__f9__Pi_1)))) /* ?{} */);
    205 }
    206 static inline void ___constructor__F_P4sFdliiiiiiiiPi_autogen___1(struct Fdl *___dst__P4sFdl_1, int __f1__i_1, int __f2__i_1, int __f3__i_1, int __f4__i_1, int __f5__i_1, int __f6__i_1, int __f7__i_1, int __f8__i_1, int *__f9__Pi_1){
    207     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f1__i_1)))=__f1__i_1) /* ?{} */);
    208     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f2__i_1)))=__f2__i_1) /* ?{} */);
    209     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f3__i_1)))=__f3__i_1) /* ?{} */);
    210     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f4__i_1)))=__f4__i_1) /* ?{} */);
    211     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f5__i_1)))=__f5__i_1) /* ?{} */);
    212     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f6__i_1)))=__f6__i_1) /* ?{} */);
    213     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f7__i_1)))=__f7__i_1) /* ?{} */);
    214     ((void)((*((int *)(&(*___dst__P4sFdl_1).__f8__i_1)))=__f8__i_1) /* ?{} */);
    215     ((void)((*((int **)(&(*___dst__P4sFdl_1).__f9__Pi_1)))=__f9__Pi_1) /* ?{} */);
     118static inline void ___constructor__F_R4sFdli_autogen___1(struct Fdl *___dst__R4sFdl_1, int __f1__i_1){
     119    ((void)((*___dst__R4sFdl_1).__f1__i_1=__f1__i_1) /* ?{} */);
     120    ((void)((*___dst__R4sFdl_1).__f2__i_1) /* ?{} */);
     121    ((void)((*___dst__R4sFdl_1).__f3__i_1) /* ?{} */);
     122    ((void)((*___dst__R4sFdl_1).__f4__i_1) /* ?{} */);
     123    ((void)((*___dst__R4sFdl_1).__f5__i_1) /* ?{} */);
     124    ((void)((*___dst__R4sFdl_1).__f6__i_1) /* ?{} */);
     125    ((void)((*___dst__R4sFdl_1).__f7__i_1) /* ?{} */);
     126    ((void)((*___dst__R4sFdl_1).__f8__i_1) /* ?{} */);
     127    ((void)((*___dst__R4sFdl_1).__f9__Pi_1) /* ?{} */);
     128}
     129static inline void ___constructor__F_R4sFdlii_autogen___1(struct Fdl *___dst__R4sFdl_1, int __f1__i_1, int __f2__i_1){
     130    ((void)((*___dst__R4sFdl_1).__f1__i_1=__f1__i_1) /* ?{} */);
     131    ((void)((*___dst__R4sFdl_1).__f2__i_1=__f2__i_1) /* ?{} */);
     132    ((void)((*___dst__R4sFdl_1).__f3__i_1) /* ?{} */);
     133    ((void)((*___dst__R4sFdl_1).__f4__i_1) /* ?{} */);
     134    ((void)((*___dst__R4sFdl_1).__f5__i_1) /* ?{} */);
     135    ((void)((*___dst__R4sFdl_1).__f6__i_1) /* ?{} */);
     136    ((void)((*___dst__R4sFdl_1).__f7__i_1) /* ?{} */);
     137    ((void)((*___dst__R4sFdl_1).__f8__i_1) /* ?{} */);
     138    ((void)((*___dst__R4sFdl_1).__f9__Pi_1) /* ?{} */);
     139}
     140static inline void ___constructor__F_R4sFdliii_autogen___1(struct Fdl *___dst__R4sFdl_1, int __f1__i_1, int __f2__i_1, int __f3__i_1){
     141    ((void)((*___dst__R4sFdl_1).__f1__i_1=__f1__i_1) /* ?{} */);
     142    ((void)((*___dst__R4sFdl_1).__f2__i_1=__f2__i_1) /* ?{} */);
     143    ((void)((*___dst__R4sFdl_1).__f3__i_1=__f3__i_1) /* ?{} */);
     144    ((void)((*___dst__R4sFdl_1).__f4__i_1) /* ?{} */);
     145    ((void)((*___dst__R4sFdl_1).__f5__i_1) /* ?{} */);
     146    ((void)((*___dst__R4sFdl_1).__f6__i_1) /* ?{} */);
     147    ((void)((*___dst__R4sFdl_1).__f7__i_1) /* ?{} */);
     148    ((void)((*___dst__R4sFdl_1).__f8__i_1) /* ?{} */);
     149    ((void)((*___dst__R4sFdl_1).__f9__Pi_1) /* ?{} */);
     150}
     151static inline void ___constructor__F_R4sFdliiii_autogen___1(struct Fdl *___dst__R4sFdl_1, int __f1__i_1, int __f2__i_1, int __f3__i_1, int __f4__i_1){
     152    ((void)((*___dst__R4sFdl_1).__f1__i_1=__f1__i_1) /* ?{} */);
     153    ((void)((*___dst__R4sFdl_1).__f2__i_1=__f2__i_1) /* ?{} */);
     154    ((void)((*___dst__R4sFdl_1).__f3__i_1=__f3__i_1) /* ?{} */);
     155    ((void)((*___dst__R4sFdl_1).__f4__i_1=__f4__i_1) /* ?{} */);
     156    ((void)((*___dst__R4sFdl_1).__f5__i_1) /* ?{} */);
     157    ((void)((*___dst__R4sFdl_1).__f6__i_1) /* ?{} */);
     158    ((void)((*___dst__R4sFdl_1).__f7__i_1) /* ?{} */);
     159    ((void)((*___dst__R4sFdl_1).__f8__i_1) /* ?{} */);
     160    ((void)((*___dst__R4sFdl_1).__f9__Pi_1) /* ?{} */);
     161}
     162static inline void ___constructor__F_R4sFdliiiii_autogen___1(struct Fdl *___dst__R4sFdl_1, int __f1__i_1, int __f2__i_1, int __f3__i_1, int __f4__i_1, int __f5__i_1){
     163    ((void)((*___dst__R4sFdl_1).__f1__i_1=__f1__i_1) /* ?{} */);
     164    ((void)((*___dst__R4sFdl_1).__f2__i_1=__f2__i_1) /* ?{} */);
     165    ((void)((*___dst__R4sFdl_1).__f3__i_1=__f3__i_1) /* ?{} */);
     166    ((void)((*___dst__R4sFdl_1).__f4__i_1=__f4__i_1) /* ?{} */);
     167    ((void)((*___dst__R4sFdl_1).__f5__i_1=__f5__i_1) /* ?{} */);
     168    ((void)((*___dst__R4sFdl_1).__f6__i_1) /* ?{} */);
     169    ((void)((*___dst__R4sFdl_1).__f7__i_1) /* ?{} */);
     170    ((void)((*___dst__R4sFdl_1).__f8__i_1) /* ?{} */);
     171    ((void)((*___dst__R4sFdl_1).__f9__Pi_1) /* ?{} */);
     172}
     173static inline void ___constructor__F_R4sFdliiiiii_autogen___1(struct Fdl *___dst__R4sFdl_1, int __f1__i_1, int __f2__i_1, int __f3__i_1, int __f4__i_1, int __f5__i_1, int __f6__i_1){
     174    ((void)((*___dst__R4sFdl_1).__f1__i_1=__f1__i_1) /* ?{} */);
     175    ((void)((*___dst__R4sFdl_1).__f2__i_1=__f2__i_1) /* ?{} */);
     176    ((void)((*___dst__R4sFdl_1).__f3__i_1=__f3__i_1) /* ?{} */);
     177    ((void)((*___dst__R4sFdl_1).__f4__i_1=__f4__i_1) /* ?{} */);
     178    ((void)((*___dst__R4sFdl_1).__f5__i_1=__f5__i_1) /* ?{} */);
     179    ((void)((*___dst__R4sFdl_1).__f6__i_1=__f6__i_1) /* ?{} */);
     180    ((void)((*___dst__R4sFdl_1).__f7__i_1) /* ?{} */);
     181    ((void)((*___dst__R4sFdl_1).__f8__i_1) /* ?{} */);
     182    ((void)((*___dst__R4sFdl_1).__f9__Pi_1) /* ?{} */);
     183}
     184static inline void ___constructor__F_R4sFdliiiiiii_autogen___1(struct Fdl *___dst__R4sFdl_1, int __f1__i_1, int __f2__i_1, int __f3__i_1, int __f4__i_1, int __f5__i_1, int __f6__i_1, int __f7__i_1){
     185    ((void)((*___dst__R4sFdl_1).__f1__i_1=__f1__i_1) /* ?{} */);
     186    ((void)((*___dst__R4sFdl_1).__f2__i_1=__f2__i_1) /* ?{} */);
     187    ((void)((*___dst__R4sFdl_1).__f3__i_1=__f3__i_1) /* ?{} */);
     188    ((void)((*___dst__R4sFdl_1).__f4__i_1=__f4__i_1) /* ?{} */);
     189    ((void)((*___dst__R4sFdl_1).__f5__i_1=__f5__i_1) /* ?{} */);
     190    ((void)((*___dst__R4sFdl_1).__f6__i_1=__f6__i_1) /* ?{} */);
     191    ((void)((*___dst__R4sFdl_1).__f7__i_1=__f7__i_1) /* ?{} */);
     192    ((void)((*___dst__R4sFdl_1).__f8__i_1) /* ?{} */);
     193    ((void)((*___dst__R4sFdl_1).__f9__Pi_1) /* ?{} */);
     194}
     195static inline void ___constructor__F_R4sFdliiiiiiii_autogen___1(struct Fdl *___dst__R4sFdl_1, int __f1__i_1, int __f2__i_1, int __f3__i_1, int __f4__i_1, int __f5__i_1, int __f6__i_1, int __f7__i_1, int __f8__i_1){
     196    ((void)((*___dst__R4sFdl_1).__f1__i_1=__f1__i_1) /* ?{} */);
     197    ((void)((*___dst__R4sFdl_1).__f2__i_1=__f2__i_1) /* ?{} */);
     198    ((void)((*___dst__R4sFdl_1).__f3__i_1=__f3__i_1) /* ?{} */);
     199    ((void)((*___dst__R4sFdl_1).__f4__i_1=__f4__i_1) /* ?{} */);
     200    ((void)((*___dst__R4sFdl_1).__f5__i_1=__f5__i_1) /* ?{} */);
     201    ((void)((*___dst__R4sFdl_1).__f6__i_1=__f6__i_1) /* ?{} */);
     202    ((void)((*___dst__R4sFdl_1).__f7__i_1=__f7__i_1) /* ?{} */);
     203    ((void)((*___dst__R4sFdl_1).__f8__i_1=__f8__i_1) /* ?{} */);
     204    ((void)((*___dst__R4sFdl_1).__f9__Pi_1) /* ?{} */);
     205}
     206static inline void ___constructor__F_R4sFdliiiiiiiiPi_autogen___1(struct Fdl *___dst__R4sFdl_1, int __f1__i_1, int __f2__i_1, int __f3__i_1, int __f4__i_1, int __f5__i_1, int __f6__i_1, int __f7__i_1, int __f8__i_1, int *__f9__Pi_1){
     207    ((void)((*___dst__R4sFdl_1).__f1__i_1=__f1__i_1) /* ?{} */);
     208    ((void)((*___dst__R4sFdl_1).__f2__i_1=__f2__i_1) /* ?{} */);
     209    ((void)((*___dst__R4sFdl_1).__f3__i_1=__f3__i_1) /* ?{} */);
     210    ((void)((*___dst__R4sFdl_1).__f4__i_1=__f4__i_1) /* ?{} */);
     211    ((void)((*___dst__R4sFdl_1).__f5__i_1=__f5__i_1) /* ?{} */);
     212    ((void)((*___dst__R4sFdl_1).__f6__i_1=__f6__i_1) /* ?{} */);
     213    ((void)((*___dst__R4sFdl_1).__f7__i_1=__f7__i_1) /* ?{} */);
     214    ((void)((*___dst__R4sFdl_1).__f8__i_1=__f8__i_1) /* ?{} */);
     215    ((void)((*___dst__R4sFdl_1).__f9__Pi_1=__f9__Pi_1) /* ?{} */);
    216216}
    217217__attribute__ ((unused)) int __f__Fi___1() asm ( "xyz" );
     
    288288        int __i__i_2;
    289289    };
    290     inline void ___constructor__F_P13s__anonymous4_autogen___2(struct __anonymous4 *___dst__P13s__anonymous4_2){
    291         ((void)((*((int *)(&(*___dst__P13s__anonymous4_2).__i__i_2)))) /* ?{} */);
    292     }
    293     inline void ___constructor__F_P13s__anonymous413s__anonymous4_autogen___2(struct __anonymous4 *___dst__P13s__anonymous4_2, struct __anonymous4 ___src__13s__anonymous4_2){
    294         ((void)((*((int *)(&(*___dst__P13s__anonymous4_2).__i__i_2)))=___src__13s__anonymous4_2.__i__i_2) /* ?{} */);
    295     }
    296     inline void ___destructor__F_P13s__anonymous4_autogen___2(struct __anonymous4 *___dst__P13s__anonymous4_2){
    297         ((void)((*((int *)(&(*___dst__P13s__anonymous4_2).__i__i_2)))) /* ^?{} */);
    298     }
    299     inline struct __anonymous4 ___operator_assign__F13s__anonymous4_P13s__anonymous413s__anonymous4_autogen___2(struct __anonymous4 *___dst__P13s__anonymous4_2, struct __anonymous4 ___src__13s__anonymous4_2){
     290    inline void ___constructor__F_R13s__anonymous4_autogen___2(struct __anonymous4 *___dst__R13s__anonymous4_2){
     291        ((void)((*___dst__R13s__anonymous4_2).__i__i_2) /* ?{} */);
     292    }
     293    inline void ___constructor__F_R13s__anonymous413s__anonymous4_autogen___2(struct __anonymous4 *___dst__R13s__anonymous4_2, struct __anonymous4 ___src__13s__anonymous4_2){
     294        ((void)((*___dst__R13s__anonymous4_2).__i__i_2=___src__13s__anonymous4_2.__i__i_2) /* ?{} */);
     295    }
     296    inline void ___destructor__F_R13s__anonymous4_autogen___2(struct __anonymous4 *___dst__R13s__anonymous4_2){
     297        ((void)((*___dst__R13s__anonymous4_2).__i__i_2) /* ^?{} */);
     298    }
     299    inline struct __anonymous4 ___operator_assign__F13s__anonymous4_R13s__anonymous413s__anonymous4_autogen___2(struct __anonymous4 *___dst__R13s__anonymous4_2, struct __anonymous4 ___src__13s__anonymous4_2){
    300300        struct __anonymous4 ___ret__13s__anonymous4_2;
    301         ((void)((*___dst__P13s__anonymous4_2).__i__i_2=___src__13s__anonymous4_2.__i__i_2));
    302         ((void)___constructor__F_P13s__anonymous413s__anonymous4_autogen___2((&___ret__13s__anonymous4_2), ___src__13s__anonymous4_2));
     301        ((void)((*___dst__R13s__anonymous4_2).__i__i_2=___src__13s__anonymous4_2.__i__i_2));
     302        ((void)___constructor__F_R13s__anonymous413s__anonymous4_autogen___2((&___ret__13s__anonymous4_2), ___src__13s__anonymous4_2));
    303303        return ((struct __anonymous4 )___ret__13s__anonymous4_2);
    304304    }
    305     inline void ___constructor__F_P13s__anonymous4i_autogen___2(struct __anonymous4 *___dst__P13s__anonymous4_2, int __i__i_2){
    306         ((void)((*((int *)(&(*___dst__P13s__anonymous4_2).__i__i_2)))=__i__i_2) /* ?{} */);
     305    inline void ___constructor__F_R13s__anonymous4i_autogen___2(struct __anonymous4 *___dst__R13s__anonymous4_2, int __i__i_2){
     306        ((void)((*___dst__R13s__anonymous4_2).__i__i_2=__i__i_2) /* ?{} */);
    307307    }
    308308    ((void)sizeof(struct __anonymous4 ));
     
    310310        __R__C13e__anonymous5_2,
    311311    };
    312     inline void ___constructor__F_P13e__anonymous5_intrinsic___2(enum __anonymous5 *___dst__P13e__anonymous5_2){
    313     }
    314     inline void ___constructor__F_P13e__anonymous513e__anonymous5_intrinsic___2(enum __anonymous5 *___dst__P13e__anonymous5_2, enum __anonymous5 ___src__13e__anonymous5_2){
    315         ((void)((*___dst__P13e__anonymous5_2)=___src__13e__anonymous5_2));
    316     }
    317     inline void ___destructor__F_P13e__anonymous5_intrinsic___2(enum __anonymous5 *___dst__P13e__anonymous5_2){
    318     }
    319     inline enum __anonymous5 ___operator_assign__F13e__anonymous5_P13e__anonymous513e__anonymous5_intrinsic___2(enum __anonymous5 *___dst__P13e__anonymous5_2, enum __anonymous5 ___src__13e__anonymous5_2){
     312    inline void ___constructor__F_R13e__anonymous5_intrinsic___2(__attribute__ ((unused)) enum __anonymous5 *___dst__R13e__anonymous5_2){
     313    }
     314    inline void ___constructor__F_R13e__anonymous513e__anonymous5_intrinsic___2(enum __anonymous5 *___dst__R13e__anonymous5_2, enum __anonymous5 ___src__13e__anonymous5_2){
     315        ((void)((*___dst__R13e__anonymous5_2)=___src__13e__anonymous5_2));
     316    }
     317    inline void ___destructor__F_R13e__anonymous5_intrinsic___2(__attribute__ ((unused)) enum __anonymous5 *___dst__R13e__anonymous5_2){
     318    }
     319    inline enum __anonymous5 ___operator_assign__F13e__anonymous5_R13e__anonymous513e__anonymous5_intrinsic___2(enum __anonymous5 *___dst__R13e__anonymous5_2, enum __anonymous5 ___src__13e__anonymous5_2){
    320320        enum __anonymous5 ___ret__13e__anonymous5_2;
    321         ((void)(___ret__13e__anonymous5_2=((*___dst__P13e__anonymous5_2)=___src__13e__anonymous5_2)) /* ?{} */);
     321        ((void)(___ret__13e__anonymous5_2=((*___dst__R13e__anonymous5_2)=___src__13e__anonymous5_2)) /* ?{} */);
    322322        return ((enum __anonymous5 )___ret__13e__anonymous5_2);
    323323    }
     
    337337    __attribute__ ((unused,unused)) int (*__anonymous_object31)();
    338338};
    339 static inline void ___constructor__F_P4sVad_autogen___1(struct Vad *___dst__P4sVad_1);
    340 static inline void ___constructor__F_P4sVad4sVad_autogen___1(struct Vad *___dst__P4sVad_1, struct Vad ___src__4sVad_1);
    341 static inline void ___destructor__F_P4sVad_autogen___1(struct Vad *___dst__P4sVad_1);
    342 static inline struct Vad ___operator_assign__F4sVad_P4sVad4sVad_autogen___1(struct Vad *___dst__P4sVad_1, struct Vad ___src__4sVad_1);
    343 static inline void ___constructor__F_P4sVad_autogen___1(struct Vad *___dst__P4sVad_1){
    344 }
    345 static inline void ___constructor__F_P4sVad4sVad_autogen___1(struct Vad *___dst__P4sVad_1, struct Vad ___src__4sVad_1){
    346 }
    347 static inline void ___destructor__F_P4sVad_autogen___1(struct Vad *___dst__P4sVad_1){
    348 }
    349 static inline struct Vad ___operator_assign__F4sVad_P4sVad4sVad_autogen___1(struct Vad *___dst__P4sVad_1, struct Vad ___src__4sVad_1){
     339static inline void ___constructor__F_R4sVad_autogen___1(struct Vad *___dst__R4sVad_1);
     340static inline void ___constructor__F_R4sVad4sVad_autogen___1(struct Vad *___dst__R4sVad_1, struct Vad ___src__4sVad_1);
     341static inline void ___destructor__F_R4sVad_autogen___1(struct Vad *___dst__R4sVad_1);
     342static inline struct Vad ___operator_assign__F4sVad_R4sVad4sVad_autogen___1(struct Vad *___dst__R4sVad_1, struct Vad ___src__4sVad_1);
     343static inline void ___constructor__F_R4sVad_autogen___1(struct Vad *___dst__R4sVad_1){
     344}
     345static inline void ___constructor__F_R4sVad4sVad_autogen___1(struct Vad *___dst__R4sVad_1, struct Vad ___src__4sVad_1){
     346}
     347static inline void ___destructor__F_R4sVad_autogen___1(struct Vad *___dst__R4sVad_1){
     348}
     349static inline struct Vad ___operator_assign__F4sVad_R4sVad4sVad_autogen___1(struct Vad *___dst__R4sVad_1, struct Vad ___src__4sVad_1){
    350350    struct Vad ___ret__4sVad_1;
    351     ((void)___constructor__F_P4sVad4sVad_autogen___1((&___ret__4sVad_1), ___src__4sVad_1));
     351    ((void)___constructor__F_R4sVad4sVad_autogen___1((&___ret__4sVad_1), ___src__4sVad_1));
    352352    return ((struct Vad )___ret__4sVad_1);
    353353}
  • src/tests/.expect/64/declarationSpecifier.txt

    raf08051 r28e58fd  
    1616    int __i__i_1;
    1717};
    18 static inline void ___constructor__F_P13s__anonymous0_autogen___1(struct __anonymous0 *___dst__P13s__anonymous0_1);
    19 static inline void ___constructor__F_P13s__anonymous013s__anonymous0_autogen___1(struct __anonymous0 *___dst__P13s__anonymous0_1, struct __anonymous0 ___src__13s__anonymous0_1);
    20 static inline void ___destructor__F_P13s__anonymous0_autogen___1(struct __anonymous0 *___dst__P13s__anonymous0_1);
    21 static inline struct __anonymous0 ___operator_assign__F13s__anonymous0_P13s__anonymous013s__anonymous0_autogen___1(struct __anonymous0 *___dst__P13s__anonymous0_1, struct __anonymous0 ___src__13s__anonymous0_1);
    22 static inline void ___constructor__F_P13s__anonymous0_autogen___1(struct __anonymous0 *___dst__P13s__anonymous0_1){
    23     ((void)((*((int *)(&(*___dst__P13s__anonymous0_1).__i__i_1)))) /* ?{} */);
    24 }
    25 static inline void ___constructor__F_P13s__anonymous013s__anonymous0_autogen___1(struct __anonymous0 *___dst__P13s__anonymous0_1, struct __anonymous0 ___src__13s__anonymous0_1){
    26     ((void)((*((int *)(&(*___dst__P13s__anonymous0_1).__i__i_1)))=___src__13s__anonymous0_1.__i__i_1) /* ?{} */);
    27 }
    28 static inline void ___destructor__F_P13s__anonymous0_autogen___1(struct __anonymous0 *___dst__P13s__anonymous0_1){
    29     ((void)((*((int *)(&(*___dst__P13s__anonymous0_1).__i__i_1)))) /* ^?{} */);
    30 }
    31 static inline struct __anonymous0 ___operator_assign__F13s__anonymous0_P13s__anonymous013s__anonymous0_autogen___1(struct __anonymous0 *___dst__P13s__anonymous0_1, struct __anonymous0 ___src__13s__anonymous0_1){
     18static inline void ___constructor__F_R13s__anonymous0_autogen___1(struct __anonymous0 *___dst__R13s__anonymous0_1);
     19static inline void ___constructor__F_R13s__anonymous013s__anonymous0_autogen___1(struct __anonymous0 *___dst__R13s__anonymous0_1, struct __anonymous0 ___src__13s__anonymous0_1);
     20static inline void ___destructor__F_R13s__anonymous0_autogen___1(struct __anonymous0 *___dst__R13s__anonymous0_1);
     21static inline struct __anonymous0 ___operator_assign__F13s__anonymous0_R13s__anonymous013s__anonymous0_autogen___1(struct __anonymous0 *___dst__R13s__anonymous0_1, struct __anonymous0 ___src__13s__anonymous0_1);
     22static inline void ___constructor__F_R13s__anonymous0_autogen___1(struct __anonymous0 *___dst__R13s__anonymous0_1){
     23    ((void)((*___dst__R13s__anonymous0_1).__i__i_1) /* ?{} */);
     24}
     25static inline void ___constructor__F_R13s__anonymous013s__anonymous0_autogen___1(struct __anonymous0 *___dst__R13s__anonymous0_1, struct __anonymous0 ___src__13s__anonymous0_1){
     26    ((void)((*___dst__R13s__anonymous0_1).__i__i_1=___src__13s__anonymous0_1.__i__i_1) /* ?{} */);
     27}
     28static inline void ___destructor__F_R13s__anonymous0_autogen___1(struct __anonymous0 *___dst__R13s__anonymous0_1){
     29    ((void)((*___dst__R13s__anonymous0_1).__i__i_1) /* ^?{} */);
     30}
     31static inline struct __anonymous0 ___operator_assign__F13s__anonymous0_R13s__anonymous013s__anonymous0_autogen___1(struct __anonymous0 *___dst__R13s__anonymous0_1, struct __anonymous0 ___src__13s__anonymous0_1){
    3232    struct __anonymous0 ___ret__13s__anonymous0_1;
    33     ((void)((*___dst__P13s__anonymous0_1).__i__i_1=___src__13s__anonymous0_1.__i__i_1));
    34     ((void)___constructor__F_P13s__anonymous013s__anonymous0_autogen___1((&___ret__13s__anonymous0_1), ___src__13s__anonymous0_1));
     33    ((void)((*___dst__R13s__anonymous0_1).__i__i_1=___src__13s__anonymous0_1.__i__i_1));
     34    ((void)___constructor__F_R13s__anonymous013s__anonymous0_autogen___1((&___ret__13s__anonymous0_1), ___src__13s__anonymous0_1));
    3535    return ((struct __anonymous0 )___ret__13s__anonymous0_1);
    3636}
    37 static inline void ___constructor__F_P13s__anonymous0i_autogen___1(struct __anonymous0 *___dst__P13s__anonymous0_1, int __i__i_1){
    38     ((void)((*((int *)(&(*___dst__P13s__anonymous0_1).__i__i_1)))=__i__i_1) /* ?{} */);
     37static inline void ___constructor__F_R13s__anonymous0i_autogen___1(struct __anonymous0 *___dst__R13s__anonymous0_1, int __i__i_1){
     38    ((void)((*___dst__R13s__anonymous0_1).__i__i_1=__i__i_1) /* ?{} */);
    3939}
    4040volatile const struct __anonymous0 __x10__CV13s__anonymous0_1;
     
    4242    int __i__i_1;
    4343};
    44 static inline void ___constructor__F_P13s__anonymous1_autogen___1(struct __anonymous1 *___dst__P13s__anonymous1_1);
    45 static inline void ___constructor__F_P13s__anonymous113s__anonymous1_autogen___1(struct __anonymous1 *___dst__P13s__anonymous1_1, struct __anonymous1 ___src__13s__anonymous1_1);
    46 static inline void ___destructor__F_P13s__anonymous1_autogen___1(struct __anonymous1 *___dst__P13s__anonymous1_1);
    47 static inline struct __anonymous1 ___operator_assign__F13s__anonymous1_P13s__anonymous113s__anonymous1_autogen___1(struct __anonymous1 *___dst__P13s__anonymous1_1, struct __anonymous1 ___src__13s__anonymous1_1);
    48 static inline void ___constructor__F_P13s__anonymous1_autogen___1(struct __anonymous1 *___dst__P13s__anonymous1_1){
    49     ((void)((*((int *)(&(*___dst__P13s__anonymous1_1).__i__i_1)))) /* ?{} */);
    50 }
    51 static inline void ___constructor__F_P13s__anonymous113s__anonymous1_autogen___1(struct __anonymous1 *___dst__P13s__anonymous1_1, struct __anonymous1 ___src__13s__anonymous1_1){
    52     ((void)((*((int *)(&(*___dst__P13s__anonymous1_1).__i__i_1)))=___src__13s__anonymous1_1.__i__i_1) /* ?{} */);
    53 }
    54 static inline void ___destructor__F_P13s__anonymous1_autogen___1(struct __anonymous1 *___dst__P13s__anonymous1_1){
    55     ((void)((*((int *)(&(*___dst__P13s__anonymous1_1).__i__i_1)))) /* ^?{} */);
    56 }
    57 static inline struct __anonymous1 ___operator_assign__F13s__anonymous1_P13s__anonymous113s__anonymous1_autogen___1(struct __anonymous1 *___dst__P13s__anonymous1_1, struct __anonymous1 ___src__13s__anonymous1_1){
     44static inline void ___constructor__F_R13s__anonymous1_autogen___1(struct __anonymous1 *___dst__R13s__anonymous1_1);
     45static inline void ___constructor__F_R13s__anonymous113s__anonymous1_autogen___1(struct __anonymous1 *___dst__R13s__anonymous1_1, struct __anonymous1 ___src__13s__anonymous1_1);
     46static inline void ___destructor__F_R13s__anonymous1_autogen___1(struct __anonymous1 *___dst__R13s__anonymous1_1);
     47static inline struct __anonymous1 ___operator_assign__F13s__anonymous1_R13s__anonymous113s__anonymous1_autogen___1(struct __anonymous1 *___dst__R13s__anonymous1_1, struct __anonymous1 ___src__13s__anonymous1_1);
     48static inline void ___constructor__F_R13s__anonymous1_autogen___1(struct __anonymous1 *___dst__R13s__anonymous1_1){
     49    ((void)((*___dst__R13s__anonymous1_1).__i__i_1) /* ?{} */);
     50}
     51static inline void ___constructor__F_R13s__anonymous113s__anonymous1_autogen___1(struct __anonymous1 *___dst__R13s__anonymous1_1, struct __anonymous1 ___src__13s__anonymous1_1){
     52    ((void)((*___dst__R13s__anonymous1_1).__i__i_1=___src__13s__anonymous1_1.__i__i_1) /* ?{} */);
     53}
     54static inline void ___destructor__F_R13s__anonymous1_autogen___1(struct __anonymous1 *___dst__R13s__anonymous1_1){
     55    ((void)((*___dst__R13s__anonymous1_1).__i__i_1) /* ^?{} */);
     56}
     57static inline struct __anonymous1 ___operator_assign__F13s__anonymous1_R13s__anonymous113s__anonymous1_autogen___1(struct __anonymous1 *___dst__R13s__anonymous1_1, struct __anonymous1 ___src__13s__anonymous1_1){
    5858    struct __anonymous1 ___ret__13s__anonymous1_1;
    59     ((void)((*___dst__P13s__anonymous1_1).__i__i_1=___src__13s__anonymous1_1.__i__i_1));
    60     ((void)___constructor__F_P13s__anonymous113s__anonymous1_autogen___1((&___ret__13s__anonymous1_1), ___src__13s__anonymous1_1));
     59    ((void)((*___dst__R13s__anonymous1_1).__i__i_1=___src__13s__anonymous1_1.__i__i_1));
     60    ((void)___constructor__F_R13s__anonymous113s__anonymous1_autogen___1((&___ret__13s__anonymous1_1), ___src__13s__anonymous1_1));
    6161    return ((struct __anonymous1 )___ret__13s__anonymous1_1);
    6262}
    63 static inline void ___constructor__F_P13s__anonymous1i_autogen___1(struct __anonymous1 *___dst__P13s__anonymous1_1, int __i__i_1){
    64     ((void)((*((int *)(&(*___dst__P13s__anonymous1_1).__i__i_1)))=__i__i_1) /* ?{} */);
     63static inline void ___constructor__F_R13s__anonymous1i_autogen___1(struct __anonymous1 *___dst__R13s__anonymous1_1, int __i__i_1){
     64    ((void)((*___dst__R13s__anonymous1_1).__i__i_1=__i__i_1) /* ?{} */);
    6565}
    6666volatile const struct __anonymous1 __x11__CV13s__anonymous1_1;
     
    6868    int __i__i_1;
    6969};
    70 static inline void ___constructor__F_P13s__anonymous2_autogen___1(struct __anonymous2 *___dst__P13s__anonymous2_1);
    71 static inline void ___constructor__F_P13s__anonymous213s__anonymous2_autogen___1(struct __anonymous2 *___dst__P13s__anonymous2_1, struct __anonymous2 ___src__13s__anonymous2_1);
    72 static inline void ___destructor__F_P13s__anonymous2_autogen___1(struct __anonymous2 *___dst__P13s__anonymous2_1);
    73 static inline struct __anonymous2 ___operator_assign__F13s__anonymous2_P13s__anonymous213s__anonymous2_autogen___1(struct __anonymous2 *___dst__P13s__anonymous2_1, struct __anonymous2 ___src__13s__anonymous2_1);
    74 static inline void ___constructor__F_P13s__anonymous2_autogen___1(struct __anonymous2 *___dst__P13s__anonymous2_1){
    75     ((void)((*((int *)(&(*___dst__P13s__anonymous2_1).__i__i_1)))) /* ?{} */);
    76 }
    77 static inline void ___constructor__F_P13s__anonymous213s__anonymous2_autogen___1(struct __anonymous2 *___dst__P13s__anonymous2_1, struct __anonymous2 ___src__13s__anonymous2_1){
    78     ((void)((*((int *)(&(*___dst__P13s__anonymous2_1).__i__i_1)))=___src__13s__anonymous2_1.__i__i_1) /* ?{} */);
    79 }
    80 static inline void ___destructor__F_P13s__anonymous2_autogen___1(struct __anonymous2 *___dst__P13s__anonymous2_1){
    81     ((void)((*((int *)(&(*___dst__P13s__anonymous2_1).__i__i_1)))) /* ^?{} */);
    82 }
    83 static inline struct __anonymous2 ___operator_assign__F13s__anonymous2_P13s__anonymous213s__anonymous2_autogen___1(struct __anonymous2 *___dst__P13s__anonymous2_1, struct __anonymous2 ___src__13s__anonymous2_1){
     70static inline void ___constructor__F_R13s__anonymous2_autogen___1(struct __anonymous2 *___dst__R13s__anonymous2_1);
     71static inline void ___constructor__F_R13s__anonymous213s__anonymous2_autogen___1(struct __anonymous2 *___dst__R13s__anonymous2_1, struct __anonymous2 ___src__13s__anonymous2_1);
     72static inline void ___destructor__F_R13s__anonymous2_autogen___1(struct __anonymous2 *___dst__R13s__anonymous2_1);
     73static inline struct __anonymous2 ___operator_assign__F13s__anonymous2_R13s__anonymous213s__anonymous2_autogen___1(struct __anonymous2 *___dst__R13s__anonymous2_1, struct __anonymous2 ___src__13s__anonymous2_1);
     74static inline void ___constructor__F_R13s__anonymous2_autogen___1(struct __anonymous2 *___dst__R13s__anonymous2_1){
     75    ((void)((*___dst__R13s__anonymous2_1).__i__i_1) /* ?{} */);
     76}
     77static inline void ___constructor__F_R13s__anonymous213s__anonymous2_autogen___1(struct __anonymous2 *___dst__R13s__anonymous2_1, struct __anonymous2 ___src__13s__anonymous2_1){
     78    ((void)((*___dst__R13s__anonymous2_1).__i__i_1=___src__13s__anonymous2_1.__i__i_1) /* ?{} */);
     79}
     80static inline void ___destructor__F_R13s__anonymous2_autogen___1(struct __anonymous2 *___dst__R13s__anonymous2_1){
     81    ((void)((*___dst__R13s__anonymous2_1).__i__i_1) /* ^?{} */);
     82}
     83static inline struct __anonymous2 ___operator_assign__F13s__anonymous2_R13s__anonymous213s__anonymous2_autogen___1(struct __anonymous2 *___dst__R13s__anonymous2_1, struct __anonymous2 ___src__13s__anonymous2_1){
    8484    struct __anonymous2 ___ret__13s__anonymous2_1;
    85     ((void)((*___dst__P13s__anonymous2_1).__i__i_1=___src__13s__anonymous2_1.__i__i_1));
    86     ((void)___constructor__F_P13s__anonymous213s__anonymous2_autogen___1((&___ret__13s__anonymous2_1), ___src__13s__anonymous2_1));
     85    ((void)((*___dst__R13s__anonymous2_1).__i__i_1=___src__13s__anonymous2_1.__i__i_1));
     86    ((void)___constructor__F_R13s__anonymous213s__anonymous2_autogen___1((&___ret__13s__anonymous2_1), ___src__13s__anonymous2_1));
    8787    return ((struct __anonymous2 )___ret__13s__anonymous2_1);
    8888}
    89 static inline void ___constructor__F_P13s__anonymous2i_autogen___1(struct __anonymous2 *___dst__P13s__anonymous2_1, int __i__i_1){
    90     ((void)((*((int *)(&(*___dst__P13s__anonymous2_1).__i__i_1)))=__i__i_1) /* ?{} */);
     89static inline void ___constructor__F_R13s__anonymous2i_autogen___1(struct __anonymous2 *___dst__R13s__anonymous2_1, int __i__i_1){
     90    ((void)((*___dst__R13s__anonymous2_1).__i__i_1=__i__i_1) /* ?{} */);
    9191}
    9292volatile const struct __anonymous2 __x12__CV13s__anonymous2_1;
     
    9494    int __i__i_1;
    9595};
    96 static inline void ___constructor__F_P13s__anonymous3_autogen___1(struct __anonymous3 *___dst__P13s__anonymous3_1);
    97 static inline void ___constructor__F_P13s__anonymous313s__anonymous3_autogen___1(struct __anonymous3 *___dst__P13s__anonymous3_1, struct __anonymous3 ___src__13s__anonymous3_1);
    98 static inline void ___destructor__F_P13s__anonymous3_autogen___1(struct __anonymous3 *___dst__P13s__anonymous3_1);
    99 static inline struct __anonymous3 ___operator_assign__F13s__anonymous3_P13s__anonymous313s__anonymous3_autogen___1(struct __anonymous3 *___dst__P13s__anonymous3_1, struct __anonymous3 ___src__13s__anonymous3_1);
    100 static inline void ___constructor__F_P13s__anonymous3_autogen___1(struct __anonymous3 *___dst__P13s__anonymous3_1){
    101     ((void)((*((int *)(&(*___dst__P13s__anonymous3_1).__i__i_1)))) /* ?{} */);
    102 }
    103 static inline void ___constructor__F_P13s__anonymous313s__anonymous3_autogen___1(struct __anonymous3 *___dst__P13s__anonymous3_1, struct __anonymous3 ___src__13s__anonymous3_1){
    104     ((void)((*((int *)(&(*___dst__P13s__anonymous3_1).__i__i_1)))=___src__13s__anonymous3_1.__i__i_1) /* ?{} */);
    105 }
    106 static inline void ___destructor__F_P13s__anonymous3_autogen___1(struct __anonymous3 *___dst__P13s__anonymous3_1){
    107     ((void)((*((int *)(&(*___dst__P13s__anonymous3_1).__i__i_1)))) /* ^?{} */);
    108 }
    109 static inline struct __anonymous3 ___operator_assign__F13s__anonymous3_P13s__anonymous313s__anonymous3_autogen___1(struct __anonymous3 *___dst__P13s__anonymous3_1, struct __anonymous3 ___src__13s__anonymous3_1){
     96static inline void ___constructor__F_R13s__anonymous3_autogen___1(struct __anonymous3 *___dst__R13s__anonymous3_1);
     97static inline void ___constructor__F_R13s__anonymous313s__anonymous3_autogen___1(struct __anonymous3 *___dst__R13s__anonymous3_1, struct __anonymous3 ___src__13s__anonymous3_1);
     98static inline void ___destructor__F_R13s__anonymous3_autogen___1(struct __anonymous3 *___dst__R13s__anonymous3_1);
     99static inline struct __anonymous3 ___operator_assign__F13s__anonymous3_R13s__anonymous313s__anonymous3_autogen___1(struct __anonymous3 *___dst__R13s__anonymous3_1, struct __anonymous3 ___src__13s__anonymous3_1);
     100static inline void ___constructor__F_R13s__anonymous3_autogen___1(struct __anonymous3 *___dst__R13s__anonymous3_1){
     101    ((void)((*___dst__R13s__anonymous3_1).__i__i_1) /* ?{} */);
     102}
     103static inline void ___constructor__F_R13s__anonymous313s__anonymous3_autogen___1(struct __anonymous3 *___dst__R13s__anonymous3_1, struct __anonymous3 ___src__13s__anonymous3_1){
     104    ((void)((*___dst__R13s__anonymous3_1).__i__i_1=___src__13s__anonymous3_1.__i__i_1) /* ?{} */);
     105}
     106static inline void ___destructor__F_R13s__anonymous3_autogen___1(struct __anonymous3 *___dst__R13s__anonymous3_1){
     107    ((void)((*___dst__R13s__anonymous3_1).__i__i_1) /* ^?{} */);
     108}
     109static inline struct __anonymous3 ___operator_assign__F13s__anonymous3_R13s__anonymous313s__anonymous3_autogen___1(struct __anonymous3 *___dst__R13s__anonymous3_1, struct __anonymous3 ___src__13s__anonymous3_1){
    110110    struct __anonymous3 ___ret__13s__anonymous3_1;
    111     ((void)((*___dst__P13s__anonymous3_1).__i__i_1=___src__13s__anonymous3_1.__i__i_1));
    112     ((void)___constructor__F_P13s__anonymous313s__anonymous3_autogen___1((&___ret__13s__anonymous3_1), ___src__13s__anonymous3_1));
     111    ((void)((*___dst__R13s__anonymous3_1).__i__i_1=___src__13s__anonymous3_1.__i__i_1));
     112    ((void)___constructor__F_R13s__anonymous313s__anonymous3_autogen___1((&___ret__13s__anonymous3_1), ___src__13s__anonymous3_1));
    113113    return ((struct __anonymous3 )___ret__13s__anonymous3_1);
    114114}
    115 static inline void ___constructor__F_P13s__anonymous3i_autogen___1(struct __anonymous3 *___dst__P13s__anonymous3_1, int __i__i_1){
    116     ((void)((*((int *)(&(*___dst__P13s__anonymous3_1).__i__i_1)))=__i__i_1) /* ?{} */);
     115static inline void ___constructor__F_R13s__anonymous3i_autogen___1(struct __anonymous3 *___dst__R13s__anonymous3_1, int __i__i_1){
     116    ((void)((*___dst__R13s__anonymous3_1).__i__i_1=__i__i_1) /* ?{} */);
    117117}
    118118static volatile const struct __anonymous3 __x13__CV13s__anonymous3_1;
     
    120120    int __i__i_1;
    121121};
    122 static inline void ___constructor__F_P13s__anonymous4_autogen___1(struct __anonymous4 *___dst__P13s__anonymous4_1);
    123 static inline void ___constructor__F_P13s__anonymous413s__anonymous4_autogen___1(struct __anonymous4 *___dst__P13s__anonymous4_1, struct __anonymous4 ___src__13s__anonymous4_1);
    124 static inline void ___destructor__F_P13s__anonymous4_autogen___1(struct __anonymous4 *___dst__P13s__anonymous4_1);
    125 static inline struct __anonymous4 ___operator_assign__F13s__anonymous4_P13s__anonymous413s__anonymous4_autogen___1(struct __anonymous4 *___dst__P13s__anonymous4_1, struct __anonymous4 ___src__13s__anonymous4_1);
    126 static inline void ___constructor__F_P13s__anonymous4_autogen___1(struct __anonymous4 *___dst__P13s__anonymous4_1){
    127     ((void)((*((int *)(&(*___dst__P13s__anonymous4_1).__i__i_1)))) /* ?{} */);
    128 }
    129 static inline void ___constructor__F_P13s__anonymous413s__anonymous4_autogen___1(struct __anonymous4 *___dst__P13s__anonymous4_1, struct __anonymous4 ___src__13s__anonymous4_1){
    130     ((void)((*((int *)(&(*___dst__P13s__anonymous4_1).__i__i_1)))=___src__13s__anonymous4_1.__i__i_1) /* ?{} */);
    131 }
    132 static inline void ___destructor__F_P13s__anonymous4_autogen___1(struct __anonymous4 *___dst__P13s__anonymous4_1){
    133     ((void)((*((int *)(&(*___dst__P13s__anonymous4_1).__i__i_1)))) /* ^?{} */);
    134 }
    135 static inline struct __anonymous4 ___operator_assign__F13s__anonymous4_P13s__anonymous413s__anonymous4_autogen___1(struct __anonymous4 *___dst__P13s__anonymous4_1, struct __anonymous4 ___src__13s__anonymous4_1){
     122static inline void ___constructor__F_R13s__anonymous4_autogen___1(struct __anonymous4 *___dst__R13s__anonymous4_1);
     123static inline void ___constructor__F_R13s__anonymous413s__anonymous4_autogen___1(struct __anonymous4 *___dst__R13s__anonymous4_1, struct __anonymous4 ___src__13s__anonymous4_1);
     124static inline void ___destructor__F_R13s__anonymous4_autogen___1(struct __anonymous4 *___dst__R13s__anonymous4_1);
     125static inline struct __anonymous4 ___operator_assign__F13s__anonymous4_R13s__anonymous413s__anonymous4_autogen___1(struct __anonymous4 *___dst__R13s__anonymous4_1, struct __anonymous4 ___src__13s__anonymous4_1);
     126static inline void ___constructor__F_R13s__anonymous4_autogen___1(struct __anonymous4 *___dst__R13s__anonymous4_1){
     127    ((void)((*___dst__R13s__anonymous4_1).__i__i_1) /* ?{} */);
     128}
     129static inline void ___constructor__F_R13s__anonymous413s__anonymous4_autogen___1(struct __anonymous4 *___dst__R13s__anonymous4_1, struct __anonymous4 ___src__13s__anonymous4_1){
     130    ((void)((*___dst__R13s__anonymous4_1).__i__i_1=___src__13s__anonymous4_1.__i__i_1) /* ?{} */);
     131}
     132static inline void ___destructor__F_R13s__anonymous4_autogen___1(struct __anonymous4 *___dst__R13s__anonymous4_1){
     133    ((void)((*___dst__R13s__anonymous4_1).__i__i_1) /* ^?{} */);
     134}
     135static inline struct __anonymous4 ___operator_assign__F13s__anonymous4_R13s__anonymous413s__anonymous4_autogen___1(struct __anonymous4 *___dst__R13s__anonymous4_1, struct __anonymous4 ___src__13s__anonymous4_1){
    136136    struct __anonymous4 ___ret__13s__anonymous4_1;
    137     ((void)((*___dst__P13s__anonymous4_1).__i__i_1=___src__13s__anonymous4_1.__i__i_1));
    138     ((void)___constructor__F_P13s__anonymous413s__anonymous4_autogen___1((&___ret__13s__anonymous4_1), ___src__13s__anonymous4_1));
     137    ((void)((*___dst__R13s__anonymous4_1).__i__i_1=___src__13s__anonymous4_1.__i__i_1));
     138    ((void)___constructor__F_R13s__anonymous413s__anonymous4_autogen___1((&___ret__13s__anonymous4_1), ___src__13s__anonymous4_1));
    139139    return ((struct __anonymous4 )___ret__13s__anonymous4_1);
    140140}
    141 static inline void ___constructor__F_P13s__anonymous4i_autogen___1(struct __anonymous4 *___dst__P13s__anonymous4_1, int __i__i_1){
    142     ((void)((*((int *)(&(*___dst__P13s__anonymous4_1).__i__i_1)))=__i__i_1) /* ?{} */);
     141static inline void ___constructor__F_R13s__anonymous4i_autogen___1(struct __anonymous4 *___dst__R13s__anonymous4_1, int __i__i_1){
     142    ((void)((*___dst__R13s__anonymous4_1).__i__i_1=__i__i_1) /* ?{} */);
    143143}
    144144static volatile const struct __anonymous4 __x14__CV13s__anonymous4_1;
     
    146146    int __i__i_1;
    147147};
    148 static inline void ___constructor__F_P13s__anonymous5_autogen___1(struct __anonymous5 *___dst__P13s__anonymous5_1);
    149 static inline void ___constructor__F_P13s__anonymous513s__anonymous5_autogen___1(struct __anonymous5 *___dst__P13s__anonymous5_1, struct __anonymous5 ___src__13s__anonymous5_1);
    150 static inline void ___destructor__F_P13s__anonymous5_autogen___1(struct __anonymous5 *___dst__P13s__anonymous5_1);
    151 static inline struct __anonymous5 ___operator_assign__F13s__anonymous5_P13s__anonymous513s__anonymous5_autogen___1(struct __anonymous5 *___dst__P13s__anonymous5_1, struct __anonymous5 ___src__13s__anonymous5_1);
    152 static inline void ___constructor__F_P13s__anonymous5_autogen___1(struct __anonymous5 *___dst__P13s__anonymous5_1){
    153     ((void)((*((int *)(&(*___dst__P13s__anonymous5_1).__i__i_1)))) /* ?{} */);
    154 }
    155 static inline void ___constructor__F_P13s__anonymous513s__anonymous5_autogen___1(struct __anonymous5 *___dst__P13s__anonymous5_1, struct __anonymous5 ___src__13s__anonymous5_1){
    156     ((void)((*((int *)(&(*___dst__P13s__anonymous5_1).__i__i_1)))=___src__13s__anonymous5_1.__i__i_1) /* ?{} */);
    157 }
    158 static inline void ___destructor__F_P13s__anonymous5_autogen___1(struct __anonymous5 *___dst__P13s__anonymous5_1){
    159     ((void)((*((int *)(&(*___dst__P13s__anonymous5_1).__i__i_1)))) /* ^?{} */);
    160 }
    161 static inline struct __anonymous5 ___operator_assign__F13s__anonymous5_P13s__anonymous513s__anonymous5_autogen___1(struct __anonymous5 *___dst__P13s__anonymous5_1, struct __anonymous5 ___src__13s__anonymous5_1){
     148static inline void ___constructor__F_R13s__anonymous5_autogen___1(struct __anonymous5 *___dst__R13s__anonymous5_1);
     149static inline void ___constructor__F_R13s__anonymous513s__anonymous5_autogen___1(struct __anonymous5 *___dst__R13s__anonymous5_1, struct __anonymous5 ___src__13s__anonymous5_1);
     150static inline void ___destructor__F_R13s__anonymous5_autogen___1(struct __anonymous5 *___dst__R13s__anonymous5_1);
     151static inline struct __anonymous5 ___operator_assign__F13s__anonymous5_R13s__anonymous513s__anonymous5_autogen___1(struct __anonymous5 *___dst__R13s__anonymous5_1, struct __anonymous5 ___src__13s__anonymous5_1);
     152static inline void ___constructor__F_R13s__anonymous5_autogen___1(struct __anonymous5 *___dst__R13s__anonymous5_1){
     153    ((void)((*___dst__R13s__anonymous5_1).__i__i_1) /* ?{} */);
     154}
     155static inline void ___constructor__F_R13s__anonymous513s__anonymous5_autogen___1(struct __anonymous5 *___dst__R13s__anonymous5_1, struct __anonymous5 ___src__13s__anonymous5_1){
     156    ((void)((*___dst__R13s__anonymous5_1).__i__i_1=___src__13s__anonymous5_1.__i__i_1) /* ?{} */);
     157}
     158static inline void ___destructor__F_R13s__anonymous5_autogen___1(struct __anonymous5 *___dst__R13s__anonymous5_1){
     159    ((void)((*___dst__R13s__anonymous5_1).__i__i_1) /* ^?{} */);
     160}
     161static inline struct __anonymous5 ___operator_assign__F13s__anonymous5_R13s__anonymous513s__anonymous5_autogen___1(struct __anonymous5 *___dst__R13s__anonymous5_1, struct __anonymous5 ___src__13s__anonymous5_1){
    162162    struct __anonymous5 ___ret__13s__anonymous5_1;
    163     ((void)((*___dst__P13s__anonymous5_1).__i__i_1=___src__13s__anonymous5_1.__i__i_1));
    164     ((void)___constructor__F_P13s__anonymous513s__anonymous5_autogen___1((&___ret__13s__anonymous5_1), ___src__13s__anonymous5_1));
     163    ((void)((*___dst__R13s__anonymous5_1).__i__i_1=___src__13s__anonymous5_1.__i__i_1));
     164    ((void)___constructor__F_R13s__anonymous513s__anonymous5_autogen___1((&___ret__13s__anonymous5_1), ___src__13s__anonymous5_1));
    165165    return ((struct __anonymous5 )___ret__13s__anonymous5_1);
    166166}
    167 static inline void ___constructor__F_P13s__anonymous5i_autogen___1(struct __anonymous5 *___dst__P13s__anonymous5_1, int __i__i_1){
    168     ((void)((*((int *)(&(*___dst__P13s__anonymous5_1).__i__i_1)))=__i__i_1) /* ?{} */);
     167static inline void ___constructor__F_R13s__anonymous5i_autogen___1(struct __anonymous5 *___dst__R13s__anonymous5_1, int __i__i_1){
     168    ((void)((*___dst__R13s__anonymous5_1).__i__i_1=__i__i_1) /* ?{} */);
    169169}
    170170static volatile const struct __anonymous5 __x15__CV13s__anonymous5_1;
     
    172172    int __i__i_1;
    173173};
    174 static inline void ___constructor__F_P13s__anonymous6_autogen___1(struct __anonymous6 *___dst__P13s__anonymous6_1);
    175 static inline void ___constructor__F_P13s__anonymous613s__anonymous6_autogen___1(struct __anonymous6 *___dst__P13s__anonymous6_1, struct __anonymous6 ___src__13s__anonymous6_1);
    176 static inline void ___destructor__F_P13s__anonymous6_autogen___1(struct __anonymous6 *___dst__P13s__anonymous6_1);
    177 static inline struct __anonymous6 ___operator_assign__F13s__anonymous6_P13s__anonymous613s__anonymous6_autogen___1(struct __anonymous6 *___dst__P13s__anonymous6_1, struct __anonymous6 ___src__13s__anonymous6_1);
    178 static inline void ___constructor__F_P13s__anonymous6_autogen___1(struct __anonymous6 *___dst__P13s__anonymous6_1){
    179     ((void)((*((int *)(&(*___dst__P13s__anonymous6_1).__i__i_1)))) /* ?{} */);
    180 }
    181 static inline void ___constructor__F_P13s__anonymous613s__anonymous6_autogen___1(struct __anonymous6 *___dst__P13s__anonymous6_1, struct __anonymous6 ___src__13s__anonymous6_1){
    182     ((void)((*((int *)(&(*___dst__P13s__anonymous6_1).__i__i_1)))=___src__13s__anonymous6_1.__i__i_1) /* ?{} */);
    183 }
    184 static inline void ___destructor__F_P13s__anonymous6_autogen___1(struct __anonymous6 *___dst__P13s__anonymous6_1){
    185     ((void)((*((int *)(&(*___dst__P13s__anonymous6_1).__i__i_1)))) /* ^?{} */);
    186 }
    187 static inline struct __anonymous6 ___operator_assign__F13s__anonymous6_P13s__anonymous613s__anonymous6_autogen___1(struct __anonymous6 *___dst__P13s__anonymous6_1, struct __anonymous6 ___src__13s__anonymous6_1){
     174static inline void ___constructor__F_R13s__anonymous6_autogen___1(struct __anonymous6 *___dst__R13s__anonymous6_1);
     175static inline void ___constructor__F_R13s__anonymous613s__anonymous6_autogen___1(struct __anonymous6 *___dst__R13s__anonymous6_1, struct __anonymous6 ___src__13s__anonymous6_1);
     176static inline void ___destructor__F_R13s__anonymous6_autogen___1(struct __anonymous6 *___dst__R13s__anonymous6_1);
     177static inline struct __anonymous6 ___operator_assign__F13s__anonymous6_R13s__anonymous613s__anonymous6_autogen___1(struct __anonymous6 *___dst__R13s__anonymous6_1, struct __anonymous6 ___src__13s__anonymous6_1);
     178static inline void ___constructor__F_R13s__anonymous6_autogen___1(struct __anonymous6 *___dst__R13s__anonymous6_1){
     179    ((void)((*___dst__R13s__anonymous6_1).__i__i_1) /* ?{} */);
     180}
     181static inline void ___constructor__F_R13s__anonymous613s__anonymous6_autogen___1(struct __anonymous6 *___dst__R13s__anonymous6_1, struct __anonymous6 ___src__13s__anonymous6_1){
     182    ((void)((*___dst__R13s__anonymous6_1).__i__i_1=___src__13s__anonymous6_1.__i__i_1) /* ?{} */);
     183}
     184static inline void ___destructor__F_R13s__anonymous6_autogen___1(struct __anonymous6 *___dst__R13s__anonymous6_1){
     185    ((void)((*___dst__R13s__anonymous6_1).__i__i_1) /* ^?{} */);
     186}
     187static inline struct __anonymous6 ___operator_assign__F13s__anonymous6_R13s__anonymous613s__anonymous6_autogen___1(struct __anonymous6 *___dst__R13s__anonymous6_1, struct __anonymous6 ___src__13s__anonymous6_1){
    188188    struct __anonymous6 ___ret__13s__anonymous6_1;
    189     ((void)((*___dst__P13s__anonymous6_1).__i__i_1=___src__13s__anonymous6_1.__i__i_1));
    190     ((void)___constructor__F_P13s__anonymous613s__anonymous6_autogen___1((&___ret__13s__anonymous6_1), ___src__13s__anonymous6_1));
     189    ((void)((*___dst__R13s__anonymous6_1).__i__i_1=___src__13s__anonymous6_1.__i__i_1));
     190    ((void)___constructor__F_R13s__anonymous613s__anonymous6_autogen___1((&___ret__13s__anonymous6_1), ___src__13s__anonymous6_1));
    191191    return ((struct __anonymous6 )___ret__13s__anonymous6_1);
    192192}
    193 static inline void ___constructor__F_P13s__anonymous6i_autogen___1(struct __anonymous6 *___dst__P13s__anonymous6_1, int __i__i_1){
    194     ((void)((*((int *)(&(*___dst__P13s__anonymous6_1).__i__i_1)))=__i__i_1) /* ?{} */);
     193static inline void ___constructor__F_R13s__anonymous6i_autogen___1(struct __anonymous6 *___dst__R13s__anonymous6_1, int __i__i_1){
     194    ((void)((*___dst__R13s__anonymous6_1).__i__i_1=__i__i_1) /* ?{} */);
    195195}
    196196static volatile const struct __anonymous6 __x16__CV13s__anonymous6_1;
     
    198198    int __i__i_1;
    199199};
    200 static inline void ___constructor__F_P13s__anonymous7_autogen___1(struct __anonymous7 *___dst__P13s__anonymous7_1);
    201 static inline void ___constructor__F_P13s__anonymous713s__anonymous7_autogen___1(struct __anonymous7 *___dst__P13s__anonymous7_1, struct __anonymous7 ___src__13s__anonymous7_1);
    202 static inline void ___destructor__F_P13s__anonymous7_autogen___1(struct __anonymous7 *___dst__P13s__anonymous7_1);
    203 static inline struct __anonymous7 ___operator_assign__F13s__anonymous7_P13s__anonymous713s__anonymous7_autogen___1(struct __anonymous7 *___dst__P13s__anonymous7_1, struct __anonymous7 ___src__13s__anonymous7_1);
    204 static inline void ___constructor__F_P13s__anonymous7_autogen___1(struct __anonymous7 *___dst__P13s__anonymous7_1){
    205     ((void)((*((int *)(&(*___dst__P13s__anonymous7_1).__i__i_1)))) /* ?{} */);
    206 }
    207 static inline void ___constructor__F_P13s__anonymous713s__anonymous7_autogen___1(struct __anonymous7 *___dst__P13s__anonymous7_1, struct __anonymous7 ___src__13s__anonymous7_1){
    208     ((void)((*((int *)(&(*___dst__P13s__anonymous7_1).__i__i_1)))=___src__13s__anonymous7_1.__i__i_1) /* ?{} */);
    209 }
    210 static inline void ___destructor__F_P13s__anonymous7_autogen___1(struct __anonymous7 *___dst__P13s__anonymous7_1){
    211     ((void)((*((int *)(&(*___dst__P13s__anonymous7_1).__i__i_1)))) /* ^?{} */);
    212 }
    213 static inline struct __anonymous7 ___operator_assign__F13s__anonymous7_P13s__anonymous713s__anonymous7_autogen___1(struct __anonymous7 *___dst__P13s__anonymous7_1, struct __anonymous7 ___src__13s__anonymous7_1){
     200static inline void ___constructor__F_R13s__anonymous7_autogen___1(struct __anonymous7 *___dst__R13s__anonymous7_1);
     201static inline void ___constructor__F_R13s__anonymous713s__anonymous7_autogen___1(struct __anonymous7 *___dst__R13s__anonymous7_1, struct __anonymous7 ___src__13s__anonymous7_1);
     202static inline void ___destructor__F_R13s__anonymous7_autogen___1(struct __anonymous7 *___dst__R13s__anonymous7_1);
     203static inline struct __anonymous7 ___operator_assign__F13s__anonymous7_R13s__anonymous713s__anonymous7_autogen___1(struct __anonymous7 *___dst__R13s__anonymous7_1, struct __anonymous7 ___src__13s__anonymous7_1);
     204static inline void ___constructor__F_R13s__anonymous7_autogen___1(struct __anonymous7 *___dst__R13s__anonymous7_1){
     205    ((void)((*___dst__R13s__anonymous7_1).__i__i_1) /* ?{} */);
     206}
     207static inline void ___constructor__F_R13s__anonymous713s__anonymous7_autogen___1(struct __anonymous7 *___dst__R13s__anonymous7_1, struct __anonymous7 ___src__13s__anonymous7_1){
     208    ((void)((*___dst__R13s__anonymous7_1).__i__i_1=___src__13s__anonymous7_1.__i__i_1) /* ?{} */);
     209}
     210static inline void ___destructor__F_R13s__anonymous7_autogen___1(struct __anonymous7 *___dst__R13s__anonymous7_1){
     211    ((void)((*___dst__R13s__anonymous7_1).__i__i_1) /* ^?{} */);
     212}
     213static inline struct __anonymous7 ___operator_assign__F13s__anonymous7_R13s__anonymous713s__anonymous7_autogen___1(struct __anonymous7 *___dst__R13s__anonymous7_1, struct __anonymous7 ___src__13s__anonymous7_1){
    214214    struct __anonymous7 ___ret__13s__anonymous7_1;
    215     ((void)((*___dst__P13s__anonymous7_1).__i__i_1=___src__13s__anonymous7_1.__i__i_1));
    216     ((void)___constructor__F_P13s__anonymous713s__anonymous7_autogen___1((&___ret__13s__anonymous7_1), ___src__13s__anonymous7_1));
     215    ((void)((*___dst__R13s__anonymous7_1).__i__i_1=___src__13s__anonymous7_1.__i__i_1));
     216    ((void)___constructor__F_R13s__anonymous713s__anonymous7_autogen___1((&___ret__13s__anonymous7_1), ___src__13s__anonymous7_1));
    217217    return ((struct __anonymous7 )___ret__13s__anonymous7_1);
    218218}
    219 static inline void ___constructor__F_P13s__anonymous7i_autogen___1(struct __anonymous7 *___dst__P13s__anonymous7_1, int __i__i_1){
    220     ((void)((*((int *)(&(*___dst__P13s__anonymous7_1).__i__i_1)))=__i__i_1) /* ?{} */);
     219static inline void ___constructor__F_R13s__anonymous7i_autogen___1(struct __anonymous7 *___dst__R13s__anonymous7_1, int __i__i_1){
     220    ((void)((*___dst__R13s__anonymous7_1).__i__i_1=__i__i_1) /* ?{} */);
    221221}
    222222static volatile const struct __anonymous7 __x17__CV13s__anonymous7_1;
     
    232232    short __i__s_1;
    233233};
    234 static inline void ___constructor__F_P13s__anonymous8_autogen___1(struct __anonymous8 *___dst__P13s__anonymous8_1);
    235 static inline void ___constructor__F_P13s__anonymous813s__anonymous8_autogen___1(struct __anonymous8 *___dst__P13s__anonymous8_1, struct __anonymous8 ___src__13s__anonymous8_1);
    236 static inline void ___destructor__F_P13s__anonymous8_autogen___1(struct __anonymous8 *___dst__P13s__anonymous8_1);
    237 static inline struct __anonymous8 ___operator_assign__F13s__anonymous8_P13s__anonymous813s__anonymous8_autogen___1(struct __anonymous8 *___dst__P13s__anonymous8_1, struct __anonymous8 ___src__13s__anonymous8_1);
    238 static inline void ___constructor__F_P13s__anonymous8_autogen___1(struct __anonymous8 *___dst__P13s__anonymous8_1){
    239     ((void)((*((short *)(&(*___dst__P13s__anonymous8_1).__i__s_1)))) /* ?{} */);
    240 }
    241 static inline void ___constructor__F_P13s__anonymous813s__anonymous8_autogen___1(struct __anonymous8 *___dst__P13s__anonymous8_1, struct __anonymous8 ___src__13s__anonymous8_1){
    242     ((void)((*((short *)(&(*___dst__P13s__anonymous8_1).__i__s_1)))=___src__13s__anonymous8_1.__i__s_1) /* ?{} */);
    243 }
    244 static inline void ___destructor__F_P13s__anonymous8_autogen___1(struct __anonymous8 *___dst__P13s__anonymous8_1){
    245     ((void)((*((short *)(&(*___dst__P13s__anonymous8_1).__i__s_1)))) /* ^?{} */);
    246 }
    247 static inline struct __anonymous8 ___operator_assign__F13s__anonymous8_P13s__anonymous813s__anonymous8_autogen___1(struct __anonymous8 *___dst__P13s__anonymous8_1, struct __anonymous8 ___src__13s__anonymous8_1){
     234static inline void ___constructor__F_R13s__anonymous8_autogen___1(struct __anonymous8 *___dst__R13s__anonymous8_1);
     235static inline void ___constructor__F_R13s__anonymous813s__anonymous8_autogen___1(struct __anonymous8 *___dst__R13s__anonymous8_1, struct __anonymous8 ___src__13s__anonymous8_1);
     236static inline void ___destructor__F_R13s__anonymous8_autogen___1(struct __anonymous8 *___dst__R13s__anonymous8_1);
     237static inline struct __anonymous8 ___operator_assign__F13s__anonymous8_R13s__anonymous813s__anonymous8_autogen___1(struct __anonymous8 *___dst__R13s__anonymous8_1, struct __anonymous8 ___src__13s__anonymous8_1);
     238static inline void ___constructor__F_R13s__anonymous8_autogen___1(struct __anonymous8 *___dst__R13s__anonymous8_1){
     239    ((void)((*___dst__R13s__anonymous8_1).__i__s_1) /* ?{} */);
     240}
     241static inline void ___constructor__F_R13s__anonymous813s__anonymous8_autogen___1(struct __anonymous8 *___dst__R13s__anonymous8_1, struct __anonymous8 ___src__13s__anonymous8_1){
     242    ((void)((*___dst__R13s__anonymous8_1).__i__s_1=___src__13s__anonymous8_1.__i__s_1) /* ?{} */);
     243}
     244static inline void ___destructor__F_R13s__anonymous8_autogen___1(struct __anonymous8 *___dst__R13s__anonymous8_1){
     245    ((void)((*___dst__R13s__anonymous8_1).__i__s_1) /* ^?{} */);
     246}
     247static inline struct __anonymous8 ___operator_assign__F13s__anonymous8_R13s__anonymous813s__anonymous8_autogen___1(struct __anonymous8 *___dst__R13s__anonymous8_1, struct __anonymous8 ___src__13s__anonymous8_1){
    248248    struct __anonymous8 ___ret__13s__anonymous8_1;
    249     ((void)((*___dst__P13s__anonymous8_1).__i__s_1=___src__13s__anonymous8_1.__i__s_1));
    250     ((void)___constructor__F_P13s__anonymous813s__anonymous8_autogen___1((&___ret__13s__anonymous8_1), ___src__13s__anonymous8_1));
     249    ((void)((*___dst__R13s__anonymous8_1).__i__s_1=___src__13s__anonymous8_1.__i__s_1));
     250    ((void)___constructor__F_R13s__anonymous813s__anonymous8_autogen___1((&___ret__13s__anonymous8_1), ___src__13s__anonymous8_1));
    251251    return ((struct __anonymous8 )___ret__13s__anonymous8_1);
    252252}
    253 static inline void ___constructor__F_P13s__anonymous8s_autogen___1(struct __anonymous8 *___dst__P13s__anonymous8_1, short __i__s_1){
    254     ((void)((*((short *)(&(*___dst__P13s__anonymous8_1).__i__s_1)))=__i__s_1) /* ?{} */);
     253static inline void ___constructor__F_R13s__anonymous8s_autogen___1(struct __anonymous8 *___dst__R13s__anonymous8_1, short __i__s_1){
     254    ((void)((*___dst__R13s__anonymous8_1).__i__s_1=__i__s_1) /* ?{} */);
    255255}
    256256volatile const struct __anonymous8 __x29__CV13s__anonymous8_1;
     
    258258    short __i__s_1;
    259259};
    260 static inline void ___constructor__F_P13s__anonymous9_autogen___1(struct __anonymous9 *___dst__P13s__anonymous9_1);
    261 static inline void ___constructor__F_P13s__anonymous913s__anonymous9_autogen___1(struct __anonymous9 *___dst__P13s__anonymous9_1, struct __anonymous9 ___src__13s__anonymous9_1);
    262 static inline void ___destructor__F_P13s__anonymous9_autogen___1(struct __anonymous9 *___dst__P13s__anonymous9_1);
    263 static inline struct __anonymous9 ___operator_assign__F13s__anonymous9_P13s__anonymous913s__anonymous9_autogen___1(struct __anonymous9 *___dst__P13s__anonymous9_1, struct __anonymous9 ___src__13s__anonymous9_1);
    264 static inline void ___constructor__F_P13s__anonymous9_autogen___1(struct __anonymous9 *___dst__P13s__anonymous9_1){
    265     ((void)((*((short *)(&(*___dst__P13s__anonymous9_1).__i__s_1)))) /* ?{} */);
    266 }
    267 static inline void ___constructor__F_P13s__anonymous913s__anonymous9_autogen___1(struct __anonymous9 *___dst__P13s__anonymous9_1, struct __anonymous9 ___src__13s__anonymous9_1){
    268     ((void)((*((short *)(&(*___dst__P13s__anonymous9_1).__i__s_1)))=___src__13s__anonymous9_1.__i__s_1) /* ?{} */);
    269 }
    270 static inline void ___destructor__F_P13s__anonymous9_autogen___1(struct __anonymous9 *___dst__P13s__anonymous9_1){
    271     ((void)((*((short *)(&(*___dst__P13s__anonymous9_1).__i__s_1)))) /* ^?{} */);
    272 }
    273 static inline struct __anonymous9 ___operator_assign__F13s__anonymous9_P13s__anonymous913s__anonymous9_autogen___1(struct __anonymous9 *___dst__P13s__anonymous9_1, struct __anonymous9 ___src__13s__anonymous9_1){
     260static inline void ___constructor__F_R13s__anonymous9_autogen___1(struct __anonymous9 *___dst__R13s__anonymous9_1);
     261static inline void ___constructor__F_R13s__anonymous913s__anonymous9_autogen___1(struct __anonymous9 *___dst__R13s__anonymous9_1, struct __anonymous9 ___src__13s__anonymous9_1);
     262static inline void ___destructor__F_R13s__anonymous9_autogen___1(struct __anonymous9 *___dst__R13s__anonymous9_1);
     263static inline struct __anonymous9 ___operator_assign__F13s__anonymous9_R13s__anonymous913s__anonymous9_autogen___1(struct __anonymous9 *___dst__R13s__anonymous9_1, struct __anonymous9 ___src__13s__anonymous9_1);
     264static inline void ___constructor__F_R13s__anonymous9_autogen___1(struct __anonymous9 *___dst__R13s__anonymous9_1){
     265    ((void)((*___dst__R13s__anonymous9_1).__i__s_1) /* ?{} */);
     266}
     267static inline void ___constructor__F_R13s__anonymous913s__anonymous9_autogen___1(struct __anonymous9 *___dst__R13s__anonymous9_1, struct __anonymous9 ___src__13s__anonymous9_1){
     268    ((void)((*___dst__R13s__anonymous9_1).__i__s_1=___src__13s__anonymous9_1.__i__s_1) /* ?{} */);
     269}
     270static inline void ___destructor__F_R13s__anonymous9_autogen___1(struct __anonymous9 *___dst__R13s__anonymous9_1){
     271    ((void)((*___dst__R13s__anonymous9_1).__i__s_1) /* ^?{} */);
     272}
     273static inline struct __anonymous9 ___operator_assign__F13s__anonymous9_R13s__anonymous913s__anonymous9_autogen___1(struct __anonymous9 *___dst__R13s__anonymous9_1, struct __anonymous9 ___src__13s__anonymous9_1){
    274274    struct __anonymous9 ___ret__13s__anonymous9_1;
    275     ((void)((*___dst__P13s__anonymous9_1).__i__s_1=___src__13s__anonymous9_1.__i__s_1));
    276     ((void)___constructor__F_P13s__anonymous913s__anonymous9_autogen___1((&___ret__13s__anonymous9_1), ___src__13s__anonymous9_1));
     275    ((void)((*___dst__R13s__anonymous9_1).__i__s_1=___src__13s__anonymous9_1.__i__s_1));
     276    ((void)___constructor__F_R13s__anonymous913s__anonymous9_autogen___1((&___ret__13s__anonymous9_1), ___src__13s__anonymous9_1));
    277277    return ((struct __anonymous9 )___ret__13s__anonymous9_1);
    278278}
    279 static inline void ___constructor__F_P13s__anonymous9s_autogen___1(struct __anonymous9 *___dst__P13s__anonymous9_1, short __i__s_1){
    280     ((void)((*((short *)(&(*___dst__P13s__anonymous9_1).__i__s_1)))=__i__s_1) /* ?{} */);
     279static inline void ___constructor__F_R13s__anonymous9s_autogen___1(struct __anonymous9 *___dst__R13s__anonymous9_1, short __i__s_1){
     280    ((void)((*___dst__R13s__anonymous9_1).__i__s_1=__i__s_1) /* ?{} */);
    281281}
    282282volatile const struct __anonymous9 __x30__CV13s__anonymous9_1;
     
    284284    short __i__s_1;
    285285};
    286 static inline void ___constructor__F_P14s__anonymous10_autogen___1(struct __anonymous10 *___dst__P14s__anonymous10_1);
    287 static inline void ___constructor__F_P14s__anonymous1014s__anonymous10_autogen___1(struct __anonymous10 *___dst__P14s__anonymous10_1, struct __anonymous10 ___src__14s__anonymous10_1);
    288 static inline void ___destructor__F_P14s__anonymous10_autogen___1(struct __anonymous10 *___dst__P14s__anonymous10_1);
    289 static inline struct __anonymous10 ___operator_assign__F14s__anonymous10_P14s__anonymous1014s__anonymous10_autogen___1(struct __anonymous10 *___dst__P14s__anonymous10_1, struct __anonymous10 ___src__14s__anonymous10_1);
    290 static inline void ___constructor__F_P14s__anonymous10_autogen___1(struct __anonymous10 *___dst__P14s__anonymous10_1){
    291     ((void)((*((short *)(&(*___dst__P14s__anonymous10_1).__i__s_1)))) /* ?{} */);
    292 }
    293 static inline void ___constructor__F_P14s__anonymous1014s__anonymous10_autogen___1(struct __anonymous10 *___dst__P14s__anonymous10_1, struct __anonymous10 ___src__14s__anonymous10_1){
    294     ((void)((*((short *)(&(*___dst__P14s__anonymous10_1).__i__s_1)))=___src__14s__anonymous10_1.__i__s_1) /* ?{} */);
    295 }
    296 static inline void ___destructor__F_P14s__anonymous10_autogen___1(struct __anonymous10 *___dst__P14s__anonymous10_1){
    297     ((void)((*((short *)(&(*___dst__P14s__anonymous10_1).__i__s_1)))) /* ^?{} */);
    298 }
    299 static inline struct __anonymous10 ___operator_assign__F14s__anonymous10_P14s__anonymous1014s__anonymous10_autogen___1(struct __anonymous10 *___dst__P14s__anonymous10_1, struct __anonymous10 ___src__14s__anonymous10_1){
     286static inline void ___constructor__F_R14s__anonymous10_autogen___1(struct __anonymous10 *___dst__R14s__anonymous10_1);
     287static inline void ___constructor__F_R14s__anonymous1014s__anonymous10_autogen___1(struct __anonymous10 *___dst__R14s__anonymous10_1, struct __anonymous10 ___src__14s__anonymous10_1);
     288static inline void ___destructor__F_R14s__anonymous10_autogen___1(struct __anonymous10 *___dst__R14s__anonymous10_1);
     289static inline struct __anonymous10 ___operator_assign__F14s__anonymous10_R14s__anonymous1014s__anonymous10_autogen___1(struct __anonymous10 *___dst__R14s__anonymous10_1, struct __anonymous10 ___src__14s__anonymous10_1);
     290static inline void ___constructor__F_R14s__anonymous10_autogen___1(struct __anonymous10 *___dst__R14s__anonymous10_1){
     291    ((void)((*___dst__R14s__anonymous10_1).__i__s_1) /* ?{} */);
     292}
     293static inline void ___constructor__F_R14s__anonymous1014s__anonymous10_autogen___1(struct __anonymous10 *___dst__R14s__anonymous10_1, struct __anonymous10 ___src__14s__anonymous10_1){
     294    ((void)((*___dst__R14s__anonymous10_1).__i__s_1=___src__14s__anonymous10_1.__i__s_1) /* ?{} */);
     295}
     296static inline void ___destructor__F_R14s__anonymous10_autogen___1(struct __anonymous10 *___dst__R14s__anonymous10_1){
     297    ((void)((*___dst__R14s__anonymous10_1).__i__s_1) /* ^?{} */);
     298}
     299static inline struct __anonymous10 ___operator_assign__F14s__anonymous10_R14s__anonymous1014s__anonymous10_autogen___1(struct __anonymous10 *___dst__R14s__anonymous10_1, struct __anonymous10 ___src__14s__anonymous10_1){
    300300    struct __anonymous10 ___ret__14s__anonymous10_1;
    301     ((void)((*___dst__P14s__anonymous10_1).__i__s_1=___src__14s__anonymous10_1.__i__s_1));
    302     ((void)___constructor__F_P14s__anonymous1014s__anonymous10_autogen___1((&___ret__14s__anonymous10_1), ___src__14s__anonymous10_1));
     301    ((void)((*___dst__R14s__anonymous10_1).__i__s_1=___src__14s__anonymous10_1.__i__s_1));
     302    ((void)___constructor__F_R14s__anonymous1014s__anonymous10_autogen___1((&___ret__14s__anonymous10_1), ___src__14s__anonymous10_1));
    303303    return ((struct __anonymous10 )___ret__14s__anonymous10_1);
    304304}
    305 static inline void ___constructor__F_P14s__anonymous10s_autogen___1(struct __anonymous10 *___dst__P14s__anonymous10_1, short __i__s_1){
    306     ((void)((*((short *)(&(*___dst__P14s__anonymous10_1).__i__s_1)))=__i__s_1) /* ?{} */);
     305static inline void ___constructor__F_R14s__anonymous10s_autogen___1(struct __anonymous10 *___dst__R14s__anonymous10_1, short __i__s_1){
     306    ((void)((*___dst__R14s__anonymous10_1).__i__s_1=__i__s_1) /* ?{} */);
    307307}
    308308volatile const struct __anonymous10 __x31__CV14s__anonymous10_1;
     
    310310    short __i__s_1;
    311311};
    312 static inline void ___constructor__F_P14s__anonymous11_autogen___1(struct __anonymous11 *___dst__P14s__anonymous11_1);
    313 static inline void ___constructor__F_P14s__anonymous1114s__anonymous11_autogen___1(struct __anonymous11 *___dst__P14s__anonymous11_1, struct __anonymous11 ___src__14s__anonymous11_1);
    314 static inline void ___destructor__F_P14s__anonymous11_autogen___1(struct __anonymous11 *___dst__P14s__anonymous11_1);
    315 static inline struct __anonymous11 ___operator_assign__F14s__anonymous11_P14s__anonymous1114s__anonymous11_autogen___1(struct __anonymous11 *___dst__P14s__anonymous11_1, struct __anonymous11 ___src__14s__anonymous11_1);
    316 static inline void ___constructor__F_P14s__anonymous11_autogen___1(struct __anonymous11 *___dst__P14s__anonymous11_1){
    317     ((void)((*((short *)(&(*___dst__P14s__anonymous11_1).__i__s_1)))) /* ?{} */);
    318 }
    319 static inline void ___constructor__F_P14s__anonymous1114s__anonymous11_autogen___1(struct __anonymous11 *___dst__P14s__anonymous11_1, struct __anonymous11 ___src__14s__anonymous11_1){
    320     ((void)((*((short *)(&(*___dst__P14s__anonymous11_1).__i__s_1)))=___src__14s__anonymous11_1.__i__s_1) /* ?{} */);
    321 }
    322 static inline void ___destructor__F_P14s__anonymous11_autogen___1(struct __anonymous11 *___dst__P14s__anonymous11_1){
    323     ((void)((*((short *)(&(*___dst__P14s__anonymous11_1).__i__s_1)))) /* ^?{} */);
    324 }
    325 static inline struct __anonymous11 ___operator_assign__F14s__anonymous11_P14s__anonymous1114s__anonymous11_autogen___1(struct __anonymous11 *___dst__P14s__anonymous11_1, struct __anonymous11 ___src__14s__anonymous11_1){
     312static inline void ___constructor__F_R14s__anonymous11_autogen___1(struct __anonymous11 *___dst__R14s__anonymous11_1);
     313static inline void ___constructor__F_R14s__anonymous1114s__anonymous11_autogen___1(struct __anonymous11 *___dst__R14s__anonymous11_1, struct __anonymous11 ___src__14s__anonymous11_1);
     314static inline void ___destructor__F_R14s__anonymous11_autogen___1(struct __anonymous11 *___dst__R14s__anonymous11_1);
     315static inline struct __anonymous11 ___operator_assign__F14s__anonymous11_R14s__anonymous1114s__anonymous11_autogen___1(struct __anonymous11 *___dst__R14s__anonymous11_1, struct __anonymous11 ___src__14s__anonymous11_1);
     316static inline void ___constructor__F_R14s__anonymous11_autogen___1(struct __anonymous11 *___dst__R14s__anonymous11_1){
     317    ((void)((*___dst__R14s__anonymous11_1).__i__s_1) /* ?{} */);
     318}
     319static inline void ___constructor__F_R14s__anonymous1114s__anonymous11_autogen___1(struct __anonymous11 *___dst__R14s__anonymous11_1, struct __anonymous11 ___src__14s__anonymous11_1){
     320    ((void)((*___dst__R14s__anonymous11_1).__i__s_1=___src__14s__anonymous11_1.__i__s_1) /* ?{} */);
     321}
     322static inline void ___destructor__F_R14s__anonymous11_autogen___1(struct __anonymous11 *___dst__R14s__anonymous11_1){
     323    ((void)((*___dst__R14s__anonymous11_1).__i__s_1) /* ^?{} */);
     324}
     325static inline struct __anonymous11 ___operator_assign__F14s__anonymous11_R14s__anonymous1114s__anonymous11_autogen___1(struct __anonymous11 *___dst__R14s__anonymous11_1, struct __anonymous11 ___src__14s__anonymous11_1){
    326326    struct __anonymous11 ___ret__14s__anonymous11_1;
    327     ((void)((*___dst__P14s__anonymous11_1).__i__s_1=___src__14s__anonymous11_1.__i__s_1));
    328     ((void)___constructor__F_P14s__anonymous1114s__anonymous11_autogen___1((&___ret__14s__anonymous11_1), ___src__14s__anonymous11_1));
     327    ((void)((*___dst__R14s__anonymous11_1).__i__s_1=___src__14s__anonymous11_1.__i__s_1));
     328    ((void)___constructor__F_R14s__anonymous1114s__anonymous11_autogen___1((&___ret__14s__anonymous11_1), ___src__14s__anonymous11_1));
    329329    return ((struct __anonymous11 )___ret__14s__anonymous11_1);
    330330}
    331 static inline void ___constructor__F_P14s__anonymous11s_autogen___1(struct __anonymous11 *___dst__P14s__anonymous11_1, short __i__s_1){
    332     ((void)((*((short *)(&(*___dst__P14s__anonymous11_1).__i__s_1)))=__i__s_1) /* ?{} */);
     331static inline void ___constructor__F_R14s__anonymous11s_autogen___1(struct __anonymous11 *___dst__R14s__anonymous11_1, short __i__s_1){
     332    ((void)((*___dst__R14s__anonymous11_1).__i__s_1=__i__s_1) /* ?{} */);
    333333}
    334334static volatile const struct __anonymous11 __x32__CV14s__anonymous11_1;
     
    336336    short __i__s_1;
    337337};
    338 static inline void ___constructor__F_P14s__anonymous12_autogen___1(struct __anonymous12 *___dst__P14s__anonymous12_1);
    339 static inline void ___constructor__F_P14s__anonymous1214s__anonymous12_autogen___1(struct __anonymous12 *___dst__P14s__anonymous12_1, struct __anonymous12 ___src__14s__anonymous12_1);
    340 static inline void ___destructor__F_P14s__anonymous12_autogen___1(struct __anonymous12 *___dst__P14s__anonymous12_1);
    341 static inline struct __anonymous12 ___operator_assign__F14s__anonymous12_P14s__anonymous1214s__anonymous12_autogen___1(struct __anonymous12 *___dst__P14s__anonymous12_1, struct __anonymous12 ___src__14s__anonymous12_1);
    342 static inline void ___constructor__F_P14s__anonymous12_autogen___1(struct __anonymous12 *___dst__P14s__anonymous12_1){
    343     ((void)((*((short *)(&(*___dst__P14s__anonymous12_1).__i__s_1)))) /* ?{} */);
    344 }
    345 static inline void ___constructor__F_P14s__anonymous1214s__anonymous12_autogen___1(struct __anonymous12 *___dst__P14s__anonymous12_1, struct __anonymous12 ___src__14s__anonymous12_1){
    346     ((void)((*((short *)(&(*___dst__P14s__anonymous12_1).__i__s_1)))=___src__14s__anonymous12_1.__i__s_1) /* ?{} */);
    347 }
    348 static inline void ___destructor__F_P14s__anonymous12_autogen___1(struct __anonymous12 *___dst__P14s__anonymous12_1){
    349     ((void)((*((short *)(&(*___dst__P14s__anonymous12_1).__i__s_1)))) /* ^?{} */);
    350 }
    351 static inline struct __anonymous12 ___operator_assign__F14s__anonymous12_P14s__anonymous1214s__anonymous12_autogen___1(struct __anonymous12 *___dst__P14s__anonymous12_1, struct __anonymous12 ___src__14s__anonymous12_1){
     338static inline void ___constructor__F_R14s__anonymous12_autogen___1(struct __anonymous12 *___dst__R14s__anonymous12_1);
     339static inline void ___constructor__F_R14s__anonymous1214s__anonymous12_autogen___1(struct __anonymous12 *___dst__R14s__anonymous12_1, struct __anonymous12 ___src__14s__anonymous12_1);
     340static inline void ___destructor__F_R14s__anonymous12_autogen___1(struct __anonymous12 *___dst__R14s__anonymous12_1);
     341static inline struct __anonymous12 ___operator_assign__F14s__anonymous12_R14s__anonymous1214s__anonymous12_autogen___1(struct __anonymous12 *___dst__R14s__anonymous12_1, struct __anonymous12 ___src__14s__anonymous12_1);
     342static inline void ___constructor__F_R14s__anonymous12_autogen___1(struct __anonymous12 *___dst__R14s__anonymous12_1){
     343    ((void)((*___dst__R14s__anonymous12_1).__i__s_1) /* ?{} */);
     344}
     345static inline void ___constructor__F_R14s__anonymous1214s__anonymous12_autogen___1(struct __anonymous12 *___dst__R14s__anonymous12_1, struct __anonymous12 ___src__14s__anonymous12_1){
     346    ((void)((*___dst__R14s__anonymous12_1).__i__s_1=___src__14s__anonymous12_1.__i__s_1) /* ?{} */);
     347}
     348static inline void ___destructor__F_R14s__anonymous12_autogen___1(struct __anonymous12 *___dst__R14s__anonymous12_1){
     349    ((void)((*___dst__R14s__anonymous12_1).__i__s_1) /* ^?{} */);
     350}
     351static inline struct __anonymous12 ___operator_assign__F14s__anonymous12_R14s__anonymous1214s__anonymous12_autogen___1(struct __anonymous12 *___dst__R14s__anonymous12_1, struct __anonymous12 ___src__14s__anonymous12_1){
    352352    struct __anonymous12 ___ret__14s__anonymous12_1;
    353     ((void)((*___dst__P14s__anonymous12_1).__i__s_1=___src__14s__anonymous12_1.__i__s_1));
    354     ((void)___constructor__F_P14s__anonymous1214s__anonymous12_autogen___1((&___ret__14s__anonymous12_1), ___src__14s__anonymous12_1));
     353    ((void)((*___dst__R14s__anonymous12_1).__i__s_1=___src__14s__anonymous12_1.__i__s_1));
     354    ((void)___constructor__F_R14s__anonymous1214s__anonymous12_autogen___1((&___ret__14s__anonymous12_1), ___src__14s__anonymous12_1));
    355355    return ((struct __anonymous12 )___ret__14s__anonymous12_1);
    356356}
    357 static inline void ___constructor__F_P14s__anonymous12s_autogen___1(struct __anonymous12 *___dst__P14s__anonymous12_1, short __i__s_1){
    358     ((void)((*((short *)(&(*___dst__P14s__anonymous12_1).__i__s_1)))=__i__s_1) /* ?{} */);
     357static inline void ___constructor__F_R14s__anonymous12s_autogen___1(struct __anonymous12 *___dst__R14s__anonymous12_1, short __i__s_1){
     358    ((void)((*___dst__R14s__anonymous12_1).__i__s_1=__i__s_1) /* ?{} */);
    359359}
    360360static volatile const struct __anonymous12 __x33__CV14s__anonymous12_1;
     
    362362    short __i__s_1;
    363363};
    364 static inline void ___constructor__F_P14s__anonymous13_autogen___1(struct __anonymous13 *___dst__P14s__anonymous13_1);
    365 static inline void ___constructor__F_P14s__anonymous1314s__anonymous13_autogen___1(struct __anonymous13 *___dst__P14s__anonymous13_1, struct __anonymous13 ___src__14s__anonymous13_1);
    366 static inline void ___destructor__F_P14s__anonymous13_autogen___1(struct __anonymous13 *___dst__P14s__anonymous13_1);
    367 static inline struct __anonymous13 ___operator_assign__F14s__anonymous13_P14s__anonymous1314s__anonymous13_autogen___1(struct __anonymous13 *___dst__P14s__anonymous13_1, struct __anonymous13 ___src__14s__anonymous13_1);
    368 static inline void ___constructor__F_P14s__anonymous13_autogen___1(struct __anonymous13 *___dst__P14s__anonymous13_1){
    369     ((void)((*((short *)(&(*___dst__P14s__anonymous13_1).__i__s_1)))) /* ?{} */);
    370 }
    371 static inline void ___constructor__F_P14s__anonymous1314s__anonymous13_autogen___1(struct __anonymous13 *___dst__P14s__anonymous13_1, struct __anonymous13 ___src__14s__anonymous13_1){
    372     ((void)((*((short *)(&(*___dst__P14s__anonymous13_1).__i__s_1)))=___src__14s__anonymous13_1.__i__s_1) /* ?{} */);
    373 }
    374 static inline void ___destructor__F_P14s__anonymous13_autogen___1(struct __anonymous13 *___dst__P14s__anonymous13_1){
    375     ((void)((*((short *)(&(*___dst__P14s__anonymous13_1).__i__s_1)))) /* ^?{} */);
    376 }
    377 static inline struct __anonymous13 ___operator_assign__F14s__anonymous13_P14s__anonymous1314s__anonymous13_autogen___1(struct __anonymous13 *___dst__P14s__anonymous13_1, struct __anonymous13 ___src__14s__anonymous13_1){
     364static inline void ___constructor__F_R14s__anonymous13_autogen___1(struct __anonymous13 *___dst__R14s__anonymous13_1);
     365static inline void ___constructor__F_R14s__anonymous1314s__anonymous13_autogen___1(struct __anonymous13 *___dst__R14s__anonymous13_1, struct __anonymous13 ___src__14s__anonymous13_1);
     366static inline void ___destructor__F_R14s__anonymous13_autogen___1(struct __anonymous13 *___dst__R14s__anonymous13_1);
     367static inline struct __anonymous13 ___operator_assign__F14s__anonymous13_R14s__anonymous1314s__anonymous13_autogen___1(struct __anonymous13 *___dst__R14s__anonymous13_1, struct __anonymous13 ___src__14s__anonymous13_1);
     368static inline void ___constructor__F_R14s__anonymous13_autogen___1(struct __anonymous13 *___dst__R14s__anonymous13_1){
     369    ((void)((*___dst__R14s__anonymous13_1).__i__s_1) /* ?{} */);
     370}
     371static inline void ___constructor__F_R14s__anonymous1314s__anonymous13_autogen___1(struct __anonymous13 *___dst__R14s__anonymous13_1, struct __anonymous13 ___src__14s__anonymous13_1){
     372    ((void)((*___dst__R14s__anonymous13_1).__i__s_1=___src__14s__anonymous13_1.__i__s_1) /* ?{} */);
     373}
     374static inline void ___destructor__F_R14s__anonymous13_autogen___1(struct __anonymous13 *___dst__R14s__anonymous13_1){
     375    ((void)((*___dst__R14s__anonymous13_1).__i__s_1) /* ^?{} */);
     376}
     377static inline struct __anonymous13 ___operator_assign__F14s__anonymous13_R14s__anonymous1314s__anonymous13_autogen___1(struct __anonymous13 *___dst__R14s__anonymous13_1, struct __anonymous13 ___src__14s__anonymous13_1){
    378378    struct __anonymous13 ___ret__14s__anonymous13_1;
    379     ((void)((*___dst__P14s__anonymous13_1).__i__s_1=___src__14s__anonymous13_1.__i__s_1));
    380     ((void)___constructor__F_P14s__anonymous1314s__anonymous13_autogen___1((&___ret__14s__anonymous13_1), ___src__14s__anonymous13_1));
     379    ((void)((*___dst__R14s__anonymous13_1).__i__s_1=___src__14s__anonymous13_1.__i__s_1));
     380    ((void)___constructor__F_R14s__anonymous1314s__anonymous13_autogen___1((&___ret__14s__anonymous13_1), ___src__14s__anonymous13_1));
    381381    return ((struct __anonymous13 )___ret__14s__anonymous13_1);
    382382}
    383 static inline void ___constructor__F_P14s__anonymous13s_autogen___1(struct __anonymous13 *___dst__P14s__anonymous13_1, short __i__s_1){
    384     ((void)((*((short *)(&(*___dst__P14s__anonymous13_1).__i__s_1)))=__i__s_1) /* ?{} */);
     383static inline void ___constructor__F_R14s__anonymous13s_autogen___1(struct __anonymous13 *___dst__R14s__anonymous13_1, short __i__s_1){
     384    ((void)((*___dst__R14s__anonymous13_1).__i__s_1=__i__s_1) /* ?{} */);
    385385}
    386386static volatile const struct __anonymous13 __x34__CV14s__anonymous13_1;
     
    388388    short __i__s_1;
    389389};
    390 static inline void ___constructor__F_P14s__anonymous14_autogen___1(struct __anonymous14 *___dst__P14s__anonymous14_1);
    391 static inline void ___constructor__F_P14s__anonymous1414s__anonymous14_autogen___1(struct __anonymous14 *___dst__P14s__anonymous14_1, struct __anonymous14 ___src__14s__anonymous14_1);
    392 static inline void ___destructor__F_P14s__anonymous14_autogen___1(struct __anonymous14 *___dst__P14s__anonymous14_1);
    393 static inline struct __anonymous14 ___operator_assign__F14s__anonymous14_P14s__anonymous1414s__anonymous14_autogen___1(struct __anonymous14 *___dst__P14s__anonymous14_1, struct __anonymous14 ___src__14s__anonymous14_1);
    394 static inline void ___constructor__F_P14s__anonymous14_autogen___1(struct __anonymous14 *___dst__P14s__anonymous14_1){
    395     ((void)((*((short *)(&(*___dst__P14s__anonymous14_1).__i__s_1)))) /* ?{} */);
    396 }
    397 static inline void ___constructor__F_P14s__anonymous1414s__anonymous14_autogen___1(struct __anonymous14 *___dst__P14s__anonymous14_1, struct __anonymous14 ___src__14s__anonymous14_1){
    398     ((void)((*((short *)(&(*___dst__P14s__anonymous14_1).__i__s_1)))=___src__14s__anonymous14_1.__i__s_1) /* ?{} */);
    399 }
    400 static inline void ___destructor__F_P14s__anonymous14_autogen___1(struct __anonymous14 *___dst__P14s__anonymous14_1){
    401     ((void)((*((short *)(&(*___dst__P14s__anonymous14_1).__i__s_1)))) /* ^?{} */);
    402 }
    403 static inline struct __anonymous14 ___operator_assign__F14s__anonymous14_P14s__anonymous1414s__anonymous14_autogen___1(struct __anonymous14 *___dst__P14s__anonymous14_1, struct __anonymous14 ___src__14s__anonymous14_1){
     390static inline void ___constructor__F_R14s__anonymous14_autogen___1(struct __anonymous14 *___dst__R14s__anonymous14_1);
     391static inline void ___constructor__F_R14s__anonymous1414s__anonymous14_autogen___1(struct __anonymous14 *___dst__R14s__anonymous14_1, struct __anonymous14 ___src__14s__anonymous14_1);
     392static inline void ___destructor__F_R14s__anonymous14_autogen___1(struct __anonymous14 *___dst__R14s__anonymous14_1);
     393static inline struct __anonymous14 ___operator_assign__F14s__anonymous14_R14s__anonymous1414s__anonymous14_autogen___1(struct __anonymous14 *___dst__R14s__anonymous14_1, struct __anonymous14 ___src__14s__anonymous14_1);
     394static inline void ___constructor__F_R14s__anonymous14_autogen___1(struct __anonymous14 *___dst__R14s__anonymous14_1){
     395    ((void)((*___dst__R14s__anonymous14_1).__i__s_1) /* ?{} */);
     396}
     397static inline void ___constructor__F_R14s__anonymous1414s__anonymous14_autogen___1(struct __anonymous14 *___dst__R14s__anonymous14_1, struct __anonymous14 ___src__14s__anonymous14_1){
     398    ((void)((*___dst__R14s__anonymous14_1).__i__s_1=___src__14s__anonymous14_1.__i__s_1) /* ?{} */);
     399}
     400static inline void ___destructor__F_R14s__anonymous14_autogen___1(struct __anonymous14 *___dst__R14s__anonymous14_1){
     401    ((void)((*___dst__R14s__anonymous14_1).__i__s_1) /* ^?{} */);
     402}
     403static inline struct __anonymous14 ___operator_assign__F14s__anonymous14_R14s__anonymous1414s__anonymous14_autogen___1(struct __anonymous14 *___dst__R14s__anonymous14_1, struct __anonymous14 ___src__14s__anonymous14_1){
    404404    struct __anonymous14 ___ret__14s__anonymous14_1;
    405     ((void)((*___dst__P14s__anonymous14_1).__i__s_1=___src__14s__anonymous14_1.__i__s_1));
    406     ((void)___constructor__F_P14s__anonymous1414s__anonymous14_autogen___1((&___ret__14s__anonymous14_1), ___src__14s__anonymous14_1));
     405    ((void)((*___dst__R14s__anonymous14_1).__i__s_1=___src__14s__anonymous14_1.__i__s_1));
     406    ((void)___constructor__F_R14s__anonymous1414s__anonymous14_autogen___1((&___ret__14s__anonymous14_1), ___src__14s__anonymous14_1));
    407407    return ((struct __anonymous14 )___ret__14s__anonymous14_1);
    408408}
    409 static inline void ___constructor__F_P14s__anonymous14s_autogen___1(struct __anonymous14 *___dst__P14s__anonymous14_1, short __i__s_1){
    410     ((void)((*((short *)(&(*___dst__P14s__anonymous14_1).__i__s_1)))=__i__s_1) /* ?{} */);
     409static inline void ___constructor__F_R14s__anonymous14s_autogen___1(struct __anonymous14 *___dst__R14s__anonymous14_1, short __i__s_1){
     410    ((void)((*___dst__R14s__anonymous14_1).__i__s_1=__i__s_1) /* ?{} */);
    411411}
    412412static volatile const struct __anonymous14 __x35__CV14s__anonymous14_1;
     
    414414    short __i__s_1;
    415415};
    416 static inline void ___constructor__F_P14s__anonymous15_autogen___1(struct __anonymous15 *___dst__P14s__anonymous15_1);
    417 static inline void ___constructor__F_P14s__anonymous1514s__anonymous15_autogen___1(struct __anonymous15 *___dst__P14s__anonymous15_1, struct __anonymous15 ___src__14s__anonymous15_1);
    418 static inline void ___destructor__F_P14s__anonymous15_autogen___1(struct __anonymous15 *___dst__P14s__anonymous15_1);
    419 static inline struct __anonymous15 ___operator_assign__F14s__anonymous15_P14s__anonymous1514s__anonymous15_autogen___1(struct __anonymous15 *___dst__P14s__anonymous15_1, struct __anonymous15 ___src__14s__anonymous15_1);
    420 static inline void ___constructor__F_P14s__anonymous15_autogen___1(struct __anonymous15 *___dst__P14s__anonymous15_1){
    421     ((void)((*((short *)(&(*___dst__P14s__anonymous15_1).__i__s_1)))) /* ?{} */);
    422 }
    423 static inline void ___constructor__F_P14s__anonymous1514s__anonymous15_autogen___1(struct __anonymous15 *___dst__P14s__anonymous15_1, struct __anonymous15 ___src__14s__anonymous15_1){
    424     ((void)((*((short *)(&(*___dst__P14s__anonymous15_1).__i__s_1)))=___src__14s__anonymous15_1.__i__s_1) /* ?{} */);
    425 }
    426 static inline void ___destructor__F_P14s__anonymous15_autogen___1(struct __anonymous15 *___dst__P14s__anonymous15_1){
    427     ((void)((*((short *)(&(*___dst__P14s__anonymous15_1).__i__s_1)))) /* ^?{} */);
    428 }
    429 static inline struct __anonymous15 ___operator_assign__F14s__anonymous15_P14s__anonymous1514s__anonymous15_autogen___1(struct __anonymous15 *___dst__P14s__anonymous15_1, struct __anonymous15 ___src__14s__anonymous15_1){
     416static inline void ___constructor__F_R14s__anonymous15_autogen___1(struct __anonymous15 *___dst__R14s__anonymous15_1);
     417static inline void ___constructor__F_R14s__anonymous1514s__anonymous15_autogen___1(struct __anonymous15 *___dst__R14s__anonymous15_1, struct __anonymous15 ___src__14s__anonymous15_1);
     418static inline void ___destructor__F_R14s__anonymous15_autogen___1(struct __anonymous15 *___dst__R14s__anonymous15_1);
     419static inline struct __anonymous15 ___operator_assign__F14s__anonymous15_R14s__anonymous1514s__anonymous15_autogen___1(struct __anonymous15 *___dst__R14s__anonymous15_1, struct __anonymous15 ___src__14s__anonymous15_1);
     420static inline void ___constructor__F_R14s__anonymous15_autogen___1(struct __anonymous15 *___dst__R14s__anonymous15_1){
     421    ((void)((*___dst__R14s__anonymous15_1).__i__s_1) /* ?{} */);
     422}
     423static inline void ___constructor__F_R14s__anonymous1514s__anonymous15_autogen___1(struct __anonymous15 *___dst__R14s__anonymous15_1, struct __anonymous15 ___src__14s__anonymous15_1){
     424    ((void)((*___dst__R14s__anonymous15_1).__i__s_1=___src__14s__anonymous15_1.__i__s_1) /* ?{} */);
     425}
     426static inline void ___destructor__F_R14s__anonymous15_autogen___1(struct __anonymous15 *___dst__R14s__anonymous15_1){
     427    ((void)((*___dst__R14s__anonymous15_1).__i__s_1) /* ^?{} */);
     428}
     429static inline struct __anonymous15 ___operator_assign__F14s__anonymous15_R14s__anonymous1514s__anonymous15_autogen___1(struct __anonymous15 *___dst__R14s__anonymous15_1, struct __anonymous15 ___src__14s__anonymous15_1){
    430430    struct __anonymous15 ___ret__14s__anonymous15_1;
    431     ((void)((*___dst__P14s__anonymous15_1).__i__s_1=___src__14s__anonymous15_1.__i__s_1));
    432     ((void)___constructor__F_P14s__anonymous1514s__anonymous15_autogen___1((&___ret__14s__anonymous15_1), ___src__14s__anonymous15_1));
     431    ((void)((*___dst__R14s__anonymous15_1).__i__s_1=___src__14s__anonymous15_1.__i__s_1));
     432    ((void)___constructor__F_R14s__anonymous1514s__anonymous15_autogen___1((&___ret__14s__anonymous15_1), ___src__14s__anonymous15_1));
    433433    return ((struct __anonymous15 )___ret__14s__anonymous15_1);
    434434}
    435 static inline void ___constructor__F_P14s__anonymous15s_autogen___1(struct __anonymous15 *___dst__P14s__anonymous15_1, short __i__s_1){
    436     ((void)((*((short *)(&(*___dst__P14s__anonymous15_1).__i__s_1)))=__i__s_1) /* ?{} */);
     435static inline void ___constructor__F_R14s__anonymous15s_autogen___1(struct __anonymous15 *___dst__R14s__anonymous15_1, short __i__s_1){
     436    ((void)((*___dst__R14s__anonymous15_1).__i__s_1=__i__s_1) /* ?{} */);
    437437}
    438438static volatile const struct __anonymous15 __x36__CV14s__anonymous15_1;
     
    456456    int __i__i_1;
    457457};
    458 static inline void ___constructor__F_P14s__anonymous16_autogen___1(struct __anonymous16 *___dst__P14s__anonymous16_1);
    459 static inline void ___constructor__F_P14s__anonymous1614s__anonymous16_autogen___1(struct __anonymous16 *___dst__P14s__anonymous16_1, struct __anonymous16 ___src__14s__anonymous16_1);
    460 static inline void ___destructor__F_P14s__anonymous16_autogen___1(struct __anonymous16 *___dst__P14s__anonymous16_1);
    461 static inline struct __anonymous16 ___operator_assign__F14s__anonymous16_P14s__anonymous1614s__anonymous16_autogen___1(struct __anonymous16 *___dst__P14s__anonymous16_1, struct __anonymous16 ___src__14s__anonymous16_1);
    462 static inline void ___constructor__F_P14s__anonymous16_autogen___1(struct __anonymous16 *___dst__P14s__anonymous16_1){
    463     ((void)((*((int *)(&(*___dst__P14s__anonymous16_1).__i__i_1)))) /* ?{} */);
    464 }
    465 static inline void ___constructor__F_P14s__anonymous1614s__anonymous16_autogen___1(struct __anonymous16 *___dst__P14s__anonymous16_1, struct __anonymous16 ___src__14s__anonymous16_1){
    466     ((void)((*((int *)(&(*___dst__P14s__anonymous16_1).__i__i_1)))=___src__14s__anonymous16_1.__i__i_1) /* ?{} */);
    467 }
    468 static inline void ___destructor__F_P14s__anonymous16_autogen___1(struct __anonymous16 *___dst__P14s__anonymous16_1){
    469     ((void)((*((int *)(&(*___dst__P14s__anonymous16_1).__i__i_1)))) /* ^?{} */);
    470 }
    471 static inline struct __anonymous16 ___operator_assign__F14s__anonymous16_P14s__anonymous1614s__anonymous16_autogen___1(struct __anonymous16 *___dst__P14s__anonymous16_1, struct __anonymous16 ___src__14s__anonymous16_1){
     458static inline void ___constructor__F_R14s__anonymous16_autogen___1(struct __anonymous16 *___dst__R14s__anonymous16_1);
     459static inline void ___constructor__F_R14s__anonymous1614s__anonymous16_autogen___1(struct __anonymous16 *___dst__R14s__anonymous16_1, struct __anonymous16 ___src__14s__anonymous16_1);
     460static inline void ___destructor__F_R14s__anonymous16_autogen___1(struct __anonymous16 *___dst__R14s__anonymous16_1);
     461static inline struct __anonymous16 ___operator_assign__F14s__anonymous16_R14s__anonymous1614s__anonymous16_autogen___1(struct __anonymous16 *___dst__R14s__anonymous16_1, struct __anonymous16 ___src__14s__anonymous16_1);
     462static inline void ___constructor__F_R14s__anonymous16_autogen___1(struct __anonymous16 *___dst__R14s__anonymous16_1){
     463    ((void)((*___dst__R14s__anonymous16_1).__i__i_1) /* ?{} */);
     464}
     465static inline void ___constructor__F_R14s__anonymous1614s__anonymous16_autogen___1(struct __anonymous16 *___dst__R14s__anonymous16_1, struct __anonymous16 ___src__14s__anonymous16_1){
     466    ((void)((*___dst__R14s__anonymous16_1).__i__i_1=___src__14s__anonymous16_1.__i__i_1) /* ?{} */);
     467}
     468static inline void ___destructor__F_R14s__anonymous16_autogen___1(struct __anonymous16 *___dst__R14s__anonymous16_1){
     469    ((void)((*___dst__R14s__anonymous16_1).__i__i_1) /* ^?{} */);
     470}
     471static inline struct __anonymous16 ___operator_assign__F14s__anonymous16_R14s__anonymous1614s__anonymous16_autogen___1(struct __anonymous16 *___dst__R14s__anonymous16_1, struct __anonymous16 ___src__14s__anonymous16_1){
    472472    struct __anonymous16 ___ret__14s__anonymous16_1;
    473     ((void)((*___dst__P14s__anonymous16_1).__i__i_1=___src__14s__anonymous16_1.__i__i_1));
    474     ((void)___constructor__F_P14s__anonymous1614s__anonymous16_autogen___1((&___ret__14s__anonymous16_1), ___src__14s__anonymous16_1));
     473    ((void)((*___dst__R14s__anonymous16_1).__i__i_1=___src__14s__anonymous16_1.__i__i_1));
     474    ((void)___constructor__F_R14s__anonymous1614s__anonymous16_autogen___1((&___ret__14s__anonymous16_1), ___src__14s__anonymous16_1));
    475475    return ((struct __anonymous16 )___ret__14s__anonymous16_1);
    476476}
    477 static inline void ___constructor__F_P14s__anonymous16i_autogen___1(struct __anonymous16 *___dst__P14s__anonymous16_1, int __i__i_1){
    478     ((void)((*((int *)(&(*___dst__P14s__anonymous16_1).__i__i_1)))=__i__i_1) /* ?{} */);
     477static inline void ___constructor__F_R14s__anonymous16i_autogen___1(struct __anonymous16 *___dst__R14s__anonymous16_1, int __i__i_1){
     478    ((void)((*___dst__R14s__anonymous16_1).__i__i_1=__i__i_1) /* ?{} */);
    479479}
    480480static inline volatile const struct __anonymous16 __f31__FCV14s__anonymous16___1();
     
    482482    int __i__i_1;
    483483};
    484 static inline void ___constructor__F_P14s__anonymous17_autogen___1(struct __anonymous17 *___dst__P14s__anonymous17_1);
    485 static inline void ___constructor__F_P14s__anonymous1714s__anonymous17_autogen___1(struct __anonymous17 *___dst__P14s__anonymous17_1, struct __anonymous17 ___src__14s__anonymous17_1);
    486 static inline void ___destructor__F_P14s__anonymous17_autogen___1(struct __anonymous17 *___dst__P14s__anonymous17_1);
    487 static inline struct __anonymous17 ___operator_assign__F14s__anonymous17_P14s__anonymous1714s__anonymous17_autogen___1(struct __anonymous17 *___dst__P14s__anonymous17_1, struct __anonymous17 ___src__14s__anonymous17_1);
    488 static inline void ___constructor__F_P14s__anonymous17_autogen___1(struct __anonymous17 *___dst__P14s__anonymous17_1){
    489     ((void)((*((int *)(&(*___dst__P14s__anonymous17_1).__i__i_1)))) /* ?{} */);
    490 }
    491 static inline void ___constructor__F_P14s__anonymous1714s__anonymous17_autogen___1(struct __anonymous17 *___dst__P14s__anonymous17_1, struct __anonymous17 ___src__14s__anonymous17_1){
    492     ((void)((*((int *)(&(*___dst__P14s__anonymous17_1).__i__i_1)))=___src__14s__anonymous17_1.__i__i_1) /* ?{} */);
    493 }
    494 static inline void ___destructor__F_P14s__anonymous17_autogen___1(struct __anonymous17 *___dst__P14s__anonymous17_1){
    495     ((void)((*((int *)(&(*___dst__P14s__anonymous17_1).__i__i_1)))) /* ^?{} */);
    496 }
    497 static inline struct __anonymous17 ___operator_assign__F14s__anonymous17_P14s__anonymous1714s__anonymous17_autogen___1(struct __anonymous17 *___dst__P14s__anonymous17_1, struct __anonymous17 ___src__14s__anonymous17_1){
     484static inline void ___constructor__F_R14s__anonymous17_autogen___1(struct __anonymous17 *___dst__R14s__anonymous17_1);
     485static inline void ___constructor__F_R14s__anonymous1714s__anonymous17_autogen___1(struct __anonymous17 *___dst__R14s__anonymous17_1, struct __anonymous17 ___src__14s__anonymous17_1);
     486static inline void ___destructor__F_R14s__anonymous17_autogen___1(struct __anonymous17 *___dst__R14s__anonymous17_1);
     487static inline struct __anonymous17 ___operator_assign__F14s__anonymous17_R14s__anonymous1714s__anonymous17_autogen___1(struct __anonymous17 *___dst__R14s__anonymous17_1, struct __anonymous17 ___src__14s__anonymous17_1);
     488static inline void ___constructor__F_R14s__anonymous17_autogen___1(struct __anonymous17 *___dst__R14s__anonymous17_1){
     489    ((void)((*___dst__R14s__anonymous17_1).__i__i_1) /* ?{} */);
     490}
     491static inline void ___constructor__F_R14s__anonymous1714s__anonymous17_autogen___1(struct __anonymous17 *___dst__R14s__anonymous17_1, struct __anonymous17 ___src__14s__anonymous17_1){
     492    ((void)((*___dst__R14s__anonymous17_1).__i__i_1=___src__14s__anonymous17_1.__i__i_1) /* ?{} */);
     493}
     494static inline void ___destructor__F_R14s__anonymous17_autogen___1(struct __anonymous17 *___dst__R14s__anonymous17_1){
     495    ((void)((*___dst__R14s__anonymous17_1).__i__i_1) /* ^?{} */);
     496}
     497static inline struct __anonymous17 ___operator_assign__F14s__anonymous17_R14s__anonymous1714s__anonymous17_autogen___1(struct __anonymous17 *___dst__R14s__anonymous17_1, struct __anonymous17 ___src__14s__anonymous17_1){
    498498    struct __anonymous17 ___ret__14s__anonymous17_1;
    499     ((void)((*___dst__P14s__anonymous17_1).__i__i_1=___src__14s__anonymous17_1.__i__i_1));
    500     ((void)___constructor__F_P14s__anonymous1714s__anonymous17_autogen___1((&___ret__14s__anonymous17_1), ___src__14s__anonymous17_1));
     499    ((void)((*___dst__R14s__anonymous17_1).__i__i_1=___src__14s__anonymous17_1.__i__i_1));
     500    ((void)___constructor__F_R14s__anonymous1714s__anonymous17_autogen___1((&___ret__14s__anonymous17_1), ___src__14s__anonymous17_1));
    501501    return ((struct __anonymous17 )___ret__14s__anonymous17_1);
    502502}
    503 static inline void ___constructor__F_P14s__anonymous17i_autogen___1(struct __anonymous17 *___dst__P14s__anonymous17_1, int __i__i_1){
    504     ((void)((*((int *)(&(*___dst__P14s__anonymous17_1).__i__i_1)))=__i__i_1) /* ?{} */);
     503static inline void ___constructor__F_R14s__anonymous17i_autogen___1(struct __anonymous17 *___dst__R14s__anonymous17_1, int __i__i_1){
     504    ((void)((*___dst__R14s__anonymous17_1).__i__i_1=__i__i_1) /* ?{} */);
    505505}
    506506static inline volatile const struct __anonymous17 __f32__FCV14s__anonymous17___1();
     
    508508    int __i__i_1;
    509509};
    510 static inline void ___constructor__F_P14s__anonymous18_autogen___1(struct __anonymous18 *___dst__P14s__anonymous18_1);
    511 static inline void ___constructor__F_P14s__anonymous1814s__anonymous18_autogen___1(struct __anonymous18 *___dst__P14s__anonymous18_1, struct __anonymous18 ___src__14s__anonymous18_1);
    512 static inline void ___destructor__F_P14s__anonymous18_autogen___1(struct __anonymous18 *___dst__P14s__anonymous18_1);
    513 static inline struct __anonymous18 ___operator_assign__F14s__anonymous18_P14s__anonymous1814s__anonymous18_autogen___1(struct __anonymous18 *___dst__P14s__anonymous18_1, struct __anonymous18 ___src__14s__anonymous18_1);
    514 static inline void ___constructor__F_P14s__anonymous18_autogen___1(struct __anonymous18 *___dst__P14s__anonymous18_1){
    515     ((void)((*((int *)(&(*___dst__P14s__anonymous18_1).__i__i_1)))) /* ?{} */);
    516 }
    517 static inline void ___constructor__F_P14s__anonymous1814s__anonymous18_autogen___1(struct __anonymous18 *___dst__P14s__anonymous18_1, struct __anonymous18 ___src__14s__anonymous18_1){
    518     ((void)((*((int *)(&(*___dst__P14s__anonymous18_1).__i__i_1)))=___src__14s__anonymous18_1.__i__i_1) /* ?{} */);
    519 }
    520 static inline void ___destructor__F_P14s__anonymous18_autogen___1(struct __anonymous18 *___dst__P14s__anonymous18_1){
    521     ((void)((*((int *)(&(*___dst__P14s__anonymous18_1).__i__i_1)))) /* ^?{} */);
    522 }
    523 static inline struct __anonymous18 ___operator_assign__F14s__anonymous18_P14s__anonymous1814s__anonymous18_autogen___1(struct __anonymous18 *___dst__P14s__anonymous18_1, struct __anonymous18 ___src__14s__anonymous18_1){
     510static inline void ___constructor__F_R14s__anonymous18_autogen___1(struct __anonymous18 *___dst__R14s__anonymous18_1);
     511static inline void ___constructor__F_R14s__anonymous1814s__anonymous18_autogen___1(struct __anonymous18 *___dst__R14s__anonymous18_1, struct __anonymous18 ___src__14s__anonymous18_1);
     512static inline void ___destructor__F_R14s__anonymous18_autogen___1(struct __anonymous18 *___dst__R14s__anonymous18_1);
     513static inline struct __anonymous18 ___operator_assign__F14s__anonymous18_R14s__anonymous1814s__anonymous18_autogen___1(struct __anonymous18 *___dst__R14s__anonymous18_1, struct __anonymous18 ___src__14s__anonymous18_1);
     514static inline void ___constructor__F_R14s__anonymous18_autogen___1(struct __anonymous18 *___dst__R14s__anonymous18_1){
     515    ((void)((*___dst__R14s__anonymous18_1).__i__i_1) /* ?{} */);
     516}
     517static inline void ___constructor__F_R14s__anonymous1814s__anonymous18_autogen___1(struct __anonymous18 *___dst__R14s__anonymous18_1, struct __anonymous18 ___src__14s__anonymous18_1){
     518    ((void)((*___dst__R14s__anonymous18_1).__i__i_1=___src__14s__anonymous18_1.__i__i_1) /* ?{} */);
     519}
     520static inline void ___destructor__F_R14s__anonymous18_autogen___1(struct __anonymous18 *___dst__R14s__anonymous18_1){
     521    ((void)((*___dst__R14s__anonymous18_1).__i__i_1) /* ^?{} */);
     522}
     523static inline struct __anonymous18 ___operator_assign__F14s__anonymous18_R14s__anonymous1814s__anonymous18_autogen___1(struct __anonymous18 *___dst__R14s__anonymous18_1, struct __anonymous18 ___src__14s__anonymous18_1){
    524524    struct __anonymous18 ___ret__14s__anonymous18_1;
    525     ((void)((*___dst__P14s__anonymous18_1).__i__i_1=___src__14s__anonymous18_1.__i__i_1));
    526     ((void)___constructor__F_P14s__anonymous1814s__anonymous18_autogen___1((&___ret__14s__anonymous18_1), ___src__14s__anonymous18_1));
     525    ((void)((*___dst__R14s__anonymous18_1).__i__i_1=___src__14s__anonymous18_1.__i__i_1));
     526    ((void)___constructor__F_R14s__anonymous1814s__anonymous18_autogen___1((&___ret__14s__anonymous18_1), ___src__14s__anonymous18_1));
    527527    return ((struct __anonymous18 )___ret__14s__anonymous18_1);
    528528}
    529 static inline void ___constructor__F_P14s__anonymous18i_autogen___1(struct __anonymous18 *___dst__P14s__anonymous18_1, int __i__i_1){
    530     ((void)((*((int *)(&(*___dst__P14s__anonymous18_1).__i__i_1)))=__i__i_1) /* ?{} */);
     529static inline void ___constructor__F_R14s__anonymous18i_autogen___1(struct __anonymous18 *___dst__R14s__anonymous18_1, int __i__i_1){
     530    ((void)((*___dst__R14s__anonymous18_1).__i__i_1=__i__i_1) /* ?{} */);
    531531}
    532532static inline volatile const struct __anonymous18 __f33__FCV14s__anonymous18___1();
     
    534534    int __i__i_1;
    535535};
    536 static inline void ___constructor__F_P14s__anonymous19_autogen___1(struct __anonymous19 *___dst__P14s__anonymous19_1);
    537 static inline void ___constructor__F_P14s__anonymous1914s__anonymous19_autogen___1(struct __anonymous19 *___dst__P14s__anonymous19_1, struct __anonymous19 ___src__14s__anonymous19_1);
    538 static inline void ___destructor__F_P14s__anonymous19_autogen___1(struct __anonymous19 *___dst__P14s__anonymous19_1);
    539 static inline struct __anonymous19 ___operator_assign__F14s__anonymous19_P14s__anonymous1914s__anonymous19_autogen___1(struct __anonymous19 *___dst__P14s__anonymous19_1, struct __anonymous19 ___src__14s__anonymous19_1);
    540 static inline void ___constructor__F_P14s__anonymous19_autogen___1(struct __anonymous19 *___dst__P14s__anonymous19_1){
    541     ((void)((*((int *)(&(*___dst__P14s__anonymous19_1).__i__i_1)))) /* ?{} */);
    542 }
    543 static inline void ___constructor__F_P14s__anonymous1914s__anonymous19_autogen___1(struct __anonymous19 *___dst__P14s__anonymous19_1, struct __anonymous19 ___src__14s__anonymous19_1){
    544     ((void)((*((int *)(&(*___dst__P14s__anonymous19_1).__i__i_1)))=___src__14s__anonymous19_1.__i__i_1) /* ?{} */);
    545 }
    546 static inline void ___destructor__F_P14s__anonymous19_autogen___1(struct __anonymous19 *___dst__P14s__anonymous19_1){
    547     ((void)((*((int *)(&(*___dst__P14s__anonymous19_1).__i__i_1)))) /* ^?{} */);
    548 }
    549 static inline struct __anonymous19 ___operator_assign__F14s__anonymous19_P14s__anonymous1914s__anonymous19_autogen___1(struct __anonymous19 *___dst__P14s__anonymous19_1, struct __anonymous19 ___src__14s__anonymous19_1){
     536static inline void ___constructor__F_R14s__anonymous19_autogen___1(struct __anonymous19 *___dst__R14s__anonymous19_1);
     537static inline void ___constructor__F_R14s__anonymous1914s__anonymous19_autogen___1(struct __anonymous19 *___dst__R14s__anonymous19_1, struct __anonymous19 ___src__14s__anonymous19_1);
     538static inline void ___destructor__F_R14s__anonymous19_autogen___1(struct __anonymous19 *___dst__R14s__anonymous19_1);
     539static inline struct __anonymous19 ___operator_assign__F14s__anonymous19_R14s__anonymous1914s__anonymous19_autogen___1(struct __anonymous19 *___dst__R14s__anonymous19_1, struct __anonymous19 ___src__14s__anonymous19_1);
     540static inline void ___constructor__F_R14s__anonymous19_autogen___1(struct __anonymous19 *___dst__R14s__anonymous19_1){
     541    ((void)((*___dst__R14s__anonymous19_1).__i__i_1) /* ?{} */);
     542}
     543static inline void ___constructor__F_R14s__anonymous1914s__anonymous19_autogen___1(struct __anonymous19 *___dst__R14s__anonymous19_1, struct __anonymous19 ___src__14s__anonymous19_1){
     544    ((void)((*___dst__R14s__anonymous19_1).__i__i_1=___src__14s__anonymous19_1.__i__i_1) /* ?{} */);
     545}
     546static inline void ___destructor__F_R14s__anonymous19_autogen___1(struct __anonymous19 *___dst__R14s__anonymous19_1){
     547    ((void)((*___dst__R14s__anonymous19_1).__i__i_1) /* ^?{} */);
     548}
     549static inline struct __anonymous19 ___operator_assign__F14s__anonymous19_R14s__anonymous1914s__anonymous19_autogen___1(struct __anonymous19 *___dst__R14s__anonymous19_1, struct __anonymous19 ___src__14s__anonymous19_1){
    550550    struct __anonymous19 ___ret__14s__anonymous19_1;
    551     ((void)((*___dst__P14s__anonymous19_1).__i__i_1=___src__14s__anonymous19_1.__i__i_1));
    552     ((void)___constructor__F_P14s__anonymous1914s__anonymous19_autogen___1((&___ret__14s__anonymous19_1), ___src__14s__anonymous19_1));
     551    ((void)((*___dst__R14s__anonymous19_1).__i__i_1=___src__14s__anonymous19_1.__i__i_1));
     552    ((void)___constructor__F_R14s__anonymous1914s__anonymous19_autogen___1((&___ret__14s__anonymous19_1), ___src__14s__anonymous19_1));
    553553    return ((struct __anonymous19 )___ret__14s__anonymous19_1);
    554554}
    555 static inline void ___constructor__F_P14s__anonymous19i_autogen___1(struct __anonymous19 *___dst__P14s__anonymous19_1, int __i__i_1){
    556     ((void)((*((int *)(&(*___dst__P14s__anonymous19_1).__i__i_1)))=__i__i_1) /* ?{} */);
     555static inline void ___constructor__F_R14s__anonymous19i_autogen___1(struct __anonymous19 *___dst__R14s__anonymous19_1, int __i__i_1){
     556    ((void)((*___dst__R14s__anonymous19_1).__i__i_1=__i__i_1) /* ?{} */);
    557557}
    558558static inline volatile const struct __anonymous19 __f34__FCV14s__anonymous19___1();
     
    560560    int __i__i_1;
    561561};
    562 static inline void ___constructor__F_P14s__anonymous20_autogen___1(struct __anonymous20 *___dst__P14s__anonymous20_1);
    563 static inline void ___constructor__F_P14s__anonymous2014s__anonymous20_autogen___1(struct __anonymous20 *___dst__P14s__anonymous20_1, struct __anonymous20 ___src__14s__anonymous20_1);
    564 static inline void ___destructor__F_P14s__anonymous20_autogen___1(struct __anonymous20 *___dst__P14s__anonymous20_1);
    565 static inline struct __anonymous20 ___operator_assign__F14s__anonymous20_P14s__anonymous2014s__anonymous20_autogen___1(struct __anonymous20 *___dst__P14s__anonymous20_1, struct __anonymous20 ___src__14s__anonymous20_1);
    566 static inline void ___constructor__F_P14s__anonymous20_autogen___1(struct __anonymous20 *___dst__P14s__anonymous20_1){
    567     ((void)((*((int *)(&(*___dst__P14s__anonymous20_1).__i__i_1)))) /* ?{} */);
    568 }
    569 static inline void ___constructor__F_P14s__anonymous2014s__anonymous20_autogen___1(struct __anonymous20 *___dst__P14s__anonymous20_1, struct __anonymous20 ___src__14s__anonymous20_1){
    570     ((void)((*((int *)(&(*___dst__P14s__anonymous20_1).__i__i_1)))=___src__14s__anonymous20_1.__i__i_1) /* ?{} */);
    571 }
    572 static inline void ___destructor__F_P14s__anonymous20_autogen___1(struct __anonymous20 *___dst__P14s__anonymous20_1){
    573     ((void)((*((int *)(&(*___dst__P14s__anonymous20_1).__i__i_1)))) /* ^?{} */);
    574 }
    575 static inline struct __anonymous20 ___operator_assign__F14s__anonymous20_P14s__anonymous2014s__anonymous20_autogen___1(struct __anonymous20 *___dst__P14s__anonymous20_1, struct __anonymous20 ___src__14s__anonymous20_1){
     562static inline void ___constructor__F_R14s__anonymous20_autogen___1(struct __anonymous20 *___dst__R14s__anonymous20_1);
     563static inline void ___constructor__F_R14s__anonymous2014s__anonymous20_autogen___1(struct __anonymous20 *___dst__R14s__anonymous20_1, struct __anonymous20 ___src__14s__anonymous20_1);
     564static inline void ___destructor__F_R14s__anonymous20_autogen___1(struct __anonymous20 *___dst__R14s__anonymous20_1);
     565static inline struct __anonymous20 ___operator_assign__F14s__anonymous20_R14s__anonymous2014s__anonymous20_autogen___1(struct __anonymous20 *___dst__R14s__anonymous20_1, struct __anonymous20 ___src__14s__anonymous20_1);
     566static inline void ___constructor__F_R14s__anonymous20_autogen___1(struct __anonymous20 *___dst__R14s__anonymous20_1){
     567    ((void)((*___dst__R14s__anonymous20_1).__i__i_1) /* ?{} */);
     568}
     569static inline void ___constructor__F_R14s__anonymous2014s__anonymous20_autogen___1(struct __anonymous20 *___dst__R14s__anonymous20_1, struct __anonymous20 ___src__14s__anonymous20_1){
     570    ((void)((*___dst__R14s__anonymous20_1).__i__i_1=___src__14s__anonymous20_1.__i__i_1) /* ?{} */);
     571}
     572static inline void ___destructor__F_R14s__anonymous20_autogen___1(struct __anonymous20 *___dst__R14s__anonymous20_1){
     573    ((void)((*___dst__R14s__anonymous20_1).__i__i_1) /* ^?{} */);
     574}
     575static inline struct __anonymous20 ___operator_assign__F14s__anonymous20_R14s__anonymous2014s__anonymous20_autogen___1(struct __anonymous20 *___dst__R14s__anonymous20_1, struct __anonymous20 ___src__14s__anonymous20_1){
    576576    struct __anonymous20 ___ret__14s__anonymous20_1;
    577     ((void)((*___dst__P14s__anonymous20_1).__i__i_1=___src__14s__anonymous20_1.__i__i_1));
    578     ((void)___constructor__F_P14s__anonymous2014s__anonymous20_autogen___1((&___ret__14s__anonymous20_1), ___src__14s__anonymous20_1));
     577    ((void)((*___dst__R14s__anonymous20_1).__i__i_1=___src__14s__anonymous20_1.__i__i_1));
     578    ((void)___constructor__F_R14s__anonymous2014s__anonymous20_autogen___1((&___ret__14s__anonymous20_1), ___src__14s__anonymous20_1));
    579579    return ((struct __anonymous20 )___ret__14s__anonymous20_1);
    580580}
    581 static inline void ___constructor__F_P14s__anonymous20i_autogen___1(struct __anonymous20 *___dst__P14s__anonymous20_1, int __i__i_1){
    582     ((void)((*((int *)(&(*___dst__P14s__anonymous20_1).__i__i_1)))=__i__i_1) /* ?{} */);
     581static inline void ___constructor__F_R14s__anonymous20i_autogen___1(struct __anonymous20 *___dst__R14s__anonymous20_1, int __i__i_1){
     582    ((void)((*___dst__R14s__anonymous20_1).__i__i_1=__i__i_1) /* ?{} */);
    583583}
    584584static inline volatile const struct __anonymous20 __f35__FCV14s__anonymous20___1();
     
    586586    int __i__i_1;
    587587};
    588 static inline void ___constructor__F_P14s__anonymous21_autogen___1(struct __anonymous21 *___dst__P14s__anonymous21_1);
    589 static inline void ___constructor__F_P14s__anonymous2114s__anonymous21_autogen___1(struct __anonymous21 *___dst__P14s__anonymous21_1, struct __anonymous21 ___src__14s__anonymous21_1);
    590 static inline void ___destructor__F_P14s__anonymous21_autogen___1(struct __anonymous21 *___dst__P14s__anonymous21_1);
    591 static inline struct __anonymous21 ___operator_assign__F14s__anonymous21_P14s__anonymous2114s__anonymous21_autogen___1(struct __anonymous21 *___dst__P14s__anonymous21_1, struct __anonymous21 ___src__14s__anonymous21_1);
    592 static inline void ___constructor__F_P14s__anonymous21_autogen___1(struct __anonymous21 *___dst__P14s__anonymous21_1){
    593     ((void)((*((int *)(&(*___dst__P14s__anonymous21_1).__i__i_1)))) /* ?{} */);
    594 }
    595 static inline void ___constructor__F_P14s__anonymous2114s__anonymous21_autogen___1(struct __anonymous21 *___dst__P14s__anonymous21_1, struct __anonymous21 ___src__14s__anonymous21_1){
    596     ((void)((*((int *)(&(*___dst__P14s__anonymous21_1).__i__i_1)))=___src__14s__anonymous21_1.__i__i_1) /* ?{} */);
    597 }
    598 static inline void ___destructor__F_P14s__anonymous21_autogen___1(struct __anonymous21 *___dst__P14s__anonymous21_1){
    599     ((void)((*((int *)(&(*___dst__P14s__anonymous21_1).__i__i_1)))) /* ^?{} */);
    600 }
    601 static inline struct __anonymous21 ___operator_assign__F14s__anonymous21_P14s__anonymous2114s__anonymous21_autogen___1(struct __anonymous21 *___dst__P14s__anonymous21_1, struct __anonymous21 ___src__14s__anonymous21_1){
     588static inline void ___constructor__F_R14s__anonymous21_autogen___1(struct __anonymous21 *___dst__R14s__anonymous21_1);
     589static inline void ___constructor__F_R14s__anonymous2114s__anonymous21_autogen___1(struct __anonymous21 *___dst__R14s__anonymous21_1, struct __anonymous21 ___src__14s__anonymous21_1);
     590static inline void ___destructor__F_R14s__anonymous21_autogen___1(struct __anonymous21 *___dst__R14s__anonymous21_1);
     591static inline struct __anonymous21 ___operator_assign__F14s__anonymous21_R14s__anonymous2114s__anonymous21_autogen___1(struct __anonymous21 *___dst__R14s__anonymous21_1, struct __anonymous21 ___src__14s__anonymous21_1);
     592static inline void ___constructor__F_R14s__anonymous21_autogen___1(struct __anonymous21 *___dst__R14s__anonymous21_1){
     593    ((void)((*___dst__R14s__anonymous21_1).__i__i_1) /* ?{} */);
     594}
     595static inline void ___constructor__F_R14s__anonymous2114s__anonymous21_autogen___1(struct __anonymous21 *___dst__R14s__anonymous21_1, struct __anonymous21 ___src__14s__anonymous21_1){
     596    ((void)((*___dst__R14s__anonymous21_1).__i__i_1=___src__14s__anonymous21_1.__i__i_1) /* ?{} */);
     597}
     598static inline void ___destructor__F_R14s__anonymous21_autogen___1(struct __anonymous21 *___dst__R14s__anonymous21_1){
     599    ((void)((*___dst__R14s__anonymous21_1).__i__i_1) /* ^?{} */);
     600}
     601static inline struct __anonymous21 ___operator_assign__F14s__anonymous21_R14s__anonymous2114s__anonymous21_autogen___1(struct __anonymous21 *___dst__R14s__anonymous21_1, struct __anonymous21 ___src__14s__anonymous21_1){
    602602    struct __anonymous21 ___ret__14s__anonymous21_1;
    603     ((void)((*___dst__P14s__anonymous21_1).__i__i_1=___src__14s__anonymous21_1.__i__i_1));
    604     ((void)___constructor__F_P14s__anonymous2114s__anonymous21_autogen___1((&___ret__14s__anonymous21_1), ___src__14s__anonymous21_1));
     603    ((void)((*___dst__R14s__anonymous21_1).__i__i_1=___src__14s__anonymous21_1.__i__i_1));
     604    ((void)___constructor__F_R14s__anonymous2114s__anonymous21_autogen___1((&___ret__14s__anonymous21_1), ___src__14s__anonymous21_1));
    605605    return ((struct __anonymous21 )___ret__14s__anonymous21_1);
    606606}
    607 static inline void ___constructor__F_P14s__anonymous21i_autogen___1(struct __anonymous21 *___dst__P14s__anonymous21_1, int __i__i_1){
    608     ((void)((*((int *)(&(*___dst__P14s__anonymous21_1).__i__i_1)))=__i__i_1) /* ?{} */);
     607static inline void ___constructor__F_R14s__anonymous21i_autogen___1(struct __anonymous21 *___dst__R14s__anonymous21_1, int __i__i_1){
     608    ((void)((*___dst__R14s__anonymous21_1).__i__i_1=__i__i_1) /* ?{} */);
    609609}
    610610static inline volatile const struct __anonymous21 __f36__FCV14s__anonymous21___1();
     
    612612    int __i__i_1;
    613613};
    614 static inline void ___constructor__F_P14s__anonymous22_autogen___1(struct __anonymous22 *___dst__P14s__anonymous22_1);
    615 static inline void ___constructor__F_P14s__anonymous2214s__anonymous22_autogen___1(struct __anonymous22 *___dst__P14s__anonymous22_1, struct __anonymous22 ___src__14s__anonymous22_1);
    616 static inline void ___destructor__F_P14s__anonymous22_autogen___1(struct __anonymous22 *___dst__P14s__anonymous22_1);
    617 static inline struct __anonymous22 ___operator_assign__F14s__anonymous22_P14s__anonymous2214s__anonymous22_autogen___1(struct __anonymous22 *___dst__P14s__anonymous22_1, struct __anonymous22 ___src__14s__anonymous22_1);
    618 static inline void ___constructor__F_P14s__anonymous22_autogen___1(struct __anonymous22 *___dst__P14s__anonymous22_1){
    619     ((void)((*((int *)(&(*___dst__P14s__anonymous22_1).__i__i_1)))) /* ?{} */);
    620 }
    621 static inline void ___constructor__F_P14s__anonymous2214s__anonymous22_autogen___1(struct __anonymous22 *___dst__P14s__anonymous22_1, struct __anonymous22 ___src__14s__anonymous22_1){
    622     ((void)((*((int *)(&(*___dst__P14s__anonymous22_1).__i__i_1)))=___src__14s__anonymous22_1.__i__i_1) /* ?{} */);
    623 }
    624 static inline void ___destructor__F_P14s__anonymous22_autogen___1(struct __anonymous22 *___dst__P14s__anonymous22_1){
    625     ((void)((*((int *)(&(*___dst__P14s__anonymous22_1).__i__i_1)))) /* ^?{} */);
    626 }
    627 static inline struct __anonymous22 ___operator_assign__F14s__anonymous22_P14s__anonymous2214s__anonymous22_autogen___1(struct __anonymous22 *___dst__P14s__anonymous22_1, struct __anonymous22 ___src__14s__anonymous22_1){
     614static inline void ___constructor__F_R14s__anonymous22_autogen___1(struct __anonymous22 *___dst__R14s__anonymous22_1);
     615static inline void ___constructor__F_R14s__anonymous2214s__anonymous22_autogen___1(struct __anonymous22 *___dst__R14s__anonymous22_1, struct __anonymous22 ___src__14s__anonymous22_1);
     616static inline void ___destructor__F_R14s__anonymous22_autogen___1(struct __anonymous22 *___dst__R14s__anonymous22_1);
     617static inline struct __anonymous22 ___operator_assign__F14s__anonymous22_R14s__anonymous2214s__anonymous22_autogen___1(struct __anonymous22 *___dst__R14s__anonymous22_1, struct __anonymous22 ___src__14s__anonymous22_1);
     618static inline void ___constructor__F_R14s__anonymous22_autogen___1(struct __anonymous22 *___dst__R14s__anonymous22_1){
     619    ((void)((*___dst__R14s__anonymous22_1).__i__i_1) /* ?{} */);
     620}
     621static inline void ___constructor__F_R14s__anonymous2214s__anonymous22_autogen___1(struct __anonymous22 *___dst__R14s__anonymous22_1, struct __anonymous22 ___src__14s__anonymous22_1){
     622    ((void)((*___dst__R14s__anonymous22_1).__i__i_1=___src__14s__anonymous22_1.__i__i_1) /* ?{} */);
     623}
     624static inline void ___destructor__F_R14s__anonymous22_autogen___1(struct __anonymous22 *___dst__R14s__anonymous22_1){
     625    ((void)((*___dst__R14s__anonymous22_1).__i__i_1) /* ^?{} */);
     626}
     627static inline struct __anonymous22 ___operator_assign__F14s__anonymous22_R14s__anonymous2214s__anonymous22_autogen___1(struct __anonymous22 *___dst__R14s__anonymous22_1, struct __anonymous22 ___src__14s__anonymous22_1){
    628628    struct __anonymous22 ___ret__14s__anonymous22_1;
    629     ((void)((*___dst__P14s__anonymous22_1).__i__i_1=___src__14s__anonymous22_1.__i__i_1));
    630     ((void)___constructor__F_P14s__anonymous2214s__anonymous22_autogen___1((&___ret__14s__anonymous22_1), ___src__14s__anonymous22_1));
     629    ((void)((*___dst__R14s__anonymous22_1).__i__i_1=___src__14s__anonymous22_1.__i__i_1));
     630    ((void)___constructor__F_R14s__anonymous2214s__anonymous22_autogen___1((&___ret__14s__anonymous22_1), ___src__14s__anonymous22_1));
    631631    return ((struct __anonymous22 )___ret__14s__anonymous22_1);
    632632}
    633 static inline void ___constructor__F_P14s__anonymous22i_autogen___1(struct __anonymous22 *___dst__P14s__anonymous22_1, int __i__i_1){
    634     ((void)((*((int *)(&(*___dst__P14s__anonymous22_1).__i__i_1)))=__i__i_1) /* ?{} */);
     633static inline void ___constructor__F_R14s__anonymous22i_autogen___1(struct __anonymous22 *___dst__R14s__anonymous22_1, int __i__i_1){
     634    ((void)((*___dst__R14s__anonymous22_1).__i__i_1=__i__i_1) /* ?{} */);
    635635}
    636636static inline volatile const struct __anonymous22 __f37__FCV14s__anonymous22___1();
     
    638638    int __i__i_1;
    639639};
    640 static inline void ___constructor__F_P14s__anonymous23_autogen___1(struct __anonymous23 *___dst__P14s__anonymous23_1);
    641 static inline void ___constructor__F_P14s__anonymous2314s__anonymous23_autogen___1(struct __anonymous23 *___dst__P14s__anonymous23_1, struct __anonymous23 ___src__14s__anonymous23_1);
    642 static inline void ___destructor__F_P14s__anonymous23_autogen___1(struct __anonymous23 *___dst__P14s__anonymous23_1);
    643 static inline struct __anonymous23 ___operator_assign__F14s__anonymous23_P14s__anonymous2314s__anonymous23_autogen___1(struct __anonymous23 *___dst__P14s__anonymous23_1, struct __anonymous23 ___src__14s__anonymous23_1);
    644 static inline void ___constructor__F_P14s__anonymous23_autogen___1(struct __anonymous23 *___dst__P14s__anonymous23_1){
    645     ((void)((*((int *)(&(*___dst__P14s__anonymous23_1).__i__i_1)))) /* ?{} */);
    646 }
    647 static inline void ___constructor__F_P14s__anonymous2314s__anonymous23_autogen___1(struct __anonymous23 *___dst__P14s__anonymous23_1, struct __anonymous23 ___src__14s__anonymous23_1){
    648     ((void)((*((int *)(&(*___dst__P14s__anonymous23_1).__i__i_1)))=___src__14s__anonymous23_1.__i__i_1) /* ?{} */);
    649 }
    650 static inline void ___destructor__F_P14s__anonymous23_autogen___1(struct __anonymous23 *___dst__P14s__anonymous23_1){
    651     ((void)((*((int *)(&(*___dst__P14s__anonymous23_1).__i__i_1)))) /* ^?{} */);
    652 }
    653 static inline struct __anonymous23 ___operator_assign__F14s__anonymous23_P14s__anonymous2314s__anonymous23_autogen___1(struct __anonymous23 *___dst__P14s__anonymous23_1, struct __anonymous23 ___src__14s__anonymous23_1){
     640static inline void ___constructor__F_R14s__anonymous23_autogen___1(struct __anonymous23 *___dst__R14s__anonymous23_1);
     641static inline void ___constructor__F_R14s__anonymous2314s__anonymous23_autogen___1(struct __anonymous23 *___dst__R14s__anonymous23_1, struct __anonymous23 ___src__14s__anonymous23_1);
     642static inline void ___destructor__F_R14s__anonymous23_autogen___1(struct __anonymous23 *___dst__R14s__anonymous23_1);
     643static inline struct __anonymous23 ___operator_assign__F14s__anonymous23_R14s__anonymous2314s__anonymous23_autogen___1(struct __anonymous23 *___dst__R14s__anonymous23_1, struct __anonymous23 ___src__14s__anonymous23_1);
     644static inline void ___constructor__F_R14s__anonymous23_autogen___1(struct __anonymous23 *___dst__R14s__anonymous23_1){
     645    ((void)((*___dst__R14s__anonymous23_1).__i__i_1) /* ?{} */);
     646}
     647static inline void ___constructor__F_R14s__anonymous2314s__anonymous23_autogen___1(struct __anonymous23 *___dst__R14s__anonymous23_1, struct __anonymous23 ___src__14s__anonymous23_1){
     648    ((void)((*___dst__R14s__anonymous23_1).__i__i_1=___src__14s__anonymous23_1.__i__i_1) /* ?{} */);
     649}
     650static inline void ___destructor__F_R14s__anonymous23_autogen___1(struct __anonymous23 *___dst__R14s__anonymous23_1){
     651    ((void)((*___dst__R14s__anonymous23_1).__i__i_1) /* ^?{} */);
     652}
     653static inline struct __anonymous23 ___operator_assign__F14s__anonymous23_R14s__anonymous2314s__anonymous23_autogen___1(struct __anonymous23 *___dst__R14s__anonymous23_1, struct __anonymous23 ___src__14s__anonymous23_1){
    654654    struct __anonymous23 ___ret__14s__anonymous23_1;
    655     ((void)((*___dst__P14s__anonymous23_1).__i__i_1=___src__14s__anonymous23_1.__i__i_1));
    656     ((void)___constructor__F_P14s__anonymous2314s__anonymous23_autogen___1((&___ret__14s__anonymous23_1), ___src__14s__anonymous23_1));
     655    ((void)((*___dst__R14s__anonymous23_1).__i__i_1=___src__14s__anonymous23_1.__i__i_1));
     656    ((void)___constructor__F_R14s__anonymous2314s__anonymous23_autogen___1((&___ret__14s__anonymous23_1), ___src__14s__anonymous23_1));
    657657    return ((struct __anonymous23 )___ret__14s__anonymous23_1);
    658658}
    659 static inline void ___constructor__F_P14s__anonymous23i_autogen___1(struct __anonymous23 *___dst__P14s__anonymous23_1, int __i__i_1){
    660     ((void)((*((int *)(&(*___dst__P14s__anonymous23_1).__i__i_1)))=__i__i_1) /* ?{} */);
     659static inline void ___constructor__F_R14s__anonymous23i_autogen___1(struct __anonymous23 *___dst__R14s__anonymous23_1, int __i__i_1){
     660    ((void)((*___dst__R14s__anonymous23_1).__i__i_1=__i__i_1) /* ?{} */);
    661661}
    662662static inline volatile const struct __anonymous23 __f38__FCV14s__anonymous23___1();
     
    687687    __attribute__ ((unused)) int ___retval_main__i_1;
    688688    int _tmp_cp_ret0;
    689     ((void)(___retval_main__i_1=((_tmp_cp_ret0=invoke_main(__argc__i_1, __argv__PPc_1, __envp__PPc_1)) , _tmp_cp_ret0)) /* ?{} */);
    690     ((void)((*((int *)(&_tmp_cp_ret0)))) /* ^?{} */);
     689    ((void)(___retval_main__i_1=(((void)(_tmp_cp_ret0=invoke_main(__argc__i_1, __argv__PPc_1, __envp__PPc_1))) , _tmp_cp_ret0)) /* ?{} */);
     690    ((void)(_tmp_cp_ret0) /* ^?{} */);
    691691    return ((int )___retval_main__i_1);
    692692}
  • src/tests/.expect/64/extension.txt

    raf08051 r28e58fd  
    1313    __extension__ int __c__i_1;
    1414};
    15 static inline void ___constructor__F_P2sS_autogen___1(struct S *___dst__P2sS_1);
    16 static inline void ___constructor__F_P2sS2sS_autogen___1(struct S *___dst__P2sS_1, struct S ___src__2sS_1);
    17 static inline void ___destructor__F_P2sS_autogen___1(struct S *___dst__P2sS_1);
    18 static inline struct S ___operator_assign__F2sS_P2sS2sS_autogen___1(struct S *___dst__P2sS_1, struct S ___src__2sS_1);
    19 static inline void ___constructor__F_P2sS_autogen___1(struct S *___dst__P2sS_1){
    20     ((void)((*((int *)(&(*___dst__P2sS_1).__a__i_1)))) /* ?{} */);
    21     ((void)((*((int *)(&(*___dst__P2sS_1).__b__i_1)))) /* ?{} */);
    22     ((void)((*((int *)(&(*___dst__P2sS_1).__c__i_1)))) /* ?{} */);
     15static inline void ___constructor__F_R2sS_autogen___1(struct S *___dst__R2sS_1);
     16static inline void ___constructor__F_R2sS2sS_autogen___1(struct S *___dst__R2sS_1, struct S ___src__2sS_1);
     17static inline void ___destructor__F_R2sS_autogen___1(struct S *___dst__R2sS_1);
     18static inline struct S ___operator_assign__F2sS_R2sS2sS_autogen___1(struct S *___dst__R2sS_1, struct S ___src__2sS_1);
     19static inline void ___constructor__F_R2sS_autogen___1(struct S *___dst__R2sS_1){
     20    ((void)((*___dst__R2sS_1).__a__i_1) /* ?{} */);
     21    ((void)((*___dst__R2sS_1).__b__i_1) /* ?{} */);
     22    ((void)((*___dst__R2sS_1).__c__i_1) /* ?{} */);
    2323}
    24 static inline void ___constructor__F_P2sS2sS_autogen___1(struct S *___dst__P2sS_1, struct S ___src__2sS_1){
    25     ((void)((*((int *)(&(*___dst__P2sS_1).__a__i_1)))=___src__2sS_1.__a__i_1) /* ?{} */);
    26     ((void)((*((int *)(&(*___dst__P2sS_1).__b__i_1)))=___src__2sS_1.__b__i_1) /* ?{} */);
    27     ((void)((*((int *)(&(*___dst__P2sS_1).__c__i_1)))=___src__2sS_1.__c__i_1) /* ?{} */);
     24static inline void ___constructor__F_R2sS2sS_autogen___1(struct S *___dst__R2sS_1, struct S ___src__2sS_1){
     25    ((void)((*___dst__R2sS_1).__a__i_1=___src__2sS_1.__a__i_1) /* ?{} */);
     26    ((void)((*___dst__R2sS_1).__b__i_1=___src__2sS_1.__b__i_1) /* ?{} */);
     27    ((void)((*___dst__R2sS_1).__c__i_1=___src__2sS_1.__c__i_1) /* ?{} */);
    2828}
    29 static inline void ___destructor__F_P2sS_autogen___1(struct S *___dst__P2sS_1){
    30     ((void)((*((int *)(&(*___dst__P2sS_1).__c__i_1)))) /* ^?{} */);
    31     ((void)((*((int *)(&(*___dst__P2sS_1).__b__i_1)))) /* ^?{} */);
    32     ((void)((*((int *)(&(*___dst__P2sS_1).__a__i_1)))) /* ^?{} */);
     29static inline void ___destructor__F_R2sS_autogen___1(struct S *___dst__R2sS_1){
     30    ((void)((*___dst__R2sS_1).__c__i_1) /* ^?{} */);
     31    ((void)((*___dst__R2sS_1).__b__i_1) /* ^?{} */);
     32    ((void)((*___dst__R2sS_1).__a__i_1) /* ^?{} */);
    3333}
    34 static inline struct S ___operator_assign__F2sS_P2sS2sS_autogen___1(struct S *___dst__P2sS_1, struct S ___src__2sS_1){
     34static inline struct S ___operator_assign__F2sS_R2sS2sS_autogen___1(struct S *___dst__R2sS_1, struct S ___src__2sS_1){
    3535    struct S ___ret__2sS_1;
    36     ((void)((*___dst__P2sS_1).__a__i_1=___src__2sS_1.__a__i_1));
    37     ((void)((*___dst__P2sS_1).__b__i_1=___src__2sS_1.__b__i_1));
    38     ((void)((*___dst__P2sS_1).__c__i_1=___src__2sS_1.__c__i_1));
    39     ((void)___constructor__F_P2sS2sS_autogen___1((&___ret__2sS_1), ___src__2sS_1));
     36    ((void)((*___dst__R2sS_1).__a__i_1=___src__2sS_1.__a__i_1));
     37    ((void)((*___dst__R2sS_1).__b__i_1=___src__2sS_1.__b__i_1));
     38    ((void)((*___dst__R2sS_1).__c__i_1=___src__2sS_1.__c__i_1));
     39    ((void)___constructor__F_R2sS2sS_autogen___1((&___ret__2sS_1), ___src__2sS_1));
    4040    return ((struct S )___ret__2sS_1);
    4141}
    42 static inline void ___constructor__F_P2sSi_autogen___1(struct S *___dst__P2sS_1, int __a__i_1){
    43     ((void)((*((int *)(&(*___dst__P2sS_1).__a__i_1)))=__a__i_1) /* ?{} */);
    44     ((void)((*((int *)(&(*___dst__P2sS_1).__b__i_1)))) /* ?{} */);
    45     ((void)((*((int *)(&(*___dst__P2sS_1).__c__i_1)))) /* ?{} */);
     42static inline void ___constructor__F_R2sSi_autogen___1(struct S *___dst__R2sS_1, int __a__i_1){
     43    ((void)((*___dst__R2sS_1).__a__i_1=__a__i_1) /* ?{} */);
     44    ((void)((*___dst__R2sS_1).__b__i_1) /* ?{} */);
     45    ((void)((*___dst__R2sS_1).__c__i_1) /* ?{} */);
    4646}
    47 static inline void ___constructor__F_P2sSii_autogen___1(struct S *___dst__P2sS_1, int __a__i_1, int __b__i_1){
    48     ((void)((*((int *)(&(*___dst__P2sS_1).__a__i_1)))=__a__i_1) /* ?{} */);
    49     ((void)((*((int *)(&(*___dst__P2sS_1).__b__i_1)))=__b__i_1) /* ?{} */);
    50     ((void)((*((int *)(&(*___dst__P2sS_1).__c__i_1)))) /* ?{} */);
     47static inline void ___constructor__F_R2sSii_autogen___1(struct S *___dst__R2sS_1, int __a__i_1, int __b__i_1){
     48    ((void)((*___dst__R2sS_1).__a__i_1=__a__i_1) /* ?{} */);
     49    ((void)((*___dst__R2sS_1).__b__i_1=__b__i_1) /* ?{} */);
     50    ((void)((*___dst__R2sS_1).__c__i_1) /* ?{} */);
    5151}
    52 static inline void ___constructor__F_P2sSiii_autogen___1(struct S *___dst__P2sS_1, int __a__i_1, int __b__i_1, int __c__i_1){
    53     ((void)((*((int *)(&(*___dst__P2sS_1).__a__i_1)))=__a__i_1) /* ?{} */);
    54     ((void)((*((int *)(&(*___dst__P2sS_1).__b__i_1)))=__b__i_1) /* ?{} */);
    55     ((void)((*((int *)(&(*___dst__P2sS_1).__c__i_1)))=__c__i_1) /* ?{} */);
     52static inline void ___constructor__F_R2sSiii_autogen___1(struct S *___dst__R2sS_1, int __a__i_1, int __b__i_1, int __c__i_1){
     53    ((void)((*___dst__R2sS_1).__a__i_1=__a__i_1) /* ?{} */);
     54    ((void)((*___dst__R2sS_1).__b__i_1=__b__i_1) /* ?{} */);
     55    ((void)((*___dst__R2sS_1).__c__i_1=__c__i_1) /* ?{} */);
    5656}
    5757__extension__ union U {
     
    6060    __extension__ int __c__i_1;
    6161};
    62 static inline void ___constructor__F_P2uU_autogen___1(union U *___dst__P2uU_1){
     62static inline void ___constructor__F_R2uU_autogen___1(__attribute__ ((unused)) union U *___dst__R2uU_1){
    6363}
    64 static inline void ___constructor__F_P2uU2uU_autogen___1(union U *___dst__P2uU_1, union U ___src__2uU_1){
    65     ((void)__builtin_memcpy(((void *)___dst__P2uU_1), ((const void *)(&___src__2uU_1)), sizeof(union U )));
     64static inline void ___constructor__F_R2uU2uU_autogen___1(union U *___dst__R2uU_1, union U ___src__2uU_1){
     65    ((void)__builtin_memcpy(((void *)___dst__R2uU_1), ((const void *)(&___src__2uU_1)), sizeof(union U )));
    6666}
    67 static inline void ___destructor__F_P2uU_autogen___1(union U *___dst__P2uU_1){
     67static inline void ___destructor__F_R2uU_autogen___1(__attribute__ ((unused)) union U *___dst__R2uU_1){
    6868}
    69 static inline union U ___operator_assign__F2uU_P2uU2uU_autogen___1(union U *___dst__P2uU_1, union U ___src__2uU_1){
     69static inline union U ___operator_assign__F2uU_R2uU2uU_autogen___1(union U *___dst__R2uU_1, union U ___src__2uU_1){
    7070    union U ___ret__2uU_1;
    71     ((void)__builtin_memcpy(((void *)___dst__P2uU_1), ((const void *)(&___src__2uU_1)), sizeof(union U )));
    72     ((void)___constructor__F_P2uU2uU_autogen___1((&___ret__2uU_1), ___src__2uU_1));
     71    ((void)__builtin_memcpy(((void *)___dst__R2uU_1), ((const void *)(&___src__2uU_1)), sizeof(union U )));
     72    ((void)___constructor__F_R2uU2uU_autogen___1((&___ret__2uU_1), ___src__2uU_1));
    7373    return ((union U )___ret__2uU_1);
    7474}
    75 static inline void ___constructor__F_P2uUi_autogen___1(union U *___dst__P2uU_1, int __src__i_1){
    76     ((void)__builtin_memcpy(((void *)___dst__P2uU_1), ((const void *)(&__src__i_1)), sizeof(int )));
     75static inline void ___constructor__F_R2uUi_autogen___1(__attribute__ ((unused)) union U *___dst__R2uU_1, int __src__i_1){
     76    ((void)__builtin_memcpy(((void *)___dst__R2uU_1), ((const void *)(&__src__i_1)), sizeof(int )));
    7777}
    7878__extension__ enum E {
     
    102102    ((void)(__extension__ __a__i_2=(__extension__ __b__i_2+__extension__ __c__i_2)));
    103103    int _tmp_cp_ret0;
    104     ((void)((_tmp_cp_ret0=__extension__ __fred__Fi_i__1(3)) , _tmp_cp_ret0));
    105     ((void)((*((int *)(&_tmp_cp_ret0)))) /* ^?{} */);
     104    ((void)(((void)(_tmp_cp_ret0=__extension__ __fred__Fi_i__1(3))) , _tmp_cp_ret0));
     105    ((void)(_tmp_cp_ret0) /* ^?{} */);
    106106    __extension__ int __mary__Fi_i__2(int __p__i_2){
    107107        __attribute__ ((unused)) int ___retval_mary__i_2;
     
    113113    ((void)(((int )((__extension__ __a__i_2>__extension__ __b__i_2)!=((int )0))) ? __extension__ __c__i_2 : __extension__ __c__i_2));
    114114    ((void)(__extension__ __a__i_2=__extension__ (__extension__ __b__i_2+__extension__ __c__i_2)));
    115     ((void)((__extension__ __a__i_2 , __extension__ __b__i_2) , __extension__ __c__i_2));
     115    ((void)(((void)(((void)__extension__ __a__i_2) , __extension__ __b__i_2)) , __extension__ __c__i_2));
    116116}
  • src/tests/.expect/64/gccExtensions.txt

    raf08051 r28e58fd  
    4343        __extension__ int __c__i_2;
    4444    };
    45     inline void ___constructor__F_P2sS_autogen___2(struct S *___dst__P2sS_2){
    46         ((void)((*((int *)(&(*___dst__P2sS_2).__a__i_2)))) /* ?{} */);
    47         ((void)((*((int *)(&(*___dst__P2sS_2).__b__i_2)))) /* ?{} */);
    48         ((void)((*((int *)(&(*___dst__P2sS_2).__c__i_2)))) /* ?{} */);
     45    inline void ___constructor__F_R2sS_autogen___2(struct S *___dst__R2sS_2){
     46        ((void)((*___dst__R2sS_2).__a__i_2) /* ?{} */);
     47        ((void)((*___dst__R2sS_2).__b__i_2) /* ?{} */);
     48        ((void)((*___dst__R2sS_2).__c__i_2) /* ?{} */);
    4949    }
    50     inline void ___constructor__F_P2sS2sS_autogen___2(struct S *___dst__P2sS_2, struct S ___src__2sS_2){
    51         ((void)((*((int *)(&(*___dst__P2sS_2).__a__i_2)))=___src__2sS_2.__a__i_2) /* ?{} */);
    52         ((void)((*((int *)(&(*___dst__P2sS_2).__b__i_2)))=___src__2sS_2.__b__i_2) /* ?{} */);
    53         ((void)((*((int *)(&(*___dst__P2sS_2).__c__i_2)))=___src__2sS_2.__c__i_2) /* ?{} */);
     50    inline void ___constructor__F_R2sS2sS_autogen___2(struct S *___dst__R2sS_2, struct S ___src__2sS_2){
     51        ((void)((*___dst__R2sS_2).__a__i_2=___src__2sS_2.__a__i_2) /* ?{} */);
     52        ((void)((*___dst__R2sS_2).__b__i_2=___src__2sS_2.__b__i_2) /* ?{} */);
     53        ((void)((*___dst__R2sS_2).__c__i_2=___src__2sS_2.__c__i_2) /* ?{} */);
    5454    }
    55     inline void ___destructor__F_P2sS_autogen___2(struct S *___dst__P2sS_2){
    56         ((void)((*((int *)(&(*___dst__P2sS_2).__c__i_2)))) /* ^?{} */);
    57         ((void)((*((int *)(&(*___dst__P2sS_2).__b__i_2)))) /* ^?{} */);
    58         ((void)((*((int *)(&(*___dst__P2sS_2).__a__i_2)))) /* ^?{} */);
     55    inline void ___destructor__F_R2sS_autogen___2(struct S *___dst__R2sS_2){
     56        ((void)((*___dst__R2sS_2).__c__i_2) /* ^?{} */);
     57        ((void)((*___dst__R2sS_2).__b__i_2) /* ^?{} */);
     58        ((void)((*___dst__R2sS_2).__a__i_2) /* ^?{} */);
    5959    }
    60     inline struct S ___operator_assign__F2sS_P2sS2sS_autogen___2(struct S *___dst__P2sS_2, struct S ___src__2sS_2){
     60    inline struct S ___operator_assign__F2sS_R2sS2sS_autogen___2(struct S *___dst__R2sS_2, struct S ___src__2sS_2){
    6161        struct S ___ret__2sS_2;
    62         ((void)((*___dst__P2sS_2).__a__i_2=___src__2sS_2.__a__i_2));
    63         ((void)((*___dst__P2sS_2).__b__i_2=___src__2sS_2.__b__i_2));
    64         ((void)((*___dst__P2sS_2).__c__i_2=___src__2sS_2.__c__i_2));
    65         ((void)___constructor__F_P2sS2sS_autogen___2((&___ret__2sS_2), ___src__2sS_2));
     62        ((void)((*___dst__R2sS_2).__a__i_2=___src__2sS_2.__a__i_2));
     63        ((void)((*___dst__R2sS_2).__b__i_2=___src__2sS_2.__b__i_2));
     64        ((void)((*___dst__R2sS_2).__c__i_2=___src__2sS_2.__c__i_2));
     65        ((void)___constructor__F_R2sS2sS_autogen___2((&___ret__2sS_2), ___src__2sS_2));
    6666        return ((struct S )___ret__2sS_2);
    6767    }
    68     inline void ___constructor__F_P2sSi_autogen___2(struct S *___dst__P2sS_2, int __a__i_2){
    69         ((void)((*((int *)(&(*___dst__P2sS_2).__a__i_2)))=__a__i_2) /* ?{} */);
    70         ((void)((*((int *)(&(*___dst__P2sS_2).__b__i_2)))) /* ?{} */);
    71         ((void)((*((int *)(&(*___dst__P2sS_2).__c__i_2)))) /* ?{} */);
     68    inline void ___constructor__F_R2sSi_autogen___2(struct S *___dst__R2sS_2, int __a__i_2){
     69        ((void)((*___dst__R2sS_2).__a__i_2=__a__i_2) /* ?{} */);
     70        ((void)((*___dst__R2sS_2).__b__i_2) /* ?{} */);
     71        ((void)((*___dst__R2sS_2).__c__i_2) /* ?{} */);
    7272    }
    73     inline void ___constructor__F_P2sSii_autogen___2(struct S *___dst__P2sS_2, int __a__i_2, int __b__i_2){
    74         ((void)((*((int *)(&(*___dst__P2sS_2).__a__i_2)))=__a__i_2) /* ?{} */);
    75         ((void)((*((int *)(&(*___dst__P2sS_2).__b__i_2)))=__b__i_2) /* ?{} */);
    76         ((void)((*((int *)(&(*___dst__P2sS_2).__c__i_2)))) /* ?{} */);
     73    inline void ___constructor__F_R2sSii_autogen___2(struct S *___dst__R2sS_2, int __a__i_2, int __b__i_2){
     74        ((void)((*___dst__R2sS_2).__a__i_2=__a__i_2) /* ?{} */);
     75        ((void)((*___dst__R2sS_2).__b__i_2=__b__i_2) /* ?{} */);
     76        ((void)((*___dst__R2sS_2).__c__i_2) /* ?{} */);
    7777    }
    78     inline void ___constructor__F_P2sSiii_autogen___2(struct S *___dst__P2sS_2, int __a__i_2, int __b__i_2, int __c__i_2){
    79         ((void)((*((int *)(&(*___dst__P2sS_2).__a__i_2)))=__a__i_2) /* ?{} */);
    80         ((void)((*((int *)(&(*___dst__P2sS_2).__b__i_2)))=__b__i_2) /* ?{} */);
    81         ((void)((*((int *)(&(*___dst__P2sS_2).__c__i_2)))=__c__i_2) /* ?{} */);
     78    inline void ___constructor__F_R2sSiii_autogen___2(struct S *___dst__R2sS_2, int __a__i_2, int __b__i_2, int __c__i_2){
     79        ((void)((*___dst__R2sS_2).__a__i_2=__a__i_2) /* ?{} */);
     80        ((void)((*___dst__R2sS_2).__b__i_2=__b__i_2) /* ?{} */);
     81        ((void)((*___dst__R2sS_2).__c__i_2=__c__i_2) /* ?{} */);
    8282    }
    8383    int __i__i_2 = ((int )__extension__ 3);
     
    8585    __extension__ int __b__i_2;
    8686    __extension__ int __c__i_2;
    87     ((void)((__extension__ __a__i_2 , __extension__ __b__i_2) , __extension__ __c__i_2));
     87    ((void)(((void)(((void)__extension__ __a__i_2) , __extension__ __b__i_2)) , __extension__ __c__i_2));
    8888    ((void)(__extension__ __a__i_2=(__extension__ __b__i_2+__extension__ __c__i_2)));
    8989    ((void)(__extension__ __a__i_2=__extension__ (__extension__ __b__i_2+__extension__ __c__i_2)));
     
    101101        int __i__i_2;
    102102    };
    103     inline void ___constructor__F_P3ss2_autogen___2(struct s2 *___dst__P3ss2_2){
    104         ((void)((*((int *)(&(*___dst__P3ss2_2).__i__i_2)))) /* ?{} */);
     103    inline void ___constructor__F_R3ss2_autogen___2(struct s2 *___dst__R3ss2_2){
     104        ((void)((*___dst__R3ss2_2).__i__i_2) /* ?{} */);
    105105    }
    106     inline void ___constructor__F_P3ss23ss2_autogen___2(struct s2 *___dst__P3ss2_2, struct s2 ___src__3ss2_2){
    107         ((void)((*((int *)(&(*___dst__P3ss2_2).__i__i_2)))=___src__3ss2_2.__i__i_2) /* ?{} */);
     106    inline void ___constructor__F_R3ss23ss2_autogen___2(struct s2 *___dst__R3ss2_2, struct s2 ___src__3ss2_2){
     107        ((void)((*___dst__R3ss2_2).__i__i_2=___src__3ss2_2.__i__i_2) /* ?{} */);
    108108    }
    109     inline void ___destructor__F_P3ss2_autogen___2(struct s2 *___dst__P3ss2_2){
    110         ((void)((*((int *)(&(*___dst__P3ss2_2).__i__i_2)))) /* ^?{} */);
     109    inline void ___destructor__F_R3ss2_autogen___2(struct s2 *___dst__R3ss2_2){
     110        ((void)((*___dst__R3ss2_2).__i__i_2) /* ^?{} */);
    111111    }
    112     inline struct s2 ___operator_assign__F3ss2_P3ss23ss2_autogen___2(struct s2 *___dst__P3ss2_2, struct s2 ___src__3ss2_2){
     112    inline struct s2 ___operator_assign__F3ss2_R3ss23ss2_autogen___2(struct s2 *___dst__R3ss2_2, struct s2 ___src__3ss2_2){
    113113        struct s2 ___ret__3ss2_2;
    114         ((void)((*___dst__P3ss2_2).__i__i_2=___src__3ss2_2.__i__i_2));
    115         ((void)___constructor__F_P3ss23ss2_autogen___2((&___ret__3ss2_2), ___src__3ss2_2));
     114        ((void)((*___dst__R3ss2_2).__i__i_2=___src__3ss2_2.__i__i_2));
     115        ((void)___constructor__F_R3ss23ss2_autogen___2((&___ret__3ss2_2), ___src__3ss2_2));
    116116        return ((struct s2 )___ret__3ss2_2);
    117117    }
    118     inline void ___constructor__F_P3ss2i_autogen___2(struct s2 *___dst__P3ss2_2, int __i__i_2){
    119         ((void)((*((int *)(&(*___dst__P3ss2_2).__i__i_2)))=__i__i_2) /* ?{} */);
     118    inline void ___constructor__F_R3ss2i_autogen___2(struct s2 *___dst__R3ss2_2, int __i__i_2){
     119        ((void)((*___dst__R3ss2_2).__i__i_2=__i__i_2) /* ?{} */);
    120120    }
    121121    struct s3 {
    122122        int __i__i_2;
    123123    };
    124     inline void ___constructor__F_P3ss3_autogen___2(struct s3 *___dst__P3ss3_2){
    125         ((void)((*((int *)(&(*___dst__P3ss3_2).__i__i_2)))) /* ?{} */);
     124    inline void ___constructor__F_R3ss3_autogen___2(struct s3 *___dst__R3ss3_2){
     125        ((void)((*___dst__R3ss3_2).__i__i_2) /* ?{} */);
    126126    }
    127     inline void ___constructor__F_P3ss33ss3_autogen___2(struct s3 *___dst__P3ss3_2, struct s3 ___src__3ss3_2){
    128         ((void)((*((int *)(&(*___dst__P3ss3_2).__i__i_2)))=___src__3ss3_2.__i__i_2) /* ?{} */);
     127    inline void ___constructor__F_R3ss33ss3_autogen___2(struct s3 *___dst__R3ss3_2, struct s3 ___src__3ss3_2){
     128        ((void)((*___dst__R3ss3_2).__i__i_2=___src__3ss3_2.__i__i_2) /* ?{} */);
    129129    }
    130     inline void ___destructor__F_P3ss3_autogen___2(struct s3 *___dst__P3ss3_2){
    131         ((void)((*((int *)(&(*___dst__P3ss3_2).__i__i_2)))) /* ^?{} */);
     130    inline void ___destructor__F_R3ss3_autogen___2(struct s3 *___dst__R3ss3_2){
     131        ((void)((*___dst__R3ss3_2).__i__i_2) /* ^?{} */);
    132132    }
    133     inline struct s3 ___operator_assign__F3ss3_P3ss33ss3_autogen___2(struct s3 *___dst__P3ss3_2, struct s3 ___src__3ss3_2){
     133    inline struct s3 ___operator_assign__F3ss3_R3ss33ss3_autogen___2(struct s3 *___dst__R3ss3_2, struct s3 ___src__3ss3_2){
    134134        struct s3 ___ret__3ss3_2;
    135         ((void)((*___dst__P3ss3_2).__i__i_2=___src__3ss3_2.__i__i_2));
    136         ((void)___constructor__F_P3ss33ss3_autogen___2((&___ret__3ss3_2), ___src__3ss3_2));
     135        ((void)((*___dst__R3ss3_2).__i__i_2=___src__3ss3_2.__i__i_2));
     136        ((void)___constructor__F_R3ss33ss3_autogen___2((&___ret__3ss3_2), ___src__3ss3_2));
    137137        return ((struct s3 )___ret__3ss3_2);
    138138    }
    139     inline void ___constructor__F_P3ss3i_autogen___2(struct s3 *___dst__P3ss3_2, int __i__i_2){
    140         ((void)((*((int *)(&(*___dst__P3ss3_2).__i__i_2)))=__i__i_2) /* ?{} */);
     139    inline void ___constructor__F_R3ss3i_autogen___2(struct s3 *___dst__R3ss3_2, int __i__i_2){
     140        ((void)((*___dst__R3ss3_2).__i__i_2=__i__i_2) /* ?{} */);
    141141    }
    142142    struct s3 __x1__3ss3_2;
     
    145145        int __i__i_2;
    146146    };
    147     inline void ___constructor__F_P3ss4_autogen___2(struct s4 *___dst__P3ss4_2){
    148         ((void)((*((int *)(&(*___dst__P3ss4_2).__i__i_2)))) /* ?{} */);
     147    inline void ___constructor__F_R3ss4_autogen___2(struct s4 *___dst__R3ss4_2){
     148        ((void)((*___dst__R3ss4_2).__i__i_2) /* ?{} */);
    149149    }
    150     inline void ___constructor__F_P3ss43ss4_autogen___2(struct s4 *___dst__P3ss4_2, struct s4 ___src__3ss4_2){
    151         ((void)((*((int *)(&(*___dst__P3ss4_2).__i__i_2)))=___src__3ss4_2.__i__i_2) /* ?{} */);
     150    inline void ___constructor__F_R3ss43ss4_autogen___2(struct s4 *___dst__R3ss4_2, struct s4 ___src__3ss4_2){
     151        ((void)((*___dst__R3ss4_2).__i__i_2=___src__3ss4_2.__i__i_2) /* ?{} */);
    152152    }
    153     inline void ___destructor__F_P3ss4_autogen___2(struct s4 *___dst__P3ss4_2){
    154         ((void)((*((int *)(&(*___dst__P3ss4_2).__i__i_2)))) /* ^?{} */);
     153    inline void ___destructor__F_R3ss4_autogen___2(struct s4 *___dst__R3ss4_2){
     154        ((void)((*___dst__R3ss4_2).__i__i_2) /* ^?{} */);
    155155    }
    156     inline struct s4 ___operator_assign__F3ss4_P3ss43ss4_autogen___2(struct s4 *___dst__P3ss4_2, struct s4 ___src__3ss4_2){
     156    inline struct s4 ___operator_assign__F3ss4_R3ss43ss4_autogen___2(struct s4 *___dst__R3ss4_2, struct s4 ___src__3ss4_2){
    157157        struct s4 ___ret__3ss4_2;
    158         ((void)((*___dst__P3ss4_2).__i__i_2=___src__3ss4_2.__i__i_2));
    159         ((void)___constructor__F_P3ss43ss4_autogen___2((&___ret__3ss4_2), ___src__3ss4_2));
     158        ((void)((*___dst__R3ss4_2).__i__i_2=___src__3ss4_2.__i__i_2));
     159        ((void)___constructor__F_R3ss43ss4_autogen___2((&___ret__3ss4_2), ___src__3ss4_2));
    160160        return ((struct s4 )___ret__3ss4_2);
    161161    }
    162     inline void ___constructor__F_P3ss4i_autogen___2(struct s4 *___dst__P3ss4_2, int __i__i_2){
    163         ((void)((*((int *)(&(*___dst__P3ss4_2).__i__i_2)))=__i__i_2) /* ?{} */);
     162    inline void ___constructor__F_R3ss4i_autogen___2(struct s4 *___dst__R3ss4_2, int __i__i_2){
     163        ((void)((*___dst__R3ss4_2).__i__i_2=__i__i_2) /* ?{} */);
    164164    }
    165165    struct s4 __x2__3ss4_2;
     
    184184    __attribute__ ((unused)) int ___retval_main__i_1;
    185185    int _tmp_cp_ret0;
    186     ((void)(___retval_main__i_1=((_tmp_cp_ret0=invoke_main(__argc__i_1, __argv__PPc_1, __envp__PPc_1)) , _tmp_cp_ret0)) /* ?{} */);
    187     ((void)((*((int *)(&_tmp_cp_ret0)))) /* ^?{} */);
     186    ((void)(___retval_main__i_1=(((void)(_tmp_cp_ret0=invoke_main(__argc__i_1, __argv__PPc_1, __envp__PPc_1))) , _tmp_cp_ret0)) /* ?{} */);
     187    ((void)(_tmp_cp_ret0) /* ^?{} */);
    188188    return ((int )___retval_main__i_1);
    189189}
  • src/tests/.expect/castError.txt

    raf08051 r28e58fd  
    44to:
    55  char
    6 Alternatives are:        Cost ( 1, 0, 0 ): Cast of:
     6Alternatives are:        Cost ( 1, 0, 0, 0 ): Cast of:
    77          Variable Expression: f: function
    88                accepting unspecified arguments
     
    1818        Environment:
    1919
    20         Cost ( 1, 0, 0 ): Cast of:
     20        Cost ( 1, 0, 0, 0 ): Cast of:
    2121          Variable Expression: f: signed int
    2222
     
    2828        Environment:
    2929
    30         Cost ( 1, 0, 0 ): Cast of:
     30        Cost ( 1, 0, 0, 0 ): Cast of:
    3131          Variable Expression: f: double
    3232
  • src/tests/.expect/memberCtors-ERR1.txt

    raf08051 r28e58fd  
    1 memberCtors.c:71 error: in void ?{}(B *b), field a2 used before being constructed
     1memberCtors.c:71 error: in void ?{}(B &b), field a2 used before being constructed
  • src/tests/.expect/memberCtors.txt

    raf08051 r28e58fd  
    77constructing int
    88begin construct B
    9 assign b->a2
    10 constructing int
    11 constructing int
    12 begin construct A
    13 construct a->x
     9assign b.a2
     10constructing int
     11constructing int
     12begin construct A
     13construct a.x
    1414constructing int: 1001
    15 assign a->y
    16 assigning int: 0 0
    17 end construct A
    18 copy constructing int: 0
    19 copy constructing int: 0
    20 begin copy construct A
    21 copy construct this->x
    22 copy constructing int: 1001
    23 assign this->y
     15assign a.y
     16assigning int: 0 0
     17end construct A
     18copy constructing int: 0
     19copy constructing int: 0
     20begin copy construct A
     21copy construct this.x
     22copy constructing int: 1001
     23assign this.y
    2424copy constructing int: 0
    2525destructing int: 0
     
    4040copy constructing int: 0
    4141begin copy construct A
    42 copy construct this->x
    43 copy constructing int: 1001
    44 assign this->y
    45 copy constructing int: 0
    46 destructing int: 0
    47 destructing int: 0
    48 end copy construct A
    49 destructing int: 0
    50 destructing int: 0
    51 destructing int: 1001
    52 destructing int: 0
    53 destructing int: 0
    54 destructing int: 1001
    55 construct b->a1
    56 constructing int
    57 constructing int
    58 begin construct A
    59 construct a->x
     42copy construct this.x
     43copy constructing int: 1001
     44assign this.y
     45copy constructing int: 0
     46destructing int: 0
     47destructing int: 0
     48end copy construct A
     49destructing int: 0
     50destructing int: 0
     51destructing int: 1001
     52destructing int: 0
     53destructing int: 0
     54destructing int: 1001
     55construct b.a1
     56constructing int
     57constructing int
     58begin construct A
     59construct a.x
    6060constructing int: 1000
    61 assign a->y
     61assign a.y
    6262assigning int: 0 0
    6363end construct A
     
    7070copy constructing int: 0
    7171begin copy construct A
    72 copy construct this->x
     72copy construct this.x
    7373copy constructing int: 1000
    74 assign this->y
    75 copy constructing int: 0
    76 destructing int: 0
    77 destructing int: 0
    78 end copy construct A
    79 copy constructing int: 0
    80 copy constructing int: 0
    81 begin copy construct A
    82 copy construct this->x
    83 copy constructing int: 1001
    84 assign this->y
    85 copy constructing int: 0
    86 destructing int: 0
    87 destructing int: 0
    88 end copy construct A
    89 copy constructing int: 0
    90 copy constructing int: 0
    91 begin copy construct A
    92 copy construct this->x
    93 copy constructing int: 0
    94 assign this->y
     74assign this.y
     75copy constructing int: 0
     76destructing int: 0
     77destructing int: 0
     78end copy construct A
     79copy constructing int: 0
     80copy constructing int: 0
     81begin copy construct A
     82copy construct this.x
     83copy constructing int: 1001
     84assign this.y
     85copy constructing int: 0
     86destructing int: 0
     87destructing int: 0
     88end copy construct A
     89copy constructing int: 0
     90copy constructing int: 0
     91begin copy construct A
     92copy construct this.x
     93copy constructing int: 0
     94assign this.y
    9595copy constructing int: 0
    9696destructing int: 0
     
    101101constructing int
    102102begin construct A
    103 construct a->x
     103construct a.x
    104104constructing int: 999
    105 assign a->y
    106 assigning int: 0 0
    107 end construct A
    108 copy constructing int: 0
    109 copy constructing int: 0
    110 begin copy construct A
    111 copy construct this->x
    112 copy constructing int: 999
    113 assign this->y
     105assign a.y
     106assigning int: 0 0
     107end construct A
     108copy constructing int: 0
     109copy constructing int: 0
     110begin copy construct A
     111copy construct this.x
     112copy constructing int: 999
     113assign this.y
    114114copy constructing int: 0
    115115destructing int: 0
     
    130130copy constructing int: 0
    131131begin copy construct A
    132 copy construct this->x
    133 copy constructing int: 999
    134 assign this->y
     132copy construct this.x
     133copy constructing int: 999
     134assign this.y
    135135copy constructing int: 0
    136136destructing int: 0
     
    158158constructing int
    159159begin construct A
    160 construct a->x
     160construct a.x
    161161constructing int: 999
    162 assign a->y
    163 assigning int: 0 0
    164 end construct A
    165 copy constructing int: 0
    166 copy constructing int: 0
    167 begin copy construct A
    168 copy construct this->x
    169 copy constructing int: 999
    170 assign this->y
     162assign a.y
     163assigning int: 0 0
     164end construct A
     165copy constructing int: 0
     166copy constructing int: 0
     167begin copy construct A
     168copy construct this.x
     169copy constructing int: 999
     170assign this.y
    171171copy constructing int: 0
    172172destructing int: 0
     
    187187copy constructing int: 0
    188188begin copy construct A
    189 copy construct this->x
    190 copy constructing int: 999
    191 assign this->y
     189copy construct this.x
     190copy constructing int: 999
     191assign this.y
    192192copy constructing int: 0
    193193destructing int: 0
  • src/tests/alloc.c

    raf08051 r28e58fd  
    1 // 
     1//
    22// Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo
    33//
     
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // alloc.c -- 
    8 // 
     7// alloc.c --
     8//
    99// Author           : Peter A. Buhr
    1010// Created On       : Wed Feb  3 07:56:22 2016
     
    1212// Last Modified On : Thu Jul 20 16:01:10 2017
    1313// Update Count     : 318
    14 // 
     14//
    1515
    1616#include <assert.h>
     
    1919#include <stdlib.h>                                                                             // posix_memalign
    2020#include <fstream>
    21 #include <stdlib>                                                                               // access C malloc, realloc
     21#include <stdlib>                                                                                       // access C malloc, realloc
    2222
    2323int * foo( int * p, int c ) { return p; }
     
    2626
    2727int main( void ) {
    28     size_t dim = 10;
    29     int * p;
     28        size_t dim = 10;
     29        int * p;
    3030        char fill = '\1';
    3131
    3232        // allocation, non-array types
    3333
    34     p = (void *)malloc( sizeof(*p) );                                   // C malloc, type unsafe
     34        p = (void *)malloc( sizeof(*p) );                   // C malloc, type unsafe
    3535        *p = 0xdeadbeef;
    3636        printf( "C   malloc %#x\n", *p );
    37     free( p );
    38 
    39     p = malloc();                                                                               // CFA malloc, type safe
     37        free( p );
     38
     39        p = malloc();                                       // CFA malloc, type safe
    4040        *p = 0xdeadbeef;
    4141        printf( "CFA malloc %#x\n", *p );
    42     free( p );
    43 
    44     p = alloc();                                                                                // CFA alloc, type safe
     42        free( p );
     43
     44        p = alloc();                                        // CFA alloc, type safe
    4545        *p = 0xdeadbeef;
    4646        printf( "CFA alloc %#x\n", *p );
    47     free( p );
    48 
    49     p = alloc( fill );                                                                  // CFA alloc, fill
     47        free( p );
     48
     49        p = alloc( fill );                                  // CFA alloc, fill
    5050        printf( "CFA alloc, fill %08x\n", *p );
    5151
     
    5454        printf( "\n" );
    5555
    56     p = calloc( dim, sizeof( *p ) );                                    // C array calloc, type unsafe
     56        p = calloc( dim, sizeof( *p ) );                    // C array calloc, type unsafe
    5757        printf( "C   array calloc, fill 0\n" );
    5858        for ( int i = 0; i < dim; i += 1 ) { printf( "%#x ", p[i] ); }
    5959        printf( "\n" );
    60     free( p );
    61 
    62     p = calloc( dim );                                                                  // CFA array calloc, type safe
     60        free( p );
     61
     62        p = calloc( dim );                                  // CFA array calloc, type safe
    6363        printf( "CFA array calloc, fill 0\n" );
    6464        for ( int i = 0; i < dim; i += 1 ) { printf( "%#x ", p[i] ); }
    6565        printf( "\n" );
    66     free( p );
    67 
    68     p = alloc( dim );                                                                   // CFA array alloc, type safe
     66        free( p );
     67
     68        p = alloc( dim );                                   // CFA array alloc, type safe
    6969        for ( int i = 0; i < dim; i += 1 ) { p[i] = 0xdeadbeef; }
    7070        printf( "CFA array alloc, no fill\n" );
    7171        for ( int i = 0; i < dim; i += 1 ) { printf( "%#x ", p[i] ); }
    7272        printf( "\n" );
    73     free( p );
    74 
    75     p = alloc( 2 * dim, fill );                                                 // CFA array alloc, fill
     73        free( p );
     74
     75        p = alloc( 2 * dim, fill );                         // CFA array alloc, fill
    7676        printf( "CFA array alloc, fill %#x\n", fill );
    7777        for ( int i = 0; i < 2 * dim; i += 1 ) { printf( "%#x ", p[i] ); }
     
    8383        printf( "\n" );
    8484
    85     p = (void *)realloc( p, dim * sizeof(*p) );                 // C realloc
     85        p = (void *)realloc( p, dim * sizeof(*p) );         // C realloc
    8686        for ( int i = 0; i < dim; i += 1 ) { p[i] = 0xdeadbeef; }
    8787        printf( "C   realloc\n" );
     
    8989        printf( "\n" );
    9090
    91     p = realloc( p, 2 * dim * sizeof(*p) );                             // CFA realloc
     91        p = realloc( p, 2 * dim * sizeof(*p) );             // CFA realloc
    9292        for ( int i = dim; i < 2 * dim; i += 1 ) { p[i] = 0x1010101; }
    9393        printf( "CFA realloc\n" );
     
    100100        printf( "\n" );
    101101
    102     p = alloc( p, dim );                                                                // CFA resize array alloc
     102        p = alloc( p, dim );                                // CFA resize array alloc
    103103        for ( int i = 0; i < dim; i += 1 ) { p[i] = 0xdeadbeef; }
    104104        printf( "CFA resize alloc\n" );
     
    106106        printf( "\n" );
    107107
    108     p = alloc( p, 2 * dim );                                                    // CFA resize array alloc
     108        p = alloc( p, 2 * dim );                            // CFA resize array alloc
    109109        for ( int i = dim; i < 2 * dim; i += 1 ) { p[i] = 0x1010101; }
    110110        printf( "CFA resize array alloc\n" );
     
    112112        printf( "\n" );
    113113
    114     p = alloc( p, dim );                                                                // CFA array alloc
     114        p = alloc( p, dim );                                // CFA array alloc
    115115        printf( "CFA resize array alloc\n" );
    116116        for ( int i = 0; i < dim; i += 1 ) { printf( "%#x ", p[i] ); }
     
    120120        p = 0;
    121121
    122     p = alloc( p, dim, fill );                                                  // CFA array alloc, fill
     122        p = alloc( p, dim, fill );                          // CFA array alloc, fill
    123123        printf( "CFA resize array alloc, fill\n" );
    124124        for ( int i = 0; i < dim; i += 1 ) { printf( "%#x ", p[i] ); }
    125125        printf( "\n" );
    126126
    127     p = alloc( p, 2 * dim, fill );                                              // CFA array alloc, fill
     127        p = alloc( p, 2 * dim, fill );                      // CFA array alloc, fill
    128128        printf( "CFA resize array alloc, fill\n" );
    129129        for ( int i = 0; i < 2 * dim; i += 1 ) { printf( "%#x ", p[i] ); }
    130130        printf( "\n" );
    131131
    132     p = alloc( p, dim, fill );                                                  // CFA array alloc, fill
     132        p = alloc( p, dim, fill );                          // CFA array alloc, fill
    133133        printf( "CFA resize array alloc, fill\n" );
    134134        for ( int i = 0; i < dim; i += 1 ) { printf( "%#x ", p[i] );; }
     
    137137
    138138
    139     struct Struct { int x; double y; };
    140     Struct st, st1, sta[dim], sta1[dim], * stp, * stp1;
     139        struct Struct { int x; double y; };
     140        Struct st, st1, sta[dim], sta1[dim], * stp, * stp1;
    141141
    142142        // alignment, non-array types
     
    144144        enum { Alignment = 128 };
    145145
    146     stp = (memalign( Alignment, sizeof( *stp ) ) ){ 42, 42.5 }; // C memalign
     146        stp = &(*(Struct*)memalign( Alignment, sizeof( *stp ) ) ){ 42, 42.5 }; // C memalign
    147147        assert( (uintptr_t)stp % Alignment == 0 );
    148148        printf( "C   memalign %d %g\n", stp->x, stp->y );
    149     free( stp );
    150 
    151     stp = (memalign( Alignment )){ 42, 42.5 };                  // CFA memalign
     149        free( stp );
     150
     151        stp = &(*memalign( Alignment )){ 42, 42.5 };          // CFA memalign
    152152        assert( (uintptr_t)stp % Alignment == 0 );
    153153        printf( "CFA memalign %d %g\n", stp->x, stp->y );
    154     free( stp );
    155 
    156     posix_memalign( (void **)&stp, Alignment, sizeof( *stp ) ); // C posix_memalign
     154        free( stp );
     155
     156        posix_memalign( (void **)&stp, Alignment, sizeof( *stp ) ); // C posix_memalign
    157157        *stp = (Struct){ 42, 42.5 };
    158158        assert( (uintptr_t)stp % Alignment == 0 );
    159159        printf( "CFA posix_memalign %d %g\n", stp->x, stp->y );
    160     free( stp );
    161 
    162     posix_memalign( &stp, Alignment );                                  // CFA posix_memalign
     160        free( stp );
     161
     162        posix_memalign( &stp, Alignment );                  // CFA posix_memalign
    163163        *stp = (Struct){ 42, 42.5 };
    164164        assert( (uintptr_t)stp % Alignment == 0 );
    165165        printf( "CFA posix_memalign %d %g\n", stp->x, stp->y );
    166     free( stp );
    167 
    168     stp = (aligned_alloc( Alignment )){ 42, 42.5 };             // CFA aligned_alloc
     166        free( stp );
     167
     168        stp = &(*aligned_alloc( Alignment )){ 42, 42.5 };     // CFA aligned_alloc
    169169        assert( (uintptr_t)stp % Alignment == 0 );
    170170        printf( "CFA aligned_alloc %d %g\n", stp->x, stp->y );
    171     free( stp );
    172 
    173     stp = (align_alloc( Alignment )){ 42, 42.5 };               // CFA align_alloc
     171        free( stp );
     172
     173        stp = &(*align_alloc( Alignment )){ 42, 42.5 };       // CFA align_alloc
    174174        assert( (uintptr_t)stp % Alignment == 0 );
    175175        printf( "CFA align_alloc %d %g\n", stp->x, stp->y );
    176     free( stp );
    177 
    178     stp = align_alloc( Alignment, fill );                               // CFA memalign, fill
     176        free( stp );
     177
     178        stp = align_alloc( Alignment, fill );               // CFA memalign, fill
    179179        assert( (uintptr_t)stp % Alignment == 0 );
    180180        printf( "CFA align_alloc fill %#x %a\n", stp->x, stp->y );
    181     free( stp );
     181        free( stp );
    182182
    183183
     
    185185        printf( "\n" );
    186186
    187     stp = align_alloc( Alignment, dim );                                // CFA array memalign
     187        stp = align_alloc( Alignment, dim );                // CFA array memalign
    188188        assert( (uintptr_t)stp % Alignment == 0 );
    189189        for ( int i = 0; i < dim; i += 1 ) { stp[i] = (Struct){ 42, 42.5 }; }
     
    191191        for ( int i = 0; i < dim; i += 1 ) { printf( "%d %g, ", stp[i].x, stp[i].y ); }
    192192        printf( "\n" );
    193     free( stp );
    194 
    195     stp = align_alloc( Alignment, dim, fill );                  // CFA array memalign, fill
     193        free( stp );
     194
     195        stp = align_alloc( Alignment, dim, fill );          // CFA array memalign, fill
    196196        assert( (uintptr_t)stp % Alignment == 0 );
    197197        printf( "CFA array align_alloc, fill\n" );
    198198        for ( int i = 0; i < dim; i += 1 ) { printf( "%#x %a, ", stp[i].x, stp[i].y ); }
    199199        printf( "\n" );
    200     free( stp );
     200        free( stp );
    201201
    202202
     
    204204        printf( "\n" );
    205205
    206     memset( &st, fill );                                                                // CFA memset, type safe
     206        memset( &st, fill );                                // CFA memset, type safe
    207207        printf( "CFA memset %#x %a\n", st.x, st.y );
    208     memcpy( &st1, &st );                                                                // CFA memcpy, type safe
     208        memcpy( &st1, &st );                                // CFA memcpy, type safe
    209209        printf( "CFA memcpy %#x %a\n", st1.x, st1.y );
    210210
     
    213213        printf( "\n" );
    214214
    215     memset( sta, dim, fill );                                                   // CFA array memset, type safe
     215        memset( sta, dim, fill );                           // CFA array memset, type safe
    216216        printf( "CFA array memset\n" );
    217217        for ( int i = 0; i < dim; i += 1 ) { printf( "%#x %a, ", sta[i].x, sta[i].y ); }
    218218        printf( "\n" );
    219219
    220     memcpy( sta1, sta, dim );                                                   // CFA array memcpy, type safe
     220        memcpy( sta1, sta, dim );                           // CFA array memcpy, type safe
    221221        printf( "CFA memcpy\n" );
    222222        for ( int i = 0; i < dim; i += 1 ) { printf( "%#x %a, ", sta1[i].x, sta1[i].y ); }
     
    245245        printf( "\n" );
    246246
    247     float * fp = malloc() + 1;
    248     printf( "pointer arithmetic %d\n", fp == fp - 1 );
    249     free( fp - 1 );
    250 
    251     p = foo( bar( baz( malloc(), 0 ), 0 ), 0 );
     247        float * fp = malloc() + 1;
     248        printf( "pointer arithmetic %d\n", fp == fp - 1 );
     249        free( fp - 1 );
     250
     251        p = foo( bar( baz( malloc(), 0 ), 0 ), 0 );
    252252        *p = 0xdeadbeef;
    253253        printf( "CFA deep malloc %#x\n", *p );
    254     free( p );
     254        free( p );
    255255
    256256        stp = malloc();
    257257        printf( "\nSHOULD FAIL\n" );
    258     p = alloc( stp, dim * sizeof(*stp) );
    259     p = memset( stp, 10 );
    260     p = memcpy( &st1, &st );
     258        p = alloc( stp, dim * sizeof(*stp) );
     259        p = memset( stp, 10 );
     260        p = memcpy( &st1, &st );
    261261} // main
    262262
  • src/tests/avltree/avl.h

    raf08051 r28e58fd  
    2121// xxx - unbound type variable problems when trying to use new instead of create
    2222// forall( otype T, ttype Params | { void ?{}(T *, Params); } ) T * new( Params p );
    23 
    24 forall(dtype T | { void ^?{}(T *); })
    25 void delete(T * x);
    2623
    2724// To-do: properly use height or balance factor
     
    5855
    5956forall(otype K | Comparable(K), otype V)
    60 void ?{}(tree(K, V) *t, K key, V value);
     57void ?{}(tree(K, V) &t, K key, V value);
    6158
    6259forall(otype K, otype V)
    63 void ^?{}(tree(K, V) * t);
     60void ^?{}(tree(K, V) & t);
    6461
    6562forall(otype K | Comparable(K), otype V)
  • src/tests/avltree/avl1.c

    raf08051 r28e58fd  
    11#include "avl.h"
    22// #include "cwrap.h"
     3#include <stdlib>
    34
    45forall(otype K | Comparable(K), otype V)
    5 void ?{}(tree(K, V) *t, K key, V value){
    6   (&t->key) { key };
    7   (&t->value) { value };
    8   t->parent = NULL;
    9   t->left = NULL;
    10   t->right = NULL;
    11   t->balance = 0;
     6void ?{}(tree(K, V) &t, K key, V value){
     7  (t.key) { key };
     8  (t.value) { value };
     9  t.parent = NULL;
     10  t.left = NULL;
     11  t.right = NULL;
     12  t.balance = 0;
    1213}
    1314
    1415forall(otype K, otype V)
    15 void ^?{}(tree(K, V) * t){
    16   delete(t->left);
    17   delete(t->right);
    18   ^(&t->key){};
    19   ^(&t->value){};
     16void ^?{}(tree(K, V) & t){
     17  delete(t.left);
     18  delete(t.right);
     19  ^(t.key){};
     20  ^(t.value){};
    2021}
    2122
     
    2425  // infinite loop trying to resolve ... t = malloc();
    2526  tree(K, V) * t = malloc(sizeof(tree(K,V)));
    26   t { key, value };
     27  (*t){ key, value };
    2728  return t;
    2829}
  • src/tests/avltree/avl3.c

    raf08051 r28e58fd  
    11#include "avl.h"
    22#include "avl-private.h"
    3 
    4 // from stdlib
    5 forall(otype T)
    6 void swap(T *, T *);
     3#include <stdlib>
    74
    85// swaps the data within two tree nodes
    96forall(otype K | Comparable(K), otype V)
    107void node_swap(tree(K, V) * t, tree(K, V) * t2){
    11   swap(&t->key, &t2->key);
    12   swap(&t->value, &t2->value);
     8        swap( t->key,  t2->key);
     9        swap( t->value, t2->value);
    1310}
    1411
     
    1613forall(otype K | Comparable(K), otype V)
    1714tree(K, V) * find_successor(tree(K, V) * t){
    18   tree(K, V) * find_successor_helper(tree(K, V) * t){
    19     // go left as deep as possible, return the last node
    20     if (empty(t->left)){
    21       return t;
    22     } else {
    23       return find_successor_helper(t->left);
    24     }
    25   }
    26   return find_successor_helper(t->right);
     15        tree(K, V) * find_successor_helper(tree(K, V) * t){
     16                // go left as deep as possible, return the last node
     17                if (empty(t->left)){
     18                        return t;
     19                } else {
     20                        return find_successor_helper(t->left);
     21                }
     22        }
     23        return find_successor_helper(t->right);
    2724}
    2825
     
    3027forall(otype K | Comparable(K), otype V)
    3128void deleteSingleNode(tree(K, V) * t) {
    32   t->left = NULL;
    33   t->right = NULL;
    34   deleteSingleNode(t);
     29        t->left = NULL;
     30        t->right = NULL;
     31        delete(t);
    3532}
    3633
     
    3835forall(otype K | Comparable(K), otype V)
    3936tree(K, V) * remove_node(tree(K, V) * t){
    40   // is the node a leaf?
    41   if (empty(t->left) && empty(t->right)){
    42     // yes, just delete this node
    43     delete(t);
    44     return NULL;
    45   } else if (empty(t->left)){
    46     // if the left is empty, there is only one child -> move right up
    47     node_swap(t, t->right);
    48     tree(K, V) * tmp = t->right;
     37        // is the node a leaf?
     38        if (empty(t->left) && empty(t->right)){
     39                // yes, just delete this node
     40                delete(t);
     41                return NULL;
     42        } else if (empty(t->left)){
     43                // if the left is empty, there is only one child -> move right up
     44                node_swap(t, t->right);
     45                tree(K, V) * tmp = t->right;
    4946
    50     // relink tree
    51     t->left = tmp->left;
    52     t->right = tmp->right;
     47                // relink tree
     48                t->left = tmp->left;
     49                t->right = tmp->right;
    5350
    54     setParent(t->left, t);
    55     setParent(t->right, t);
    56     deleteSingleNode(tmp);
    57     return t;
    58   } else if (empty(t->right)){
    59     // if the right is empty, there is only one child -> move left up
    60     node_swap(t, t->left);
    61     tree(K, V) * tmp = t->left;
     51                setParent(t->left, t);
     52                setParent(t->right, t);
     53                deleteSingleNode(tmp);
     54                return t;
     55        } else if (empty(t->right)){
     56                // if the right is empty, there is only one child -> move left up
     57                node_swap(t, t->left);
     58                tree(K, V) * tmp = t->left;
    6259
    63     // relink tree
    64     t->left = tmp->left;
    65     t->right = tmp->right;
     60                // relink tree
     61                t->left = tmp->left;
     62                t->right = tmp->right;
    6663
    67     setParent(t->left, t);
    68     setParent(t->right, t);
    69     deleteSingleNode(tmp);
    70     return t;
    71   } else {
    72     // swap with the successor
    73     tree(K, V) * s = find_successor(t);
    74     tree(K, V) * parent = s->parent;
     64                setParent(t->left, t);
     65                setParent(t->right, t);
     66                deleteSingleNode(tmp);
     67                return t;
     68        } else {
     69                // swap with the successor
     70                tree(K, V) * s = find_successor(t);
     71                tree(K, V) * parent = s->parent;
    7572
    76     if (parent->left == s){
    77       parent->left = s->right;
    78     } else {
    79       assert(parent->right == s);
    80       parent->right = s->right;
    81     }
    82     setParent(s->right, parent);
    83     node_swap(t, s);
    84     deleteSingleNode(s);
    85     return t;
    86   }
     73                if (parent->left == s){
     74                        parent->left = s->right;
     75                } else {
     76                        assert(parent->right == s);
     77                        parent->right = s->right;
     78                }
     79                setParent(s->right, parent);
     80                node_swap(t, s);
     81                deleteSingleNode(s);
     82                return t;
     83        }
    8784}
    8885
     
    9087forall(otype K | Comparable(K), otype V)
    9188tree(K, V) * remove_helper(tree(K, V) * t, K key, int * worked){
    92   if (empty(t)){
    93     // did not work because key was not found
    94     // set the status variable and return
    95     *worked = 1;
    96   } else if (t->key == key) {
    97     t = remove_node(t);
    98   } else if (t->key < key){
    99     t->right = remove_helper(t->right, key, worked);
    100   } else {
    101     // t->key > key
    102     t->left = remove_helper(t->left, key, worked);
    103   }
    104   // try to fix after deleting
    105   if (! empty(t)) {
    106     t = tryFix(t);
    107   }
    108   return t;
     89        if (empty(t)){
     90                // did not work because key was not found
     91                // set the status variable and return
     92                *worked = 1;
     93        } else if (t->key == key) {
     94                t = remove_node(t);
     95        } else if (t->key < key){
     96                t->right = remove_helper(t->right, key, worked);
     97        } else {
     98                // t->key > key
     99                t->left = remove_helper(t->left, key, worked);
     100        }
     101        // try to fix after deleting
     102        if (! empty(t)) {
     103                t = tryFix(t);
     104        }
     105        return t;
    109106}
    110107
    111108forall(otype K | Comparable(K), otype V)
    112109int remove(tree(K, V) ** t, K key){
    113   int worked = 0;
    114   tree(K, V) * newTree = remove_helper(*t, key, &worked);
    115   *t = newTree;
    116   return worked;
     110        int worked = 0;
     111        tree(K, V) * newTree = remove_helper(*t, key, &worked);
     112        *t = newTree;
     113        return worked;
    117114}
     115
     116// Local Variables: //
     117// tab-width: 4 //
     118// End: //
  • src/tests/avltree/avl_test.c

    raf08051 r28e58fd  
    11#include "avl.h"
    22#include "avl-private.h"
     3#include <stdlib>
    34
    45extern "C" {
  • src/tests/coroutine.c

    raf08051 r28e58fd  
    1 // 
     1//
    22// Cforall Version 1.0.0 Copyright (C) 2017 University of Waterloo
    33//
    44// The contents of this file are covered under the licence agreement in the
    55// file "LICENCE" distributed with Cforall.
    6 // 
    7 // fibonacci.c -- 
    8 // 
     6//
     7// fibonacci.c --
     8//
    99// Author           : Thierry Delisle
    1010// Created On       : Thu Jun  8 07:29:37 2017
     
    1212// Last Modified On : Thu Jun  8 07:37:12 2017
    1313// Update Count     : 5
    14 // 
     14//
    1515
    1616#include <fstream>
     
    2121};
    2222
    23 void ?{}( Fibonacci * this ) {
    24         this->fn = 0;
     23void ?{}( Fibonacci & this ) {
     24        this.fn = 0;
    2525}
    2626
    27 void main( Fibonacci * this ) {
     27void main( Fibonacci & this ) {
    2828        int fn1, fn2;                                   // retained between resumes
    29         this->fn = 0;                                   // case 0
    30         fn1 = this->fn;
     29        this.fn = 0;                                    // case 0
     30        fn1 = this.fn;
    3131        suspend();                                              // return to last resume
    3232
    33         this->fn = 1;                                   // case 1
     33        this.fn = 1;                                    // case 1
    3434        fn2 = fn1;
    35         fn1 = this->fn;
     35        fn1 = this.fn;
    3636        suspend();                                              // return to last resume
    3737
    3838        for ( ;; ) {                                    // general case
    39                 this->fn = fn1 + fn2;
     39                this.fn = fn1 + fn2;
    4040                fn2 = fn1;
    41                 fn1 = this->fn;
     41                fn1 = this.fn;
    4242                suspend();                                      // return to last resume
    4343        } // for
    4444}
    4545
    46 int next( Fibonacci * this ) {
     46int next( Fibonacci & this ) {
    4747        resume( this );                                 // transfer to last suspend
    48         return this->fn;
     48        return this.fn;
    4949}
    5050
     
    5252        Fibonacci f1, f2;
    5353        for ( int i = 1; i <= 10; i += 1 ) {
    54                 sout | next( &f1 ) | ' ' | next( &f2 ) | endl;
     54                sout | next( f1 ) | ' ' | next( f2 ) | endl;
    5555        } // for
    5656}
  • src/tests/dtor-early-exit.c

    raf08051 r28e58fd  
    2727
    2828// don't want these called
    29 void ?{}(A * a) { assert( false ); }
    30 void ?{}(A * a, const char * name) { a->name = name; sout | "construct " | name | endl; a->x = (int*)malloc(); }
    31 void ?{}(A * a, const char * name, int * ptr) { assert( false ); }
    32 
    33 A ?=?(A * a, A a) {  sout | "assign " | a->name | " " | a.name; return a; }
    34 void ?{}(A * a, A a) { sout | "copy construct " | a.name | endl; a->x = (int*)malloc(); }
    35 void ^?{}(A * a) { sout | "destruct " | a->name | endl; free(a->x); }
     29void ?{}(A & a) { assert( false ); }
     30void ?{}(A & a, const char * name) { a.name = name; sout | "construct " | name | endl; a.x = (int*)malloc(); }
     31void ?{}(A & a, const char * name, int * ptr) { assert( false ); }
     32
     33A ?=?(A & a, A b) {  sout | "assign " | a.name | " " | b.name; return a; }
     34void ?{}(A & a, A b) { sout | "copy construct " | b.name | endl; a.x = (int*)malloc(); }
     35void ^?{}(A & a) { sout | "destruct " | a.name | endl; free(a.x); }
    3636
    3737// test returns
  • src/tests/fstream_test.c

    raf08051 r28e58fd  
    77// fstream_test.c --
    88//
    9 // Author           : Richard C. Bilson
     9// Author           : Peter A. Buhr
    1010// Created On       : Wed May 27 17:56:53 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon May  2 15:25:54 2016
    13 // Update Count     : 61
     12// Last Modified On : Thu Aug 24 11:30:26 2017
     13// Update Count     : 65
    1414//
    1515
     
    1919        int nombre;
    2020        sout | "Entrez un nombre, s'il vous plaît:" | endl;
    21         sin  | &nombre;
    22         sout | "Vous avez entré" | nombre | "stocké à l'adresse" | &nombre | endl;
    23         sout | "nombre" | nombre | "est"
    24                  | (nombre > 0 ? "plus grand que" : nombre == 0 ? "égal à" : "moins de")
    25                  | "zéro" | endl;
     21        sin  | nombre;
     22        sout | "Vous avez entré" | nombre | endl;
     23        sout | "le nombre" | nombre | "est"
     24                 | (nombre > 0 ? "positif" : nombre == 0 ? "zéro" : "négatif") | endl;
    2625
    2726        sout | "Entrez trois nombres, s'il vous plaît: " | endl;
    2827        int i, j, k;
    29         sin  | &i | &j | &k;
     28        sin  | i | j | k;
    3029        sout | "Vous avez entré" | "i:" | "" | i | "j:" | "" | j | "k:" | "" | k | endl;
    3130}
  • src/tests/globals.c

    raf08051 r28e58fd  
    55};
    66
    7 void ?{}( value_t * this ) { this->value = 22; }
     7void ?{}( value_t & this ) { this.value = 22; }
    88
    99//Standard case
     
    1212};
    1313
    14 void ?{}( g_t * this ) { (&this->val){}; }
     14void ?{}( g_t & this ) { (this.val){}; }
    1515
    1616g_t g;
     
    2525//Inline case
    2626struct gi_t;
    27 void ?{}( gi_t * this );
     27void ?{}( gi_t & this );
    2828
    2929struct gi_t {
     
    3131} gi;
    3232
    33 void ?{}( gi_t * this ) { (&this->val){}; }
     33void ?{}( gi_t & this ) { (this.val){}; }
    3434
    3535//Inline autogen case
     
    4343};
    4444
    45 void ?{}( gs_t * this ) { (&this->val){}; }
     45void ?{}( gs_t & this ) { (this.val){}; }
    4646
    4747static gs_t gs;
     
    5656//Static inline case
    5757struct gsi_t;
    58 void ?{}( gsi_t * this );
     58void ?{}( gsi_t & this );
    5959
    6060static struct gsi_t {
     
    6262} gsi;
    6363
    64 void ?{}( gsi_t * this ) { (&this->val){}; }
     64void ?{}( gsi_t & this ) { (this.val){}; }
    6565
    6666//Static inline autogen case
  • src/tests/gmp.c

    raf08051 r28e58fd  
    1010// Created On       : Tue Apr 19 08:55:51 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Jul 13 16:35:01 2017
    13 // Update Count     : 541
     12// Last Modified On : Thu Aug 24 09:33:26 2017
     13// Update Count     : 543
    1414//
    1515
     
    7070        sout | endl;
    7171
     72        sin | x | y | z;
     73        sout | x | y | z | endl;
     74
     75        sout | endl;
     76
    7277        sout | "Fibonacci Numbers" | endl;
    7378        Int fn, fn1, fn2;
  • src/tests/init_once.c

    raf08051 r28e58fd  
    6060        return -1;
    6161}
    62 void ?{}(array * arr) {
    63         memset(arr->elems, 0, sizeof(arr->elems));
    64         arr->length = 0;
     62void ?{}(array & arr) {
     63        memset(arr.elems, 0, sizeof(arr.elems));
     64        arr.length = 0;
    6565}
    6666array constructed;
    6767array destructed;
    6868
    69 void ?{}(init_once * x) {
    70         assert( find( &constructed, x ) == -1 );
    71         remove( &destructed, x );
    72         insert( &constructed, x );
     69void ?{}(init_once & x) {
     70        assert( find( &constructed, &x ) == -1 );
     71        remove( &destructed, &x );
     72        insert( &constructed, &x );
    7373
    74         x->x = malloc(sizeof(int));
     74        x.x = malloc(sizeof(int));
    7575}
    7676
    77 void ?{}(init_once * x, init_once other) {
     77void ?{}(init_once & x, init_once other) {
    7878        x{};  // reuse default ctor
    7979}
    8080
    81 void ^?{}(init_once * x) {
    82         assert( find( &destructed, x ) == -1 );
    83         remove( &constructed, x );
    84         insert( &destructed, x );
     81void ^?{}(init_once & x) {
     82        assert( find( &destructed, &x ) == -1 );
     83        remove( &constructed, &x );
     84        insert( &destructed, &x );
    8585
    86         free(x->x);
     86        free(x.x);
    8787}
    8888//*** end setup
     
    125125                                init_once x;
    126126                                init_once y = x;
    127                                 (&x) {}; // ensure this doesn't execute
     127                                x{}; // ensure this doesn't execute
    128128                                break;
    129129                        }
  • src/tests/io.c

    raf08051 r28e58fd  
    1010// Created On       : Wed Mar  2 16:56:02 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Jul  6 23:26:12 2017
    13 // Update Count     : 78
     12// Last Modified On : Wed Aug 23 21:27:50 2017
     13// Update Count     : 79
    1414//
    1515
     
    8989
    9090        sout | "input bacis types" | endl;
    91         &in | &c                                                                                        // character
    92                 | &si | &usi | &i | &ui | &li | &uli | &lli | &ulli     // integral
    93                 | &f | &d | &ld                                                                 // floating point
    94                 | &fc | &dc | &ldc                                                              // floating-point complex
     91        &in | c                                                                                         // character
     92                | si | usi | i | ui | li | uli | lli | ulli             // integral
     93                | f | d | ld                                                                    // floating point
     94                | fc | dc | ldc                                                                 // floating-point complex
    9595                | cstr( s1 ) | cstr( s2, size );                                // C string, length unchecked and checked
    9696        sout | endl;
  • src/tests/memberCtors.c

    raf08051 r28e58fd  
    33};
    44
    5 void ?{}(WrappedInt * this) {
     5void ?{}(WrappedInt & this) {
    66  printf("constructing int\n");
    7   this->x = 0;
     7  this.x = 0;
    88}
    99
    10 void ?{}(WrappedInt * this, WrappedInt other) {
     10void ?{}(WrappedInt & this, WrappedInt other) {
    1111  printf("copy constructing int: %d\n", other.x);
    12   this->x = other.x;
     12  this.x = other.x;
    1313}
    1414
    15 void ?{}(WrappedInt * this, int x) {
     15void ?{}(WrappedInt & this, int x) {
    1616  printf("constructing int: %d\n", x);
    17   this->x = x;
     17  this.x = x;
    1818}
    1919
    20 void ^?{}(WrappedInt * this) {
    21   printf("destructing int: %d\n", this->x);
     20void ^?{}(WrappedInt & this) {
     21  printf("destructing int: %d\n", this.x);
    2222}
    2323
    24 void ?=?(WrappedInt * this, int x) {
    25   printf("assigning int: %d %d\n", this->x, x);
    26   this->x = x;
     24void ?=?(WrappedInt & this, int x) {
     25  printf("assigning int: %d %d\n", this.x, x);
     26  this.x = x;
    2727}
    2828
     
    3131};
    3232
    33 void ?{}(A * a) {
     33void ?{}(A & a) {
    3434  // currently must define default ctor, since there's no "= default" syntax
    3535}
    3636
    37 void ?{}(A * a, int x) {
     37void ?{}(A & a, int x) {
    3838  printf("begin construct A\n");
    39   printf("construct a->x\n");
    40   (&a->x){ x+999 };
    41   printf("assign a->y\n");
    42   a->y = 0; // not a constructor - default constructor will be inserted
     39  printf("construct a.x\n");
     40  (a.x){ x+999 };
     41  printf("assign a.y\n");
     42  a.y = 0; // not a constructor - default constructor will be inserted
    4343  printf("end construct A\n");
    4444} // z never constructed - will be automatically default constructed
    4545
    46 void ?{}(A * this, A other) {
     46void ?{}(A & this, A other) {
    4747  printf("begin copy construct A\n");
    48   printf("copy construct this->x\n");
    49   (&this->x){ other.x };
    50   printf("assign this->y\n");
    51   this->y = other.y; // not a constructor - copy constructor will be inserted
     48  printf("copy construct this.x\n");
     49  (this.x){ other.x };
     50  printf("assign this.y\n");
     51  this.y = other.y; // not a constructor - copy constructor will be inserted
    5252  printf("end copy construct A\n");
    5353} // z never constructed - will be automatically copy constructed
    5454
    55 A ?=?(A * this, A other) {
     55A ?=?(A & this, A other) {
    5656  printf("begin ?=? A\n");
    57   this->x = other.x;
    58   this->y = other.y;
    59   this->z = other.z;
     57  this.x = other.x;
     58  this.y = other.y;
     59  this.z = other.z;
    6060  printf("end ?=? A\n");
    61   return *this;
     61  return this;
    6262}
    6363
     
    6666};
    6767
    68 void ?{}(B * b) {
     68void ?{}(B & b) {
    6969  printf("begin construct B\n");
    70   printf("assign b->a2\n");
    71   b->a2 = (A) { 2 };
    72   printf("construct b->a1\n");
    73   (&b->a1){ 1 };
     70  printf("assign b.a2\n");
     71  b.a2 = (A) { 2 };
     72  printf("construct b.a1\n");
     73  (b.a1){ 1 };
    7474#ifdef ERR1
    75   (&b->a2){ b->a3 }; // error, b->a2 was used previously but is explicitly constructed
     75  (b.a2){ b.a3 }; // error, b->a2 was used previously but is explicitly constructed
    7676#endif
    7777  printf("end construct B\n");
    7878} // a2, a3 never constructed - will be automatically default constructed
    7979
    80 void ^?{}(B * b) {
    81   b->a2 = (A) { 0 };
    82   ^(&b->a1){};
     80void ^?{}(B & b) {
     81  b.a2 = (A) { 0 };
     82  ^(b.a1){};
    8383} // a2, a3 never destructed - will be automatically destructed
    8484
  • src/tests/monitor.c

    raf08051 r28e58fd  
    88};
    99
    10 void ?{}(global_t * this) {
    11         this->value = 0;
     10void ?{}(global_t & this) {
     11        this.value = 0;
    1212}
    1313
    1414static global_t global;
    1515
    16 void increment3( global_t * mutex this ) {
    17         this->value += 1;
     16void increment3( global_t & mutex this ) {
     17        this.value += 1;
    1818}
    1919
    20 void increment2( global_t * mutex this ) {
     20void increment2( global_t & mutex this ) {
    2121        increment3( this );
    2222}
    2323
    24 void increment( global_t * mutex this ) {
     24void increment( global_t & mutex this ) {
    2525        increment2( this );
    2626}
     
    2828thread MyThread {};
    2929
    30 void main( MyThread* this ) {
     30void main( MyThread & this ) {
    3131        for(int i = 0; i < 1_000_000; i++) {
    32                 increment( &global );
     32                increment( global );
    3333        }
    3434}
  • src/tests/multi-monitor.c

    raf08051 r28e58fd  
    1010static monitor_t m1, m2, m3;
    1111
    12 void increment( monitor_t * mutex p1, monitor_t * mutex p2, int * value ) {
    13         *value += 1;
     12void increment( monitor_t & mutex p1, monitor_t & mutex p2, int & value ) {
     13        value += 1;
    1414}
    1515
    16 struct MyThread {
    17         thread_desc __thrd;
     16thread MyThread {
    1817        int target;
    1918};
    2019
    21 DECL_THREAD(MyThread);
    22 
    23 void ?{}( MyThread * this, int target ) {
    24         this->target = target;
     20void ?{}( MyThread & this, int target ) {
     21        this.target = target;
    2522}
    2623
    27 void ^?{}( MyThread * mutex this ) {}
     24void ^?{}( MyThread & mutex this ) {}
    2825
    29 void main( MyThread* this ) {
     26void main( MyThread & this ) {
    3027        for(int i = 0; i < 1000000; i++) {
    31                 choose(this->target) {
    32                         case 0: increment( &m1, &m2, &global12 );
    33                         case 1: increment( &m2, &m3, &global23 );
    34                         case 2: increment( &m1, &m3, &global13 );
     28                choose(this.target) {
     29                        case 0: increment( m1, m2, global12 );
     30                        case 1: increment( m2, m3, global23 );
     31                        case 2: increment( m1, m3, global13 );
    3532                }
    3633        }
     34}
     35
     36forall(dtype T | sized(T) | { void ^?{}(T & mutex); })
     37void delete_mutex(T * x) {
     38        ^(*x){};
     39        free(x);
    3740}
    3841
     
    4043        processor p;
    4144        {
    42                 scoped(MyThread) * f[6];
     45                MyThread * f[6];
    4346                for(int i = 0; i < 6; i++) {
    44                         f[i] = ((scoped(MyThread) *)malloc()){ i % 3 };
     47                        f[i] = new(i % 3);
    4548                }
    4649
    4750                for(int i = 0; i < 6; i++) {
    48                         delete( f[i] );
     51                        delete_mutex( f[i] );
    4952                }
    5053        }
  • src/tests/multiDimension.c

    raf08051 r28e58fd  
    44};
    55
    6 void ?{}(X * this) {
     6void ?{}(X & this) {
    77  printf("default constructing\n");
    8   (&this->a){ 123 };
    9   this->ptr = malloc(sizeof(int));
     8  (this.a){ 123 };
     9  this.ptr = malloc(sizeof(int));
    1010}
    1111
    12 void ?{}(X * this, X other) {
     12void ?{}(X & this, X other) {
    1313  printf("copy constructing\n");
    14   (&this->a){ other.a };
    15   this->ptr = malloc(sizeof(int));
     14  (this.a){ other.a };
     15  this.ptr = malloc(sizeof(int));
    1616}
    1717
    18 void ?{}(X * this, int a) {
     18void ?{}(X & this, int a) {
    1919  printf("constructing with %d\n", a);
    20   (&this->a){ a };
    21   this->ptr = malloc(sizeof(int));
     20  (this.a){ a };
     21  this.ptr = malloc(sizeof(int));
    2222}
    2323
    24 void ^?{}(X * this) {
     24void ^?{}(X & this) {
    2525  printf("destructing\n");
    26   free(this->ptr);
     26  free(this.ptr);
    2727}
    2828
    29 X ?=?(X * this, X other) {
    30   this->a = other.a;
    31   return *this;
     29X ?=?(X & this, X other) {
     30  this.a = other.a;
     31  return this;
    3232}
    3333
  • src/tests/operators.c

    raf08051 r28e58fd  
    1111}
    1212
    13 int ?=?( int *a, int b ) {
     13int ?=?( int &a, int b ) {
    1414        return 0;
    1515}
  • src/tests/preempt.c

    raf08051 r28e58fd  
    1616};
    1717
    18 void ?{}( worker_t * this, int value ) {
    19         this->value = value;
     18void ?{}( worker_t & this, int value ) {
     19        this.value = value;
    2020}
    2121
    22 void main(worker_t * this) {
     22void main(worker_t & this) {
    2323        while(counter < 1000) {
    24                 if( (counter % 7) == this->value ) {
     24                if( (counter % 7) == this.value ) {
    2525                        int next = __atomic_add_fetch_4(&counter, 1, __ATOMIC_SEQ_CST);
    2626                        if( (next % 100) == 0 ) printf("%d\n", next);
  • src/tests/rational.c

    raf08051 r28e58fd  
    1 // 
     1//
    22// Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo
    33//
    44// The contents of this file are covered under the licence agreement in the
    55// file "LICENCE" distributed with Cforall.
    6 // 
     6//
    77// rational.c -- test rational number package
    8 // 
     8//
    99// Author           : Peter A. Buhr
    1010// Created On       : Mon Mar 28 08:43:12 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed May 17 15:46:35 2017
    13 // Update Count     : 65
    14 // 
     12// Last Modified On : Wed Aug 23 21:40:11 2017
     13// Update Count     : 66
     14//
    1515
    1616#include <rational>
     
    2020
    2121// UNNECESSARY, FIX ME
    22 void ?{}( int * this ) { *this = 0; }
    23 void ?{}( int * this, zero_t ) { *this = 0; }
    24 void ?{}( int * this, one_t ) { *this = 1; }
     22void ?{}( int & this ) { this = 0; }
     23void ?{}( int & this, zero_t ) { this = 0; }
     24void ?{}( int & this, one_t ) { this = 1; }
    2525double convert( int i ) { return (double)i; }
    2626int convert( double d ) { return (int)d; }
     
    9292        sout | x | endl;
    9393
    94         sin | &a | &b;
     94        sin | a | b;
    9595        sout | a | b | endl;
    9696} // main
  • src/tests/sched-int-barge.c

    raf08051 r28e58fd  
    2828};
    2929
    30 void ?{} ( global_data_t * this ) {
    31         this->done = false;
    32         this->counter = 0;
    33         this->state = BARGE;
     30void ?{} ( global_data_t & this ) {
     31        this.done = false;
     32        this.counter = 0;
     33        this.state = BARGE;
    3434
    35         this->do_signal = 6;
    36         this->do_wait1  = 1;
    37         this->do_wait2  = 3;
     35        this.do_signal = 6;
     36        this.do_wait1  = 1;
     37        this.do_wait2  = 3;
    3838}
    3939
    40 void ^?{} ( global_data_t * this ) {}
     40void ^?{} ( global_data_t & this ) {}
    4141
    4242global_t globalA;
     
    4848thread Threads {};
    4949
    50 bool logicC( global_t * mutex a, global_t * mutex b, global_data_t * mutex c ) {
    51         c->counter++;
     50bool logicC( global_t & mutex a, global_t & mutex b, global_data_t & mutex c ) {
     51        c.counter++;
    5252
    53         if( (c->counter % 1000) == 0 ) sout | c->counter | endl;
     53        if( (c.counter % 1000) == 0 ) sout | c.counter | endl;
    5454
    55         int action = c->counter % 10;
     55        int action = c.counter % 10;
    5656
    5757        if( action == 0 ) {
    58                 c->do_signal = max( ((unsigned)rand48()) % 10, 1);
    59                 c->do_wait1 = ((unsigned)rand48()) % (c->do_signal);
    60                 c->do_wait2 = ((unsigned)rand48()) % (c->do_signal);
     58                c.do_signal = max( ((unsigned)rand48()) % 10, 1);
     59                c.do_wait1 = ((unsigned)rand48()) % (c.do_signal);
     60                c.do_wait2 = ((unsigned)rand48()) % (c.do_signal);
    6161
    62                 if(c->do_wait1 == c->do_wait2) sout | "Same" | endl;
     62                if(c.do_wait1 == c.do_wait2) sout | "Same" | endl;
    6363        }
    6464
    65         if( action == c->do_wait1 || action == c->do_wait2 ) {
    66                 c->state = WAIT;
     65        if( action == c.do_wait1 || action == c.do_wait2 ) {
     66                c.state = WAIT;
    6767                wait( &cond );
    6868
    69                 if(c->state != SIGNAL) {
    70                         sout | "ERROR Barging detected" | c->counter | endl;
     69                if(c.state != SIGNAL) {
     70                        sout | "ERROR Barging detected" | c.counter | endl;
    7171                        abort();
    7272                }
    7373        }
    74         else if( action == c->do_signal ) {
    75                 c->state = SIGNAL;
     74        else if( action == c.do_signal ) {
     75                c.state = SIGNAL;
    7676
    7777                signal( &cond );
     
    7979        }
    8080        else {
    81                 c->state = BARGE;
     81                c.state = BARGE;
    8282        }
    8383
    84         if( c->counter >= N ) c->done = true;
    85         return !c->done;
     84        if( c.counter >= N ) c.done = true;
     85        return !c.done;
    8686}
    8787
    88 bool logicB( global_t * mutex a, global_t * mutex b ) {
    89         return logicC(a, b, &globalC);
     88bool logicB( global_t & mutex a, global_t & mutex b ) {
     89        return logicC(a, b, globalC);
    9090}
    9191
    92 bool logicA( global_t * mutex a ) {
    93         return logicB(a, &globalB);
     92bool logicA( global_t & mutex a ) {
     93        return logicB(a, globalB);
    9494}
    9595
    96 void main( Threads* this ) {
    97         while( logicA(&globalA) ) { yield(); };
     96void main( Threads & this ) {
     97        while( logicA(globalA) ) { yield(); };
    9898}
    9999
     
    101101
    102102int main(int argc, char* argv[]) {
    103         rand48seed(0);
    104         processor p;
    105         {
    106                 Threads t[17];
    107                 the_threads = (thread_desc*)t;
    108         }
     103        rand48seed(0);
     104        processor p;
     105        {
     106                Threads t[17];
     107                the_threads = (thread_desc*)t;
     108        }
    109109}
  • src/tests/sched-int-block.c

    raf08051 r28e58fd  
    2424};
    2525
    26 void ?{} ( global_data_t * this ) {
    27         this->last_thread = NULL;
    28         this->last_signaller = NULL;
     26void ?{} ( global_data_t & this ) {
     27        this.last_thread = NULL;
     28        this.last_signaller = NULL;
    2929}
    3030
    31 void ^?{} ( global_data_t * this ) {}
     31void ^?{} ( global_data_t & this ) {}
    3232
    3333global_data_t globalA, globalB;
     
    3838
    3939//------------------------------------------------------------------------------
    40 void wait_op( global_data_t * mutex a, global_data_t * mutex b, unsigned i ) {
     40void wait_op( global_data_t & mutex a, global_data_t & mutex b, unsigned i ) {
    4141        wait( &cond, (uintptr_t)this_thread );
    4242
    4343        yield( ((unsigned)rand48()) % 10 );
    4444
    45         if(a->last_thread != a->last_signaller || b->last_thread != b->last_signaller ) {
    46                 sout | "ERROR Barging detected, expected" | a->last_signaller | b->last_signaller | "got" | a->last_thread | b->last_thread | endl;
     45        if(a.last_thread != a.last_signaller || b.last_thread != b.last_signaller ) {
     46                sout | "ERROR Barging detected, expected" | a.last_signaller | b.last_signaller | "got" | a.last_thread | b.last_thread | endl;
    4747                abort();
    4848        }
    4949
    50         a->last_thread = b->last_thread = this_thread;
     50        a.last_thread = b.last_thread = this_thread;
    5151
    5252        yield( ((unsigned)rand48()) % 10 );
     
    5454
    5555thread Waiter {};
    56 void main( Waiter* this ) {
     56void main( Waiter & this ) {
    5757        for( int i = 0; i < N; i++ ) {
    58                 wait_op( &globalA, &globalB, i );
     58                wait_op( globalA, globalB, i );
    5959        }
    6060}
    6161
    6262//------------------------------------------------------------------------------
    63 void signal_op( global_data_t * mutex a, global_data_t * mutex b ) {
     63void signal_op( global_data_t & mutex a, global_data_t & mutex b ) {
    6464        yield( ((unsigned)rand48()) % 10 );
    6565
    66         a->last_thread = b->last_thread = a->last_signaller = b->last_signaller = this_thread;
     66        [a.last_thread, b.last_thread, a.last_signaller, b.last_signaller] = this_thread;
    6767
    6868        if( !is_empty( &cond ) ) {
     
    7777                yield( ((unsigned)rand48()) % 10 );
    7878
    79                 if(a->last_thread != next || b->last_thread != next) {
    80                         sout | "ERROR Barging detected, expected" | next | "got" | a->last_thread | b->last_thread | endl;
     79                if(a.last_thread != next || b.last_thread != next) {
     80                        sout | "ERROR Barging detected, expected" | next | "got" | a.last_thread | b.last_thread | endl;
    8181                        abort();
    8282                }
     
    8686
    8787thread Signaller {};
    88 void main( Signaller* this ) {
     88void main( Signaller & this ) {
    8989        while( !done ) {
    90                 signal_op( &globalA, &globalB );
     90                signal_op( globalA, globalB );
    9191        }
    9292}
    9393
    9494//------------------------------------------------------------------------------
    95 void barge_op( global_data_t * mutex a ) {
    96         a->last_thread = this_thread;
     95void barge_op( global_data_t & mutex a ) {
     96        a.last_thread = this_thread;
    9797}
    9898
    9999thread Barger {};
    100 void main( Barger* this ) {
     100void main( Barger & this ) {
    101101        for( unsigned i = 0; !done; i++ ) {
    102102                //Choose some monitor to barge into with some irregular pattern
    103103                bool choose_a = (i % 13) > (i % 17);
    104                 barge_op( choose_a ? &globalA : &globalB );
     104                if ( choose_a ) barge_op( globalA );
     105                else barge_op( globalB );
    105106        }
    106107}
  • src/tests/sched-int-disjoint.c

    raf08051 r28e58fd  
    2020
    2121monitor global_data_t;
    22 void ?{}( global_data_t * this );
    23 void ^?{} ( global_data_t * this );
     22void ?{}( global_data_t & this );
     23void ^?{} ( global_data_t & this );
    2424
    2525monitor global_data_t {
     
    3232volatile bool all_done;
    3333
    34 void ?{}( global_data_t * this ) {
    35         this->counter == 0;
    36         this->state = BARGE;
     34void ?{}( global_data_t & this ) {
     35        this.counter == 0;
     36        this.state = BARGE;
    3737}
    3838
    39 void ^?{} ( global_data_t * this ) {}
     39void ^?{} ( global_data_t & this ) {}
    4040
    4141//------------------------------------------------------------------------------
    4242// Barging logic
    43 void barge( global_data_t * mutex d ) {
    44         d->state = BARGE;
     43void barge( global_data_t & mutex d ) {
     44        d.state = BARGE;
    4545}
    4646
    4747thread Barger {};
    4848
    49 void main( Barger * this ) {
     49void main( Barger & this ) {
    5050        while( !all_done ) {
    51                 barge( &data );
     51                barge( data );
    5252                yield();
    5353        }
     
    5656//------------------------------------------------------------------------------
    5757// Waiting logic
    58 bool wait( global_t * mutex m, global_data_t * mutex d ) {
     58bool wait( global_t & mutex m, global_data_t & mutex d ) {
    5959        wait( &cond );
    60         if( d->state != SIGNAL ) {
     60        if( d.state != SIGNAL ) {
    6161                sout | "ERROR barging!" | endl;
    6262        }
    6363
    64         d->counter++;
     64        d.counter++;
    6565
    66         if( (d->counter % 1000) == 0 ) sout | d->counter | endl;
     66        if( (d.counter % 1000) == 0 ) sout | d.counter | endl;
    6767
    68         return d->counter < N;
     68        return d.counter < N;
    6969}
    7070
    7171thread Waiter {};
    7272
    73 void main( Waiter * this ) {
    74         while( wait( &mut, &data ) ) { yield(); }
     73void main( Waiter & this ) {
     74        while( wait( mut, data ) ) { yield(); }
    7575}
    7676
     
    7878//------------------------------------------------------------------------------
    7979// Signalling logic
    80 void signal( condition * cond, global_t * mutex a, global_data_t * mutex b ) {
    81         b->state = SIGNAL;
     80void signal( condition * cond, global_t & mutex a, global_data_t & mutex b ) {
     81        b.state = SIGNAL;
    8282        signal( cond );
    8383}
    8484
    85 void logic( global_t * mutex a ) {
    86         signal( &cond, a, &data );
     85void logic( global_t & mutex a ) {
     86        signal( &cond, a, data );
    8787
    8888        yield( (unsigned)rand48() % 10 );
     
    9797thread Signaller {};
    9898
    99 void main( Signaller * this ) {
     99void main( Signaller & this ) {
    100100        while( !all_done ) {
    101                 logic( &mut );
     101                logic( mut );
    102102                yield();
    103103        }
  • src/tests/sched-int-wait.c

    raf08051 r28e58fd  
    3333//----------------------------------------------------------------------------------------------------
    3434// Tools
    35 void signal( condition * cond, global_t * mutex a, global_t * mutex b ) {
     35void signal( condition * cond, global_t & mutex a, global_t & mutex b ) {
    3636        signal( cond );
    3737}
    3838
    39 void signal( condition * cond, global_t * mutex a, global_t * mutex b, global_t * mutex c ) {
     39void signal( condition * cond, global_t & mutex a, global_t & mutex b, global_t & mutex c ) {
    4040        signal( cond );
    4141}
    4242
    43 void wait( condition * cond, global_t * mutex a, global_t * mutex b ) {
     43void wait( condition * cond, global_t & mutex a, global_t & mutex b ) {
    4444        wait( cond );
    4545}
    4646
    47 void wait( condition * cond, global_t * mutex a, global_t * mutex b, global_t * mutex c ) {
     47void wait( condition * cond, global_t & mutex a, global_t & mutex b, global_t & mutex c ) {
    4848        wait( cond );
    4949}
     
    5151//----------------------------------------------------------------------------------------------------
    5252// Signaler
    53 void main( Signaler* this ) {
     53void main( Signaler & this ) {
    5454
    5555        while( waiter_left != 0 ) {
     
    5757                switch( action ) {
    5858                        case 0:
    59                                 signal( &condABC, &globalA, &globalB, &globalC );
     59                                signal( &condABC, globalA, globalB, globalC );
    6060                                break;
    6161                        case 1:
    62                                 signal( &condAB , &globalA, &globalB );
     62                                signal( &condAB , globalA, globalB );
    6363                                break;
    6464                        case 2:
    65                                 signal( &condBC , &globalB, &globalC );
     65                                signal( &condBC , globalB, globalC );
    6666                                break;
    6767                        case 3:
    68                                 signal( &condAC , &globalA, &globalC );
     68                                signal( &condAC , globalA, globalC );
    6969                                break;
    7070                        default:
     
    7878//----------------------------------------------------------------------------------------------------
    7979// Waiter ABC
    80 void main( WaiterABC* this ) {
     80void main( WaiterABC & this ) {
    8181        for( int i = 0; i < N; i++ ) {
    82                 wait( &condABC, &globalA, &globalB, &globalC );
     82                wait( &condABC, globalA, globalB, globalC );
    8383        }
    8484
     
    8888//----------------------------------------------------------------------------------------------------
    8989// Waiter AB
    90 void main( WaiterAB* this ) {
     90void main( WaiterAB & this ) {
    9191        for( int i = 0; i < N; i++ ) {
    92                 wait( &condAB , &globalA, &globalB );
     92                wait( &condAB , globalA, globalB );
    9393        }
    9494
     
    9898//----------------------------------------------------------------------------------------------------
    9999// Waiter AC
    100 void main( WaiterAC* this ) {
     100void main( WaiterAC & this ) {
    101101        for( int i = 0; i < N; i++ ) {
    102                 wait( &condAC , &globalA, &globalC );
     102                wait( &condAC , globalA, globalC );
    103103        }
    104104
     
    108108//----------------------------------------------------------------------------------------------------
    109109// Waiter BC
    110 void main( WaiterBC* this ) {
     110void main( WaiterBC & this ) {
    111111        for( int i = 0; i < N; i++ ) {
    112                 wait( &condBC , &globalB, &globalC );
     112                wait( &condBC , globalB, globalC );
    113113        }
    114114
  • src/tests/swap.c

    raf08051 r28e58fd  
    77// swap.c --
    88//
    9 // Author           : Richard C. Bilson
     9// Author           : Peter A. Buhr
    1010// Created On       : Wed May 27 17:56:53 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Apr 21 08:10:41 2016
    13 // Update Count     : 69
     12// Last Modified On : Wed Aug 23 20:34:45 2017
     13// Update Count     : 70
    1414//
    1515
     
    2020        char c1 = 'a', c2 = 'b';
    2121        sout | "char\t\t\t" | c1 | ' ' | c2 | "\t\t\tswap ";
    22         swap( &c1, &c2 );
     22        swap( c1, c2 );
    2323        sout | '\t' | c1 | ' ' | c2 | endl;
    2424
    2525        signed int i1 = -1, i2 = -2;
    2626        sout | "signed int\t\t" | i1 | i2 | "\t\t\tswap ";
    27         swap( &i1, &i2 );
     27        swap( i1, i2 );
    2828        sout | '\t' | i1 | i2 | endl;
    2929
    3030        unsigned int ui1 = 1, ui2 = 2;
    3131        sout | "unsigned int\t\t" | ui1 | ui2 | "\t\t\tswap ";
    32         swap( &ui1, &ui2 );
     32        swap( ui1, ui2 );
    3333        sout | '\t' | ui1 | ui2 | endl;
    3434
    3535        signed long int li1 = -1, li2 = -2;
    3636        sout | "signed long int\t\t" | li1 | li2 | "\t\t\tswap ";
    37         swap( &li1, &li2 );
     37        swap( li1, li2 );
    3838        sout | '\t' | li1 | li2 | endl;
    3939
    4040        unsigned long int uli1 = 1, uli2 = 2;
    4141        sout | "unsigned long int\t" | uli1 | uli2 | "\t\t\tswap ";
    42         swap( &uli1, &uli2 );
     42        swap( uli1, uli2 );
    4343        sout | '\t' | uli1 | uli2 | endl;
    4444
    4545        signed long long int lli1 = -1, lli2 = -2;
    4646        sout | "signed long long int\t" | lli1 | lli2 | "\t\t\tswap ";
    47         swap( &lli1, &lli2 );
     47        swap( lli1, lli2 );
    4848        sout | '\t' | lli1 | lli2 | endl;
    4949
    5050        unsigned long long int ulli1 = 1, ulli2 = 2;
    5151        sout | "unsigned long long int\t" | ulli1 | ulli2 | "\t\t\tswap ";
    52         swap( &ulli1, &ulli2 );
     52        swap( ulli1, ulli2 );
    5353        sout | '\t' | ulli1 | ulli2 | endl;
    5454
    5555        float f1 = 1.5, f2 = 2.5;
    5656        sout | "float\t\t\t" | f1 | f2 | "\t\t\tswap ";
    57         swap( &f1, &f2 );
     57        swap( f1, f2 );
    5858        sout | '\t' | f1 | f2 | endl;
    5959
    6060        double d1 = 1.5, d2 = 2.5;
    6161        sout | "double\t\t\t" | d1 | d2 | "\t\t\tswap ";
    62         swap( &d1, &d2 );
     62        swap( d1, d2 );
    6363        sout | '\t' | d1 | d2 | endl;
    6464
    6565        long double ld1 = 1.5, ld2 = 2.5;
    6666        sout | "long double\t\t" | ld1 | ld2 | "\t\t\tswap ";
    67         swap( &ld1, &ld2 );
     67        swap( ld1, ld2 );
    6868        sout | '\t' | ld1 | ld2 | endl;
    6969
    7070        float _Complex fc1 = 1.5f+1.5if, fc2 = 2.5f+2.5if;
    7171        sout | "float _Complex\t\t" | fc1 | fc2 | "\tswap ";
    72         swap( &fc1, &fc2 );
     72        swap( fc1, fc2 );
    7373        sout | '\t' | fc1 | fc2 | endl;
    7474
    7575        double _Complex dc1 = 1.5d+1.5id, dc2 = 2.5d+2.5id;
    7676        sout | "double _Complex\t\t" | dc1 | dc2 | "\tswap ";
    77         swap( &dc1, &dc2 );
     77        swap( dc1, dc2 );
    7878        sout | '\t' | dc1 | dc2 | endl;
    7979
    8080        long double _Complex ldc1 = 1.5d+1.5il, ldc2 = 2.5d+2.5il;
    8181        sout | "long double _Complex\t" | ldc1 | ldc2 | "\tswap ";
    82         swap( &ldc1, &ldc2 );
     82        swap( ldc1, ldc2 );
    8383        sout | '\t' | ldc1 | ldc2 | endl;
    8484
     
    8686        ofstream * ?|?( ofstream * os, S s ) { return os | s.i | s.j; }
    8787        sout | "struct S\t\t" | s1 | "," | s2 | "\t\tswap ";
    88         swap( &s1, &s2 );
     88        swap( s1, s2 );
    8989        sout | '\t' | s1 | "," | s2 | endl;
    9090} // main
  • src/tests/test.py

    raf08051 r28e58fd  
    3131# parses the Makefile to find the machine type (32-bit / 64-bit)
    3232def getMachineType():
    33         sh('echo "void ?{}(int*a,int b){}int main(){return 0;}" > .dummy.c')
     33        sh('echo "void ?{}(int&a,int b){}int main(){return 0;}" > .dummy.c')
    3434        ret, out = sh("make .dummy -s", print2stdout=True)
    3535
     
    174174        if make_ret == 0 :
    175175                # fetch optional input
    176                 stdinput = "< .in/%s.txt" % test.name if isfile(".in/%s.txt" % test.path) else ""
     176                stdinput = "< .in/%s.txt" % test.name if isfile(".in/%s.txt" % test.name) else ""
    177177
    178178                if fileIsExecutable(test.name) :
  • src/tests/thread.c

    raf08051 r28e58fd  
    77thread Second { semaphore* lock; };
    88
    9 void ?{}( First * this, semaphore* lock ) { this->lock = lock; }
    10 void ?{}( Second * this, semaphore* lock ) { this->lock = lock; }
     9void ?{}( First & this, semaphore & lock ) { this.lock = &lock; }
     10void ?{}( Second & this, semaphore & lock ) { this.lock = &lock; }
    1111
    12 void main(First* this) {
     12void main(First& this) {
    1313        for(int i = 0; i < 10; i++) {
    1414                sout | "First : Suspend No." | i + 1 | endl;
    1515                yield();
    1616        }
    17         V(this->lock);
     17        V(this.lock);
    1818}
    1919
    20 void main(Second* this) {
    21         P(this->lock);
     20void main(Second& this) {
     21        P(this.lock);
    2222        for(int i = 0; i < 10; i++) {
    2323                sout | "Second : Suspend No." | i + 1 | endl;
     
    3333                processor p;
    3434                {
    35                         First  f = { &lock };
    36                         Second s = { &lock };
     35                        First  f = { lock };
     36                        Second s = { lock };
    3737                }
    3838        }
  • src/tests/tupleAssign.c

    raf08051 r28e58fd  
    4848                        int z;
    4949                } x;
    50                 X ?=?(X * x, double d) {}
     50                X ?=?(X & x, double d) {}
    5151                [int, double, int] t;
    5252
  • src/tests/tupleMember.c

    raf08051 r28e58fd  
    3434} v;
    3535
    36 lvalue V h() {
     36V & h() {
    3737        static V local = { 111, { 222, 333 }, 444.5 };
    3838        return local;
  • src/tests/tupleVariadic.c

    raf08051 r28e58fd  
    2929}
    3030
    31 forall( dtype T, ttype Params | sized(T) | { void ?{}(T *, Params); } )
     31forall( dtype T, ttype Params | sized(T) | { void ?{}(T &, Params); } )
    3232T * new(Params p);
    3333
     
    3838
    3939// xxx - eventually this will be collapsed...x
    40 void ?{}(array * a) {
    41         a->size = 0;
    42         a->data = 0;
     40void ?{}(array & a) {
     41        a.size = 0;
     42        a.data = 0;
    4343        printf("called ?{} with no a\n");
    4444}
    4545
    46 void ?{}(array * a, int a0) {
    47         a->size = 1;
    48         a->data = (int*)malloc(sizeof(int)*a->size);
    49         a->data[0] = a0;
     46void ?{}(array & a, int a0) {
     47        a.size = 1;
     48        a.data = (int*)malloc(sizeof(int)*a.size);
     49        a.data[0] = a0;
    5050        printf("called ?{} with a: %d\n", a0);
    5151}
    5252
    53 void ?{}(array * a, int a0, int a1) {
    54         a->size = 2;
    55         a->data = (int*)malloc(sizeof(int)*a->size);
    56         a->data[0] = a0;
    57         a->data[1] = a1;
     53void ?{}(array & a, int a0, int a1) {
     54        a.size = 2;
     55        a.data = (int*)malloc(sizeof(int)*a.size);
     56        a.data[0] = a0;
     57        a.data[1] = a1;
    5858        printf("called ?{} with a: %d %d\n", a0, a1);
    5959}
    6060
    61 void ?{}(array * a, int a0, int a1, int a2) {
    62         a->size = 3;
    63         a->data = (int*)malloc(sizeof(int)*a->size);
    64         a->data[0] = a0;
    65         a->data[1] = a1;
    66         a->data[2] = a2;
     61void ?{}(array & a, int a0, int a1, int a2) {
     62        a.size = 3;
     63        a.data = (int*)malloc(sizeof(int)*a.size);
     64        a.data[0] = a0;
     65        a.data[1] = a1;
     66        a.data[2] = a2;
    6767        printf("called ?{} with a: %d %d %d\n", a0, a1, a2);
    6868}
    6969
    7070// test use of a tuple argument
    71 [void] ?{}(array * a, [int, int, int, int] args) {
     71[void] ?{}(array & a, [int, int, int, int] args) {
    7272        int a0, a1, a2, a3;
    7373        [a0, a1, a2, a3] = args;
    74         a->size = 4;
    75         a->data = malloc(sizeof(int)*a->size);
    76         a->data[0] = a0;
    77         a->data[1] = a1;
    78         a->data[2] = a2;
    79         a->data[3] = a3;
     74        a.size = 4;
     75        a.data = malloc(sizeof(int)*a.size);
     76        a.data[0] = a0;
     77        a.data[1] = a1;
     78        a.data[2] = a2;
     79        a.data[3] = a3;
    8080        printf("called ?{} with a: %d %d %d %d\n", a0, a1, a2, a3);
    8181}
  • src/tests/vector/array.h

    raf08051 r28e58fd  
    2121// element has index 0.
    2222trait array( otype array_type, otype elt_type ) {
    23         lvalue elt_type ?[?]( array_type, int );
     23        elt_type & ?[?]( array_type, int );
    2424};
    2525
  • src/tests/vector/vector_int.c

    raf08051 r28e58fd  
    2020#define DEFAULT_CAPACITY 20
    2121
    22 void ?{}( vector_int * vec ) {
     22void ?{}( vector_int & vec ) {
    2323        vec { DEFAULT_CAPACITY };
    2424}
    2525
    26 void ?{}( vector_int * vec, int reserve ) {
    27         vec->last = -1;
    28         vec->capacity = reserve;
    29         vec->data = malloc( sizeof( int ) * reserve );
     26void ?{}( vector_int & vec, int reserve ) {
     27        vec.last = -1;
     28        vec.capacity = reserve;
     29        vec.data = malloc( sizeof( int ) * reserve );
    3030}
    3131
    32 void ?{}( vector_int * vec, vector_int other ) {
    33         vec->last = other.last;
    34         vec->capacity = other.capacity;
    35         vec->data = malloc( sizeof( int ) * other.capacity );
    36         for (int i = 0; i < vec->last; i++) {
    37                 vec->data[i] = other.data[i];
     32void ?{}( vector_int & vec, vector_int other ) {
     33        vec.last = other.last;
     34        vec.capacity = other.capacity;
     35        vec.data = malloc( sizeof( int ) * other.capacity );
     36        for (int i = 0; i < vec.last; i++) {
     37                vec.data[i] = other.data[i];
    3838        }
    3939}
    4040
    41 void ^?{}( vector_int * vec ) {
    42         free( vec->data );
     41void ^?{}( vector_int & vec ) {
     42        free( vec.data );
    4343}
    4444
     
    6161// implement bounded_array
    6262
    63 lvalue int ?[?]( vector_int * vec, int index ) {
     63int & ?[?]( vector_int * vec, int index ) {
    6464        return vec->data[ index ];
    6565}
  • src/tests/vector/vector_int.h

    raf08051 r28e58fd  
    2424} vector_int;
    2525
    26 void ?{}( vector_int * );                                                               // allocate vector with default capacity
    27 void ?{}( vector_int *, int reserve );                                  // allocate vector with specified capacity
    28 void ?{}( vector_int * vec, vector_int other );                 // copy constructor
    29 void ^?{}( vector_int * );                                                              // deallocate vector's storage
     26void ?{}( vector_int & );                                                               // allocate vector with default capacity
     27void ?{}( vector_int &, int reserve );                                  // allocate vector with specified capacity
     28void ?{}( vector_int & vec, vector_int other );     // copy constructor
     29void ^?{}( vector_int & );                // deallocate vector's storage
    3030
    3131void reserve( vector_int *vec, int reserve );                   // reserve more capacity
     
    3434// implement bounded_array
    3535
    36 lvalue int ?[?]( vector_int * vec, int index );                 // access to arbitrary element (does not resize)
    37 int last( vector_int * vec );                                                   // return last element
     36int & ?[?]( vector_int * vec, int index );                              // access to arbitrary element (does not resize)
     37int last( vector_int * vec );             // return last element
    3838
    3939// Local Variables: //
  • src/tests/vector/vector_test.c

    raf08051 r28e58fd  
    99// Author           : Richard C. Bilson
    1010// Created On       : Wed May 27 17:56:53 2015
    11 // Last Modified By : Rob Schluntz
    12 // Last Modified On : Wed Apr 27 17:31:27 2016
    13 // Update Count     : 18
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Thu Aug 24 08:15:38 2017
     13// Update Count     : 19
    1414//
    1515
     
    2727        sout | "enter N elements and C-d on a separate line:" | endl;
    2828        for ( ;; ) {
    29                 sin | &num;
     29                sin | num;
    3030          if ( fail( sin ) || eof( sin ) ) break;
    3131                append( &vec, num );
Note: See TracChangeset for help on using the changeset viewer.