Changes in / [b10c621c:ca278c1]
- Location:
- src
- Files:
-
- 5 added
- 5 deleted
- 28 edited
-
CodeGen/FixNames.cc (modified) (1 diff)
-
Concurrency/Waitfor.cc (modified) (8 diffs)
-
InitTweak/FixInit.cc (modified) (6 diffs)
-
MakeLibCfa.cc (modified) (3 diffs)
-
ResolvExpr/AlternativeFinder.cc (modified) (1 diff)
-
ResolvExpr/Resolver.cc (modified) (18 diffs)
-
ResolvExpr/Resolver.h (modified) (1 diff)
-
SymTab/Validate.cc (modified) (1 diff)
-
libcfa/Makefile.am (modified) (1 diff)
-
libcfa/Makefile.in (modified) (1 diff)
-
libcfa/iostream (modified) (2 diffs)
-
libcfa/iostream.c (modified) (3 diffs)
-
tests/.expect/32/KRfunctions.txt (modified) (2 diffs)
-
tests/.expect/32/attributes.txt (modified) (6 diffs)
-
tests/.expect/32/declarationSpecifier.txt (modified) (26 diffs)
-
tests/.expect/32/extension.txt (modified) (2 diffs)
-
tests/.expect/32/gccExtensions.txt (modified) (6 diffs)
-
tests/.expect/32/literals.txt (modified) (6 diffs)
-
tests/.expect/64/KRfunctions.txt (modified) (2 diffs)
-
tests/.expect/64/attributes.txt (modified) (6 diffs)
-
tests/.expect/64/declarationSpecifier.txt (modified) (26 diffs)
-
tests/.expect/64/extension.txt (modified) (2 diffs)
-
tests/.expect/64/gccExtensions.txt (modified) (6 diffs)
-
tests/.expect/64/literals.txt (modified) (6 diffs)
-
tests/.expect/boundedBuffer.txt (added)
-
tests/.expect/concurrent/boundedBuffer.txt (deleted)
-
tests/.expect/concurrent/fmtLines.txt (deleted)
-
tests/.expect/concurrent/matrixSum.txt (deleted)
-
tests/.expect/concurrent/pingpong.txt (deleted)
-
tests/.expect/concurrent/prodcons.txt (deleted)
-
tests/.expect/fmtLines.txt (added)
-
tests/.expect/matrixSum.txt (added)
-
tests/.expect/pingpong.txt (added)
-
tests/.expect/prodcons.txt (added)
-
tests/.expect/references.txt (modified) (1 diff)
-
tests/Makefile.am (modified) (2 diffs)
-
tests/Makefile.in (modified) (1 diff)
-
tests/references.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/CodeGen/FixNames.cc
rb10c621c rca278c1 66 66 ); 67 67 68 main _type->get_parameters().push_back(68 mainDecl->get_functionType()->get_parameters().push_back( 69 69 new ObjectDecl( "", Type::StorageClasses(), LinkageSpec::Cforall, 0, new BasicType( Type::Qualifiers(), BasicType::SignedInt ), nullptr ) 70 70 ); 71 71 72 main _type->get_parameters().push_back(72 mainDecl->get_functionType()->get_parameters().push_back( 73 73 new ObjectDecl( "", Type::StorageClasses(), LinkageSpec::Cforall, 0, 74 74 new PointerType( Type::Qualifiers(), new PointerType( Type::Qualifiers(), new BasicType( Type::Qualifiers(), BasicType::Char ) ) ), -
src/Concurrency/Waitfor.cc
rb10c621c rca278c1 190 190 191 191 Statement * makeAccStatement( DeclarationWithType * object, unsigned long index, const std::string & member, Expression * value, const SymTab::Indexer & indexer ) { 192 Expression * expr =makeOpAssign(192 std::unique_ptr< Expression > expr( makeOpAssign( 193 193 makeOpMember( 194 194 makeOpIndex( … … 199 199 ), 200 200 value 201 ); 202 203 ResolvExpr::findVoidExpression( expr, indexer ); 204 205 return new ExprStmt( noLabels, expr ); 201 ) ); 202 203 return new ExprStmt( noLabels, ResolvExpr::findVoidExpression( expr.get(), indexer ) ); 206 204 } 207 205 … … 315 313 stmt->push_back( new DeclStmt( noLabels, acceptables) ); 316 314 317 Expression* set = new UntypedExpr(315 UntypedExpr * set = new UntypedExpr( 318 316 new NameExpr( "__builtin_memset" ), 319 317 { … … 324 322 ); 325 323 326 ResolvExpr::findVoidExpression( set, indexer ); 327 328 stmt->push_back( new ExprStmt( noLabels, set ) ); 324 Expression * resolved_set = ResolvExpr::findVoidExpression( set, indexer ); 325 delete set; 326 327 stmt->push_back( new ExprStmt( noLabels, resolved_set ) ); 329 328 330 329 return acceptables; … … 347 346 348 347 Statement * GenerateWaitForPass::makeSetter( ObjectDecl * flag ) { 349 Expression * expr= new UntypedExpr(348 Expression * untyped = new UntypedExpr( 350 349 new NameExpr( "?=?" ), 351 350 { … … 355 354 ); 356 355 357 ResolvExpr::findVoidExpression( expr, indexer ); 356 Expression * expr = ResolvExpr::findVoidExpression( untyped, indexer ); 357 delete untyped; 358 358 359 359 return new ExprStmt( noLabels, expr ); … … 379 379 new ListInit( 380 380 map_range < std::list<Initializer*> > ( clause.target.arguments, [this](Expression * expr ){ 381 Expression * init= new CastExpr(381 Expression * untyped = new CastExpr( 382 382 new UntypedExpr( 383 383 new NameExpr( "get_monitor" ), … … 393 393 ); 394 394 395 ResolvExpr::findSingleExpression( init, indexer ); 395 Expression * init = ResolvExpr::findSingleExpression( untyped, indexer ); 396 delete untyped; 396 397 return new SingleInit( init ); 397 398 }) -
src/InitTweak/FixInit.cc
rb10c621c rca278c1 367 367 ImplicitCtorDtorStmt * stmt = genCtorDtor( fname, var, cpArg ); 368 368 ExprStmt * exprStmt = strict_dynamic_cast< ExprStmt * >( stmt->get_callStmt() ); 369 Expression * resolved = exprStmt->expr; 370 exprStmt->expr = nullptr; // take ownership of expr 369 Expression * untyped = exprStmt->get_expr(); 371 370 372 371 // resolve copy constructor 373 372 // should only be one alternative for copy ctor and dtor expressions, since all arguments are fixed 374 373 // (VariableExpr and already resolved expression) 375 CP_CTOR_PRINT( std::cerr << "ResolvingCtorDtor " << resolved << std::endl; )376 ResolvExpr::findVoidExpression( resolved, indexer );374 CP_CTOR_PRINT( std::cerr << "ResolvingCtorDtor " << untyped << std::endl; ) 375 Expression * resolved = ResolvExpr::findVoidExpression( untyped, indexer ); 377 376 assert( resolved ); 378 377 if ( resolved->get_env() ) { … … 382 381 resolved->set_env( nullptr ); 383 382 } // if 383 384 384 delete stmt; 385 385 return resolved; … … 1112 1112 } 1113 1113 1114 DeclarationWithType * MutatingResolver::mutate( ObjectDecl * objectDecl ) {1114 DeclarationWithType * MutatingResolver::mutate( ObjectDecl *objectDecl ) { 1115 1115 // add object to the indexer assumes that there will be no name collisions 1116 1116 // in generated code. If this changes, add mutate methods for entities with … … 1120 1120 } 1121 1121 1122 Expression * MutatingResolver::mutate( UntypedExpr * untypedExpr ) { 1123 Expression * newExpr = untypedExpr; 1124 ResolvExpr::findVoidExpression( newExpr, indexer ); 1125 return newExpr; 1122 Expression* MutatingResolver::mutate( UntypedExpr *untypedExpr ) { 1123 return strict_dynamic_cast< ApplicationExpr * >( ResolvExpr::findVoidExpression( untypedExpr, indexer ) ); 1126 1124 } 1127 1125 … … 1148 1146 1149 1147 // resolve assignment and dispose of new env 1150 ResolvExpr::findVoidExpression( assign, indexer ); 1151 delete assign->env; 1152 assign->env = nullptr; 1148 Expression * resolvedAssign = ResolvExpr::findVoidExpression( assign, indexer ); 1149 delete resolvedAssign->env; 1150 resolvedAssign->env = nullptr; 1151 delete assign; 1153 1152 1154 1153 // for constructor expr: … … 1159 1158 // T & tmp; 1160 1159 // &tmp = &x, ?{}(tmp), tmp 1161 CommaExpr * commaExpr = new CommaExpr( assign, new CommaExpr( callExpr, new VariableExpr( tmp ) ) );1160 CommaExpr * commaExpr = new CommaExpr( resolvedAssign, new CommaExpr( callExpr, new VariableExpr( tmp ) ) ); 1162 1161 commaExpr->set_env( env ); 1163 1162 return commaExpr; -
src/MakeLibCfa.cc
rb10c621c rca278c1 119 119 newDecls.push_back( funcDecl ); 120 120 121 Statement * stmt = nullptr;122 121 switch ( opInfo.type ) { 123 122 case CodeGen::OT_INDEX: … … 129 128 case CodeGen::OT_POSTFIXASSIGN: 130 129 case CodeGen::OT_INFIXASSIGN: 131 // return the recursive call132 stmt = new ReturnStmt( noLabels, newExpr );133 break;134 130 case CodeGen::OT_CTOR: 135 131 case CodeGen::OT_DTOR: 136 // executethe recursive call137 stmt = new ExprStmt( noLabels, newExpr);132 // return the recursive call 133 funcDecl->get_statements()->get_kids().push_back( new ReturnStmt( std::list< Label >(), newExpr ) ); 138 134 break; 139 135 case CodeGen::OT_CONSTANT: … … 142 138 assert( false ); 143 139 } // switch 144 funcDecl->get_statements()->push_back( stmt );145 140 } 146 141 } // namespace -
src/ResolvExpr/AlternativeFinder.cc
rb10c621c rca278c1 1268 1268 // O(N^2) checks of d-types with e-types 1269 1269 for ( InitAlternative & initAlt : initExpr->get_initAlts() ) { 1270 Type * toType = resolveTypeof( initAlt.type ->clone(), indexer );1270 Type * toType = resolveTypeof( initAlt.type, indexer ); 1271 1271 SymTab::validateType( toType, &indexer ); 1272 1272 adjustExprType( toType, env, indexer ); -
src/ResolvExpr/Resolver.cc
rb10c621c rca278c1 109 109 110 110 namespace { 111 void finishExpr( Expression *expr, const TypeEnvironment &env , TypeSubstitution * oldenv = nullptr) {112 expr-> env = oldenv ? oldenv->clone() : new TypeSubstitution;111 void finishExpr( Expression *expr, const TypeEnvironment &env ) { 112 expr->set_env( new TypeSubstitution ); 113 113 env.makeSubstitution( *expr->get_env() ); 114 114 } 115 115 } // namespace 116 116 117 void findVoidExpression( Expression *&untyped, const SymTab::Indexer &indexer ) {117 Expression *findVoidExpression( Expression *untyped, const SymTab::Indexer &indexer ) { 118 118 global_renamer.reset(); 119 119 TypeEnvironment env; 120 120 Expression *newExpr = resolveInVoidContext( untyped, indexer, env ); 121 finishExpr( newExpr, env, untyped->env ); 122 delete untyped; 123 untyped = newExpr; 124 } 125 126 void findSingleExpression( Expression *&untyped, const SymTab::Indexer &indexer ) { 127 if ( ! untyped ) return; 121 finishExpr( newExpr, env ); 122 return newExpr; 123 } 124 125 Expression * findSingleExpression( Expression *untyped, const SymTab::Indexer &indexer ) { 128 126 TypeEnvironment env; 129 127 AlternativeFinder finder( indexer, env ); … … 131 129 #if 0 132 130 if ( finder.get_alternatives().size() != 1 ) { 133 std::c err<< "untyped expr is ";134 untyped->print( std::c err);135 std::c err<< std::endl << "alternatives are:";136 for ( const Alternative & alt : finder.get_alternatives()) {137 alt.print( std::cerr);131 std::cout << "untyped expr is "; 132 untyped->print( std::cout ); 133 std::cout << std::endl << "alternatives are:"; 134 for ( std::list< Alternative >::const_iterator i = finder.get_alternatives().begin(); i != finder.get_alternatives().end(); ++i ) { 135 i->print( std::cout ); 138 136 } // for 139 137 } // if … … 142 140 Alternative &choice = finder.get_alternatives().front(); 143 141 Expression *newExpr = choice.expr->clone(); 144 finishExpr( newExpr, choice.env, untyped->env ); 145 delete untyped; 146 untyped = newExpr; 147 } 148 149 void findSingleExpression( Expression *& untyped, Type * type, const SymTab::Indexer & indexer ) { 150 assert( untyped && type ); 151 untyped = new CastExpr( untyped, type ); 152 findSingleExpression( untyped, indexer ); 153 if ( CastExpr * castExpr = dynamic_cast< CastExpr * >( untyped ) ) { 154 if ( ResolvExpr::typesCompatible( castExpr->arg->result, castExpr->result, indexer ) ) { 155 // cast is to the same type as its argument, so it's unnecessary -- remove it 156 untyped = castExpr->arg; 157 castExpr->arg = nullptr; 158 delete castExpr; 159 } 160 } 142 finishExpr( newExpr, choice.env ); 143 return newExpr; 161 144 } 162 145 … … 174 157 } 175 158 176 void findIntegralExpression( Expression *&untyped, const SymTab::Indexer &indexer ) {159 Expression *findIntegralExpression( Expression *untyped, const SymTab::Indexer &indexer ) { 177 160 TypeEnvironment env; 178 161 AlternativeFinder finder( indexer, env ); … … 203 186 throw SemanticError( "No interpretations for case control expression", untyped ); 204 187 } // if 205 finishExpr( newExpr, *newEnv, untyped->env ); 206 delete untyped; 207 untyped = newExpr; 188 finishExpr( newExpr, *newEnv ); 189 return newExpr; 208 190 } 209 191 … … 230 212 void Resolver::handlePtrType( PtrType * type ) { 231 213 if ( type->get_dimension() ) { 232 findSingleExpression( type->dimension, SymTab::SizeType->clone(), indexer ); 214 CastExpr *castExpr = new CastExpr( type->get_dimension(), SymTab::SizeType->clone() ); 215 Expression *newExpr = findSingleExpression( castExpr, indexer ); 216 delete type->get_dimension(); 217 type->set_dimension( newExpr ); 233 218 } 234 219 } … … 283 268 void Resolver::previsit( ExprStmt *exprStmt ) { 284 269 visit_children = false; 285 assertf( exprStmt->expr, "ExprStmt has null Expression in resolver" ); 286 findVoidExpression( exprStmt->expr, indexer ); 270 assertf( exprStmt->get_expr(), "ExprStmt has null Expression in resolver" ); 271 Expression *newExpr = findVoidExpression( exprStmt->get_expr(), indexer ); 272 delete exprStmt->get_expr(); 273 exprStmt->set_expr( newExpr ); 287 274 } 288 275 289 276 void Resolver::previsit( AsmExpr *asmExpr ) { 290 277 visit_children = false; 291 findVoidExpression( asmExpr->operand, indexer ); 278 Expression *newExpr = findVoidExpression( asmExpr->get_operand(), indexer ); 279 delete asmExpr->get_operand(); 280 asmExpr->set_operand( newExpr ); 292 281 if ( asmExpr->get_inout() ) { 293 findVoidExpression( asmExpr->inout, indexer ); 282 newExpr = findVoidExpression( asmExpr->get_inout(), indexer ); 283 delete asmExpr->get_inout(); 284 asmExpr->set_inout( newExpr ); 294 285 } // if 295 286 } … … 302 293 303 294 void Resolver::previsit( IfStmt *ifStmt ) { 304 findSingleExpression( ifStmt->condition, indexer ); 295 Expression *newExpr = findSingleExpression( ifStmt->get_condition(), indexer ); 296 delete ifStmt->get_condition(); 297 ifStmt->set_condition( newExpr ); 305 298 } 306 299 307 300 void Resolver::previsit( WhileStmt *whileStmt ) { 308 findSingleExpression( whileStmt->condition, indexer ); 301 Expression *newExpr = findSingleExpression( whileStmt->get_condition(), indexer ); 302 delete whileStmt->get_condition(); 303 whileStmt->set_condition( newExpr ); 309 304 } 310 305 311 306 void Resolver::previsit( ForStmt *forStmt ) { 312 if ( forStmt->condition ) { 313 findSingleExpression( forStmt->condition, indexer ); 307 if ( forStmt->get_condition() ) { 308 Expression * newExpr = findSingleExpression( forStmt->get_condition(), indexer ); 309 delete forStmt->get_condition(); 310 forStmt->set_condition( newExpr ); 314 311 } // if 315 312 316 if ( forStmt->increment ) { 317 findVoidExpression( forStmt->increment, indexer ); 313 if ( forStmt->get_increment() ) { 314 Expression * newExpr = findVoidExpression( forStmt->get_increment(), indexer ); 315 delete forStmt->get_increment(); 316 forStmt->set_increment( newExpr ); 318 317 } // if 319 318 } … … 321 320 void Resolver::previsit( SwitchStmt *switchStmt ) { 322 321 GuardValue( currentObject ); 323 findIntegralExpression( switchStmt->condition, indexer ); 324 325 currentObject = CurrentObject( switchStmt->condition->result ); 322 Expression *newExpr; 323 newExpr = findIntegralExpression( switchStmt->get_condition(), indexer ); 324 delete switchStmt->get_condition(); 325 switchStmt->set_condition( newExpr ); 326 327 currentObject = CurrentObject( newExpr->get_result() ); 326 328 } 327 329 … … 330 332 std::list< InitAlternative > initAlts = currentObject.getOptions(); 331 333 assertf( initAlts.size() == 1, "SwitchStmt did not correctly resolve an integral expression." ); 332 // must remove cast from case statement because RangeExpr cannot be cast. 333 Expression * newExpr = new CastExpr( caseStmt->condition, initAlts.front().type->clone() ); 334 findSingleExpression( newExpr, indexer ); 335 CastExpr * castExpr = strict_dynamic_cast< CastExpr * >( newExpr ); 336 caseStmt->condition = castExpr->arg; 337 castExpr->arg = nullptr; 334 CastExpr * castExpr = new CastExpr( caseStmt->get_condition(), initAlts.front().type->clone() ); 335 Expression * newExpr = findSingleExpression( castExpr, indexer ); 336 castExpr = strict_dynamic_cast< CastExpr * >( newExpr ); 337 caseStmt->set_condition( castExpr->get_arg() ); 338 castExpr->set_arg( nullptr ); 338 339 delete castExpr; 339 340 } … … 344 345 // must resolve the argument for a computed goto 345 346 if ( branchStmt->get_type() == BranchStmt::Goto ) { // check for computed goto statement 346 if ( branchStmt->computedTarget ) { 347 // computed goto argument is void * 348 findSingleExpression( branchStmt->computedTarget, new PointerType( Type::Qualifiers(), new VoidType( Type::Qualifiers() ) ), indexer ); 347 if ( Expression * arg = branchStmt->get_computedTarget() ) { 348 VoidType v = Type::Qualifiers(); // cast to void * for the alternative finder 349 PointerType pt( Type::Qualifiers(), v.clone() ); 350 CastExpr * castExpr = new CastExpr( arg, pt.clone() ); 351 Expression * newExpr = findSingleExpression( castExpr, indexer ); // find best expression 352 branchStmt->set_target( newExpr ); 349 353 } // if 350 354 } // if … … 353 357 void Resolver::previsit( ReturnStmt *returnStmt ) { 354 358 visit_children = false; 355 if ( returnStmt->expr ) { 356 findSingleExpression( returnStmt->expr, functionReturn->clone(), indexer ); 359 if ( returnStmt->get_expr() ) { 360 CastExpr *castExpr = new CastExpr( returnStmt->get_expr(), functionReturn->clone() ); 361 Expression *newExpr = findSingleExpression( castExpr, indexer ); 362 delete castExpr; 363 returnStmt->set_expr( newExpr ); 357 364 } // if 358 365 } … … 365 372 indexer.lookupStruct( "__cfaehm__base_exception_t" ); 366 373 assert( exception_decl ); 367 Type * exceptType = new PointerType( noQualifiers, new StructInstType( noQualifiers, exception_decl ) ); 368 findSingleExpression( throwStmt->expr, exceptType, indexer ); 374 Expression * wrapped = new CastExpr( 375 throwStmt->get_expr(), 376 new PointerType( 377 noQualifiers, 378 new StructInstType( 379 noQualifiers, 380 exception_decl 381 ) 382 ) 383 ); 384 Expression * newExpr = findSingleExpression( wrapped, indexer ); 385 throwStmt->set_expr( newExpr ); 369 386 } 370 387 } 371 388 372 389 void Resolver::previsit( CatchStmt *catchStmt ) { 373 if ( catchStmt->cond ) { 374 findSingleExpression( catchStmt->cond, new BasicType( noQualifiers, BasicType::Bool ), indexer ); 375 } 390 if ( catchStmt->get_cond() ) { 391 Expression * wrapped = new CastExpr( 392 catchStmt->get_cond(), 393 new BasicType( noQualifiers, BasicType::Bool ) 394 ); 395 catchStmt->set_cond( findSingleExpression( wrapped, indexer ) ); 396 } 397 } 398 399 inline void resolveAsIf( Expression *& expr, SymTab::Indexer & indexer ) { 400 if( !expr ) return; 401 Expression * newExpr = findSingleExpression( expr, indexer ); 402 delete expr; 403 expr = newExpr; 404 } 405 406 inline void resolveAsType( Expression *& expr, Type * type, SymTab::Indexer & indexer ) { 407 if( !expr ) return; 408 Expression * newExpr = findSingleExpression( new CastExpr( expr, type ), indexer ); 409 delete expr; 410 expr = newExpr; 376 411 } 377 412 … … 543 578 // Resolve the conditions as if it were an IfStmt 544 579 // Resolve the statments normally 545 findSingleExpression( clause.condition, this->indexer );580 resolveAsIf( clause.condition, this->indexer ); 546 581 clause.statement->accept( *visitor ); 547 582 } … … 552 587 // Resolve the conditions as if it were an IfStmt 553 588 // Resolve the statments normally 554 findSingleExpression( stmt->timeout.time, new BasicType( noQualifiers, BasicType::LongLongUnsignedInt ), this->indexer );555 findSingleExpression( stmt->timeout.condition, this->indexer );589 resolveAsType( stmt->timeout.time, new BasicType( noQualifiers, BasicType::LongLongUnsignedInt ), this->indexer ); 590 resolveAsIf ( stmt->timeout.condition, this->indexer ); 556 591 stmt->timeout.statement->accept( *visitor ); 557 592 } … … 560 595 // Resolve the conditions as if it were an IfStmt 561 596 // Resolve the statments normally 562 findSingleExpression( stmt->orelse.condition, this->indexer );597 resolveAsIf( stmt->orelse.condition, this->indexer ); 563 598 stmt->orelse.statement->accept( *visitor ); 564 599 } … … 577 612 visit_children = false; 578 613 // resolve initialization using the possibilities as determined by the currentObject cursor 579 Expression * newExpr= new UntypedInitExpr( singleInit->get_value(), currentObject.getOptions() );580 findSingleExpression( newExpr, indexer );614 UntypedInitExpr * untyped = new UntypedInitExpr( singleInit->get_value(), currentObject.getOptions() ); 615 Expression * newExpr = findSingleExpression( untyped, indexer ); 581 616 InitExpr * initExpr = strict_dynamic_cast< InitExpr * >( newExpr ); 582 617 … … 585 620 586 621 // discard InitExpr wrapper and retain relevant pieces 587 newExpr = initExpr->expr; 588 initExpr->expr = nullptr; 589 std::swap( initExpr->env, newExpr->env ); 622 newExpr = initExpr->get_expr(); 623 newExpr->set_env( initExpr->get_env() ); 624 initExpr->set_expr( nullptr ); 625 initExpr->set_env( nullptr ); 590 626 delete initExpr; 591 627 -
src/ResolvExpr/Resolver.h
rb10c621c rca278c1 30 30 void resolve( std::list< Declaration * > translationUnit ); 31 31 void resolveDecl( Declaration *, const SymTab::Indexer &indexer ); 32 Expression *resolveInVoidContext( Expression * expr, const SymTab::Indexer &indexer );33 void findVoidExpression( Expression *&untyped, const SymTab::Indexer &indexer );34 void findSingleExpression( Expression *&untyped, const SymTab::Indexer &indexer );32 Expression *resolveInVoidContext( Expression *expr, const SymTab::Indexer &indexer ); 33 Expression *findVoidExpression( Expression *untyped, const SymTab::Indexer &indexer ); 34 Expression * findSingleExpression( Expression *untyped, const SymTab::Indexer &indexer ); 35 35 void resolveCtorInit( ConstructorInit * ctorInit, const SymTab::Indexer & indexer ); 36 36 void resolveStmtExpr( StmtExpr * stmtExpr, const SymTab::Indexer & indexer ); -
src/SymTab/Validate.cc
rb10c621c rca278c1 276 276 ReturnChecker::checkFunctionReturns( translationUnit ); 277 277 mutateAll( translationUnit, compoundliteral ); 278 acceptAll( translationUnit, fpd ); // must happen before autogenerateRoutines278 acceptAll( translationUnit, fpd ); 279 279 ArrayLength::computeLength( translationUnit ); 280 280 acceptAll( translationUnit, finder ); -
src/libcfa/Makefile.am
rb10c621c rca278c1 31 31 32 32 libcfa_a-libcfa-prelude.o : libcfa-prelude.c 33 ${AM_V_GEN}@BACKEND_CC@ @CFA_FLAGS@ - Wall -O2 -c -o $@ $<33 ${AM_V_GEN}@BACKEND_CC@ @CFA_FLAGS@ -O2 -c -o $@ $< 34 34 35 35 libcfa_d_a-libcfa-prelude.o : libcfa-prelude.c 36 ${AM_V_GEN}@BACKEND_CC@ @CFA_FLAGS@ -D__CFA_DEBUG__ - Wall -O0 -c -o $@ $<36 ${AM_V_GEN}@BACKEND_CC@ @CFA_FLAGS@ -D__CFA_DEBUG__ -O0 -c -o $@ $< 37 37 38 38 EXTRA_FLAGS = -g -Wall -Wno-unused-function -imacros libcfa-prelude.c @CFA_FLAGS@ -
src/libcfa/Makefile.in
rb10c621c rca278c1 1498 1498 1499 1499 libcfa_a-libcfa-prelude.o : libcfa-prelude.c 1500 ${AM_V_GEN}@BACKEND_CC@ @CFA_FLAGS@ - Wall -O2 -c -o $@ $<1500 ${AM_V_GEN}@BACKEND_CC@ @CFA_FLAGS@ -O2 -c -o $@ $< 1501 1501 1502 1502 libcfa_d_a-libcfa-prelude.o : libcfa-prelude.c 1503 ${AM_V_GEN}@BACKEND_CC@ @CFA_FLAGS@ -D__CFA_DEBUG__ - Wall -O0 -c -o $@ $<1503 ${AM_V_GEN}@BACKEND_CC@ @CFA_FLAGS@ -D__CFA_DEBUG__ -O0 -c -o $@ $< 1504 1504 1505 1505 # extensionless header files are overridden by -o flag in default makerule => explicitly override default rule to silently do nothing -
src/libcfa/iostream
rb10c621c rca278c1 10 10 // Created On : Wed May 27 17:56:53 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Oct 10 14:51:10201713 // Update Count : 1 4012 // Last Modified On : Wed Sep 13 12:53:46 2017 13 // Update Count : 138 14 14 // 15 15 … … 79 79 forall( dtype ostype | ostream( ostype ) ) ostype * ?|?( ostype *, const char * ); 80 80 forall( dtype ostype | ostream( ostype ) ) ostype * ?|?( ostype *, const char16_t * ); 81 #if ! ( __ARM_ARCH_ISA_ARM == 1 && __ARM_32BIT_STATE == 1 ) // char32_t == wchar_t => ambiguous82 81 forall( dtype ostype | ostream( ostype ) ) ostype * ?|?( ostype *, const char32_t * ); 83 #endif // ! ( __ARM_ARCH_ISA_ARM == 1 && __ARM_32BIT_STATE == 1 )84 82 forall( dtype ostype | ostream( ostype ) ) ostype * ?|?( ostype *, const wchar_t * ); 85 83 forall( dtype ostype | ostream( ostype ) ) ostype * ?|?( ostype *, const void * ); -
src/libcfa/iostream.c
rb10c621c rca278c1 10 10 // Created On : Wed May 27 17:56:53 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Oct 10 14:51:09201713 // Update Count : 42 412 // Last Modified On : Sun Sep 17 23:24:25 2017 13 // Update Count : 422 14 14 // 15 15 … … 191 191 } // ?|? 192 192 193 #if ! ( __ARM_ARCH_ISA_ARM == 1 && __ARM_32BIT_STATE == 1 ) // char32_t == wchar_t => ambiguous194 193 forall( dtype ostype | ostream( ostype ) ) 195 194 ostype * ?|?( ostype * os, const char32_t * str ) { … … 198 197 return os; 199 198 } // ?|? 200 #endif // ! ( __ARM_ARCH_ISA_ARM == 1 && __ARM_32BIT_STATE == 1 )201 199 202 200 forall( dtype ostype | ostream( ostype ) ) -
src/tests/.expect/32/KRfunctions.txt
rb10c621c rca278c1 34 34 ((void)((*___dst__R2sS_1).__i__i_1=___src__2sS_1.__i__i_1)); 35 35 ((void)___constructor__F_R2sS2sS_autogen___1((&___ret__2sS_1), ___src__2sS_1)); 36 return ___ret__2sS_1;36 return ((struct S )___ret__2sS_1); 37 37 } 38 38 static inline void ___constructor__F_R2sSi_autogen___1(struct S *___dst__R2sS_1, signed int __i__i_1){ … … 65 65 signed int *__x__FPi_ii__2(signed int __anonymous_object2, signed int __anonymous_object3); 66 66 ((void)(___retval_f10__PFPi_ii__1=__x__FPi_ii__2) /* ?{} */); 67 return ___retval_f10__PFPi_ii__1;67 return ((signed int *(*)(signed int __x__i_1, signed int __y__i_1))___retval_f10__PFPi_ii__1); 68 68 } 69 69 signed int (*__f11__FPA0i_iPiPi__1(signed int __a__i_1, signed int *__b__Pi_1, signed int *__c__Pi_1))[]{ -
src/tests/.expect/32/attributes.txt
rb10c621c rca278c1 24 24 struct __anonymous0 ___ret__13s__anonymous0_1; 25 25 ((void)___constructor__F_R13s__anonymous013s__anonymous0_autogen___1((&___ret__13s__anonymous0_1), ___src__13s__anonymous0_1)); 26 return ___ret__13s__anonymous0_1;26 return ((struct __anonymous0 )___ret__13s__anonymous0_1); 27 27 } 28 28 __attribute__ ((unused)) struct Agn1; … … 42 42 struct Agn2 ___ret__5sAgn2_1; 43 43 ((void)___constructor__F_R5sAgn25sAgn2_autogen___1((&___ret__5sAgn2_1), ___src__5sAgn2_1)); 44 return ___ret__5sAgn2_1;44 return ((struct Agn2 )___ret__5sAgn2_1); 45 45 } 46 46 enum __attribute__ ((unused)) __anonymous1 { … … 114 114 ((void)((*___dst__R4sFdl_1).__f9__Pi_1=___src__4sFdl_1.__f9__Pi_1)); 115 115 ((void)___constructor__F_R4sFdl4sFdl_autogen___1((&___ret__4sFdl_1), ___src__4sFdl_1)); 116 return ___ret__4sFdl_1;116 return ((struct Fdl )___ret__4sFdl_1); 117 117 } 118 118 static inline void ___constructor__F_R4sFdli_autogen___1(struct Fdl *___dst__R4sFdl_1, signed int __f1__i_1){ … … 301 301 ((void)((*___dst__R13s__anonymous4_2).__i__i_2=___src__13s__anonymous4_2.__i__i_2)); 302 302 ((void)___constructor__F_R13s__anonymous413s__anonymous4_autogen___2((&___ret__13s__anonymous4_2), ___src__13s__anonymous4_2)); 303 return ___ret__13s__anonymous4_2;303 return ((struct __anonymous4 )___ret__13s__anonymous4_2); 304 304 } 305 305 inline void ___constructor__F_R13s__anonymous4i_autogen___2(struct __anonymous4 *___dst__R13s__anonymous4_2, signed int __i__i_2){ … … 320 320 enum __anonymous5 ___ret__13e__anonymous5_2; 321 321 ((void)(___ret__13e__anonymous5_2=((*___dst__R13e__anonymous5_2)=___src__13e__anonymous5_2)) /* ?{} */); 322 return ___ret__13e__anonymous5_2;322 return ((enum __anonymous5 )___ret__13e__anonymous5_2); 323 323 } 324 324 ((void)sizeof(enum __anonymous5 )); … … 350 350 struct Vad ___ret__4sVad_1; 351 351 ((void)___constructor__F_R4sVad4sVad_autogen___1((&___ret__4sVad_1), ___src__4sVad_1)); 352 return ___ret__4sVad_1;353 } 352 return ((struct Vad )___ret__4sVad_1); 353 } -
src/tests/.expect/32/declarationSpecifier.txt
rb10c621c rca278c1 33 33 ((void)((*___dst__R13s__anonymous0_1).__i__i_1=___src__13s__anonymous0_1.__i__i_1)); 34 34 ((void)___constructor__F_R13s__anonymous013s__anonymous0_autogen___1((&___ret__13s__anonymous0_1), ___src__13s__anonymous0_1)); 35 return ___ret__13s__anonymous0_1;35 return ((struct __anonymous0 )___ret__13s__anonymous0_1); 36 36 } 37 37 static inline void ___constructor__F_R13s__anonymous0i_autogen___1(struct __anonymous0 *___dst__R13s__anonymous0_1, signed int __i__i_1){ … … 59 59 ((void)((*___dst__R13s__anonymous1_1).__i__i_1=___src__13s__anonymous1_1.__i__i_1)); 60 60 ((void)___constructor__F_R13s__anonymous113s__anonymous1_autogen___1((&___ret__13s__anonymous1_1), ___src__13s__anonymous1_1)); 61 return ___ret__13s__anonymous1_1;61 return ((struct __anonymous1 )___ret__13s__anonymous1_1); 62 62 } 63 63 static inline void ___constructor__F_R13s__anonymous1i_autogen___1(struct __anonymous1 *___dst__R13s__anonymous1_1, signed int __i__i_1){ … … 85 85 ((void)((*___dst__R13s__anonymous2_1).__i__i_1=___src__13s__anonymous2_1.__i__i_1)); 86 86 ((void)___constructor__F_R13s__anonymous213s__anonymous2_autogen___1((&___ret__13s__anonymous2_1), ___src__13s__anonymous2_1)); 87 return ___ret__13s__anonymous2_1;87 return ((struct __anonymous2 )___ret__13s__anonymous2_1); 88 88 } 89 89 static inline void ___constructor__F_R13s__anonymous2i_autogen___1(struct __anonymous2 *___dst__R13s__anonymous2_1, signed int __i__i_1){ … … 111 111 ((void)((*___dst__R13s__anonymous3_1).__i__i_1=___src__13s__anonymous3_1.__i__i_1)); 112 112 ((void)___constructor__F_R13s__anonymous313s__anonymous3_autogen___1((&___ret__13s__anonymous3_1), ___src__13s__anonymous3_1)); 113 return ___ret__13s__anonymous3_1;113 return ((struct __anonymous3 )___ret__13s__anonymous3_1); 114 114 } 115 115 static inline void ___constructor__F_R13s__anonymous3i_autogen___1(struct __anonymous3 *___dst__R13s__anonymous3_1, signed int __i__i_1){ … … 137 137 ((void)((*___dst__R13s__anonymous4_1).__i__i_1=___src__13s__anonymous4_1.__i__i_1)); 138 138 ((void)___constructor__F_R13s__anonymous413s__anonymous4_autogen___1((&___ret__13s__anonymous4_1), ___src__13s__anonymous4_1)); 139 return ___ret__13s__anonymous4_1;139 return ((struct __anonymous4 )___ret__13s__anonymous4_1); 140 140 } 141 141 static inline void ___constructor__F_R13s__anonymous4i_autogen___1(struct __anonymous4 *___dst__R13s__anonymous4_1, signed int __i__i_1){ … … 163 163 ((void)((*___dst__R13s__anonymous5_1).__i__i_1=___src__13s__anonymous5_1.__i__i_1)); 164 164 ((void)___constructor__F_R13s__anonymous513s__anonymous5_autogen___1((&___ret__13s__anonymous5_1), ___src__13s__anonymous5_1)); 165 return ___ret__13s__anonymous5_1;165 return ((struct __anonymous5 )___ret__13s__anonymous5_1); 166 166 } 167 167 static inline void ___constructor__F_R13s__anonymous5i_autogen___1(struct __anonymous5 *___dst__R13s__anonymous5_1, signed int __i__i_1){ … … 189 189 ((void)((*___dst__R13s__anonymous6_1).__i__i_1=___src__13s__anonymous6_1.__i__i_1)); 190 190 ((void)___constructor__F_R13s__anonymous613s__anonymous6_autogen___1((&___ret__13s__anonymous6_1), ___src__13s__anonymous6_1)); 191 return ___ret__13s__anonymous6_1;191 return ((struct __anonymous6 )___ret__13s__anonymous6_1); 192 192 } 193 193 static inline void ___constructor__F_R13s__anonymous6i_autogen___1(struct __anonymous6 *___dst__R13s__anonymous6_1, signed int __i__i_1){ … … 215 215 ((void)((*___dst__R13s__anonymous7_1).__i__i_1=___src__13s__anonymous7_1.__i__i_1)); 216 216 ((void)___constructor__F_R13s__anonymous713s__anonymous7_autogen___1((&___ret__13s__anonymous7_1), ___src__13s__anonymous7_1)); 217 return ___ret__13s__anonymous7_1;217 return ((struct __anonymous7 )___ret__13s__anonymous7_1); 218 218 } 219 219 static inline void ___constructor__F_R13s__anonymous7i_autogen___1(struct __anonymous7 *___dst__R13s__anonymous7_1, signed int __i__i_1){ … … 249 249 ((void)((*___dst__R13s__anonymous8_1).__i__s_1=___src__13s__anonymous8_1.__i__s_1)); 250 250 ((void)___constructor__F_R13s__anonymous813s__anonymous8_autogen___1((&___ret__13s__anonymous8_1), ___src__13s__anonymous8_1)); 251 return ___ret__13s__anonymous8_1;251 return ((struct __anonymous8 )___ret__13s__anonymous8_1); 252 252 } 253 253 static inline void ___constructor__F_R13s__anonymous8s_autogen___1(struct __anonymous8 *___dst__R13s__anonymous8_1, signed short int __i__s_1){ … … 275 275 ((void)((*___dst__R13s__anonymous9_1).__i__s_1=___src__13s__anonymous9_1.__i__s_1)); 276 276 ((void)___constructor__F_R13s__anonymous913s__anonymous9_autogen___1((&___ret__13s__anonymous9_1), ___src__13s__anonymous9_1)); 277 return ___ret__13s__anonymous9_1;277 return ((struct __anonymous9 )___ret__13s__anonymous9_1); 278 278 } 279 279 static inline void ___constructor__F_R13s__anonymous9s_autogen___1(struct __anonymous9 *___dst__R13s__anonymous9_1, signed short int __i__s_1){ … … 301 301 ((void)((*___dst__R14s__anonymous10_1).__i__s_1=___src__14s__anonymous10_1.__i__s_1)); 302 302 ((void)___constructor__F_R14s__anonymous1014s__anonymous10_autogen___1((&___ret__14s__anonymous10_1), ___src__14s__anonymous10_1)); 303 return ___ret__14s__anonymous10_1;303 return ((struct __anonymous10 )___ret__14s__anonymous10_1); 304 304 } 305 305 static inline void ___constructor__F_R14s__anonymous10s_autogen___1(struct __anonymous10 *___dst__R14s__anonymous10_1, signed short int __i__s_1){ … … 327 327 ((void)((*___dst__R14s__anonymous11_1).__i__s_1=___src__14s__anonymous11_1.__i__s_1)); 328 328 ((void)___constructor__F_R14s__anonymous1114s__anonymous11_autogen___1((&___ret__14s__anonymous11_1), ___src__14s__anonymous11_1)); 329 return ___ret__14s__anonymous11_1;329 return ((struct __anonymous11 )___ret__14s__anonymous11_1); 330 330 } 331 331 static inline void ___constructor__F_R14s__anonymous11s_autogen___1(struct __anonymous11 *___dst__R14s__anonymous11_1, signed short int __i__s_1){ … … 353 353 ((void)((*___dst__R14s__anonymous12_1).__i__s_1=___src__14s__anonymous12_1.__i__s_1)); 354 354 ((void)___constructor__F_R14s__anonymous1214s__anonymous12_autogen___1((&___ret__14s__anonymous12_1), ___src__14s__anonymous12_1)); 355 return ___ret__14s__anonymous12_1;355 return ((struct __anonymous12 )___ret__14s__anonymous12_1); 356 356 } 357 357 static inline void ___constructor__F_R14s__anonymous12s_autogen___1(struct __anonymous12 *___dst__R14s__anonymous12_1, signed short int __i__s_1){ … … 379 379 ((void)((*___dst__R14s__anonymous13_1).__i__s_1=___src__14s__anonymous13_1.__i__s_1)); 380 380 ((void)___constructor__F_R14s__anonymous1314s__anonymous13_autogen___1((&___ret__14s__anonymous13_1), ___src__14s__anonymous13_1)); 381 return ___ret__14s__anonymous13_1;381 return ((struct __anonymous13 )___ret__14s__anonymous13_1); 382 382 } 383 383 static inline void ___constructor__F_R14s__anonymous13s_autogen___1(struct __anonymous13 *___dst__R14s__anonymous13_1, signed short int __i__s_1){ … … 405 405 ((void)((*___dst__R14s__anonymous14_1).__i__s_1=___src__14s__anonymous14_1.__i__s_1)); 406 406 ((void)___constructor__F_R14s__anonymous1414s__anonymous14_autogen___1((&___ret__14s__anonymous14_1), ___src__14s__anonymous14_1)); 407 return ___ret__14s__anonymous14_1;407 return ((struct __anonymous14 )___ret__14s__anonymous14_1); 408 408 } 409 409 static inline void ___constructor__F_R14s__anonymous14s_autogen___1(struct __anonymous14 *___dst__R14s__anonymous14_1, signed short int __i__s_1){ … … 431 431 ((void)((*___dst__R14s__anonymous15_1).__i__s_1=___src__14s__anonymous15_1.__i__s_1)); 432 432 ((void)___constructor__F_R14s__anonymous1514s__anonymous15_autogen___1((&___ret__14s__anonymous15_1), ___src__14s__anonymous15_1)); 433 return ___ret__14s__anonymous15_1;433 return ((struct __anonymous15 )___ret__14s__anonymous15_1); 434 434 } 435 435 static inline void ___constructor__F_R14s__anonymous15s_autogen___1(struct __anonymous15 *___dst__R14s__anonymous15_1, signed short int __i__s_1){ … … 473 473 ((void)((*___dst__R14s__anonymous16_1).__i__i_1=___src__14s__anonymous16_1.__i__i_1)); 474 474 ((void)___constructor__F_R14s__anonymous1614s__anonymous16_autogen___1((&___ret__14s__anonymous16_1), ___src__14s__anonymous16_1)); 475 return ___ret__14s__anonymous16_1;475 return ((struct __anonymous16 )___ret__14s__anonymous16_1); 476 476 } 477 477 static inline void ___constructor__F_R14s__anonymous16i_autogen___1(struct __anonymous16 *___dst__R14s__anonymous16_1, signed int __i__i_1){ … … 499 499 ((void)((*___dst__R14s__anonymous17_1).__i__i_1=___src__14s__anonymous17_1.__i__i_1)); 500 500 ((void)___constructor__F_R14s__anonymous1714s__anonymous17_autogen___1((&___ret__14s__anonymous17_1), ___src__14s__anonymous17_1)); 501 return ___ret__14s__anonymous17_1;501 return ((struct __anonymous17 )___ret__14s__anonymous17_1); 502 502 } 503 503 static inline void ___constructor__F_R14s__anonymous17i_autogen___1(struct __anonymous17 *___dst__R14s__anonymous17_1, signed int __i__i_1){ … … 525 525 ((void)((*___dst__R14s__anonymous18_1).__i__i_1=___src__14s__anonymous18_1.__i__i_1)); 526 526 ((void)___constructor__F_R14s__anonymous1814s__anonymous18_autogen___1((&___ret__14s__anonymous18_1), ___src__14s__anonymous18_1)); 527 return ___ret__14s__anonymous18_1;527 return ((struct __anonymous18 )___ret__14s__anonymous18_1); 528 528 } 529 529 static inline void ___constructor__F_R14s__anonymous18i_autogen___1(struct __anonymous18 *___dst__R14s__anonymous18_1, signed int __i__i_1){ … … 551 551 ((void)((*___dst__R14s__anonymous19_1).__i__i_1=___src__14s__anonymous19_1.__i__i_1)); 552 552 ((void)___constructor__F_R14s__anonymous1914s__anonymous19_autogen___1((&___ret__14s__anonymous19_1), ___src__14s__anonymous19_1)); 553 return ___ret__14s__anonymous19_1;553 return ((struct __anonymous19 )___ret__14s__anonymous19_1); 554 554 } 555 555 static inline void ___constructor__F_R14s__anonymous19i_autogen___1(struct __anonymous19 *___dst__R14s__anonymous19_1, signed int __i__i_1){ … … 577 577 ((void)((*___dst__R14s__anonymous20_1).__i__i_1=___src__14s__anonymous20_1.__i__i_1)); 578 578 ((void)___constructor__F_R14s__anonymous2014s__anonymous20_autogen___1((&___ret__14s__anonymous20_1), ___src__14s__anonymous20_1)); 579 return ___ret__14s__anonymous20_1;579 return ((struct __anonymous20 )___ret__14s__anonymous20_1); 580 580 } 581 581 static inline void ___constructor__F_R14s__anonymous20i_autogen___1(struct __anonymous20 *___dst__R14s__anonymous20_1, signed int __i__i_1){ … … 603 603 ((void)((*___dst__R14s__anonymous21_1).__i__i_1=___src__14s__anonymous21_1.__i__i_1)); 604 604 ((void)___constructor__F_R14s__anonymous2114s__anonymous21_autogen___1((&___ret__14s__anonymous21_1), ___src__14s__anonymous21_1)); 605 return ___ret__14s__anonymous21_1;605 return ((struct __anonymous21 )___ret__14s__anonymous21_1); 606 606 } 607 607 static inline void ___constructor__F_R14s__anonymous21i_autogen___1(struct __anonymous21 *___dst__R14s__anonymous21_1, signed int __i__i_1){ … … 629 629 ((void)((*___dst__R14s__anonymous22_1).__i__i_1=___src__14s__anonymous22_1.__i__i_1)); 630 630 ((void)___constructor__F_R14s__anonymous2214s__anonymous22_autogen___1((&___ret__14s__anonymous22_1), ___src__14s__anonymous22_1)); 631 return ___ret__14s__anonymous22_1;631 return ((struct __anonymous22 )___ret__14s__anonymous22_1); 632 632 } 633 633 static inline void ___constructor__F_R14s__anonymous22i_autogen___1(struct __anonymous22 *___dst__R14s__anonymous22_1, signed int __i__i_1){ … … 655 655 ((void)((*___dst__R14s__anonymous23_1).__i__i_1=___src__14s__anonymous23_1.__i__i_1)); 656 656 ((void)___constructor__F_R14s__anonymous2314s__anonymous23_autogen___1((&___ret__14s__anonymous23_1), ___src__14s__anonymous23_1)); 657 return ___ret__14s__anonymous23_1;657 return ((struct __anonymous23 )___ret__14s__anonymous23_1); 658 658 } 659 659 static inline void ___constructor__F_R14s__anonymous23i_autogen___1(struct __anonymous23 *___dst__R14s__anonymous23_1, signed int __i__i_1){ … … 672 672 __attribute__ ((unused)) signed int ___retval_main__i_1; 673 673 ((void)(___retval_main__i_1=((signed int )0)) /* ?{} */); 674 return ___retval_main__i_1;674 return ((signed int )___retval_main__i_1); 675 675 ((void)(___retval_main__i_1=0) /* ?{} */); 676 return ___retval_main__i_1;676 return ((signed int )___retval_main__i_1); 677 677 } 678 678 static inline int invoke_main(int argc, char* argv[], char* envp[]) { (void)argc; (void)argv; (void)envp; return __main__Fi_iPPCc__1(argc, argv); } … … 689 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 690 ((void)(_tmp_cp_ret0) /* ^?{} */); 691 return ___retval_main__i_1;692 } 691 return ((signed int )___retval_main__i_1); 692 } -
src/tests/.expect/32/extension.txt
rb10c621c rca278c1 38 38 ((void)((*___dst__R2sS_1).__c__i_1=___src__2sS_1.__c__i_1)); 39 39 ((void)___constructor__F_R2sS2sS_autogen___1((&___ret__2sS_1), ___src__2sS_1)); 40 return ___ret__2sS_1;40 return ((struct S )___ret__2sS_1); 41 41 } 42 42 static inline void ___constructor__F_R2sSi_autogen___1(struct S *___dst__R2sS_1, signed int __a__i_1){ … … 71 71 ((void)__builtin_memcpy(((void *)___dst__R2uU_1), ((const void *)(&___src__2uU_1)), sizeof(union U ))); 72 72 ((void)___constructor__F_R2uU2uU_autogen___1((&___ret__2uU_1), ___src__2uU_1)); 73 return ___ret__2uU_1;73 return ((union U )___ret__2uU_1); 74 74 } 75 75 static inline void ___constructor__F_R2uUi_autogen___1(__attribute__ ((unused)) union U *___dst__R2uU_1, signed int __src__i_1){ -
src/tests/.expect/32/gccExtensions.txt
rb10c621c rca278c1 64 64 ((void)((*___dst__R2sS_2).__c__i_2=___src__2sS_2.__c__i_2)); 65 65 ((void)___constructor__F_R2sS2sS_autogen___2((&___ret__2sS_2), ___src__2sS_2)); 66 return ___ret__2sS_2;66 return ((struct S )___ret__2sS_2); 67 67 } 68 68 inline void ___constructor__F_R2sSi_autogen___2(struct S *___dst__R2sS_2, signed int __a__i_2){ … … 114 114 ((void)((*___dst__R3ss2_2).__i__i_2=___src__3ss2_2.__i__i_2)); 115 115 ((void)___constructor__F_R3ss23ss2_autogen___2((&___ret__3ss2_2), ___src__3ss2_2)); 116 return ___ret__3ss2_2;116 return ((struct s2 )___ret__3ss2_2); 117 117 } 118 118 inline void ___constructor__F_R3ss2i_autogen___2(struct s2 *___dst__R3ss2_2, signed int __i__i_2){ … … 135 135 ((void)((*___dst__R3ss3_2).__i__i_2=___src__3ss3_2.__i__i_2)); 136 136 ((void)___constructor__F_R3ss33ss3_autogen___2((&___ret__3ss3_2), ___src__3ss3_2)); 137 return ___ret__3ss3_2;137 return ((struct s3 )___ret__3ss3_2); 138 138 } 139 139 inline void ___constructor__F_R3ss3i_autogen___2(struct s3 *___dst__R3ss3_2, signed int __i__i_2){ … … 158 158 ((void)((*___dst__R3ss4_2).__i__i_2=___src__3ss4_2.__i__i_2)); 159 159 ((void)___constructor__F_R3ss43ss4_autogen___2((&___ret__3ss4_2), ___src__3ss4_2)); 160 return ___ret__3ss4_2;160 return ((struct s4 )___ret__3ss4_2); 161 161 } 162 162 inline void ___constructor__F_R3ss4i_autogen___2(struct s4 *___dst__R3ss4_2, signed int __i__i_2){ … … 169 169 signed int __m3__A0A0i_2[((unsigned int )10)][((unsigned int )10)]; 170 170 ((void)(___retval_main__i_1=((signed int )0)) /* ?{} */); 171 return ___retval_main__i_1;171 return ((signed int )___retval_main__i_1); 172 172 ((void)(___retval_main__i_1=0) /* ?{} */); 173 return ___retval_main__i_1;173 return ((signed int )___retval_main__i_1); 174 174 } 175 175 static inline int invoke_main(int argc, char* argv[], char* envp[]) { (void)argc; (void)argv; (void)envp; return __main__Fi_iPPCc__1(argc, argv); } … … 186 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 187 ((void)(_tmp_cp_ret0) /* ^?{} */); 188 return ___retval_main__i_1;188 return ((signed int )___retval_main__i_1); 189 189 } -
src/tests/.expect/32/literals.txt
rb10c621c rca278c1 77 77 ((void)((*___dst__R16s_Istream_cstrUC_1).__s__Pc_1=___src__16s_Istream_cstrUC_1.__s__Pc_1)); 78 78 ((void)___constructor__F_R16s_Istream_cstrUC16s_Istream_cstrUC_autogen___1((&___ret__16s_Istream_cstrUC_1), ___src__16s_Istream_cstrUC_1)); 79 return ___ret__16s_Istream_cstrUC_1;79 return ((struct _Istream_cstrUC )___ret__16s_Istream_cstrUC_1); 80 80 } 81 81 static inline void ___constructor__F_R16s_Istream_cstrUCPc_autogen___1(struct _Istream_cstrUC *___dst__R16s_Istream_cstrUC_1, char *__s__Pc_1){ … … 109 109 ((void)((*___dst__R15s_Istream_cstrC_1).__size__i_1=___src__15s_Istream_cstrC_1.__size__i_1)); 110 110 ((void)___constructor__F_R15s_Istream_cstrC15s_Istream_cstrC_autogen___1((&___ret__15s_Istream_cstrC_1), ___src__15s_Istream_cstrC_1)); 111 return ___ret__15s_Istream_cstrC_1;111 return ((struct _Istream_cstrC )___ret__15s_Istream_cstrC_1); 112 112 } 113 113 static inline void ___constructor__F_R15s_Istream_cstrCPc_autogen___1(struct _Istream_cstrC *___dst__R15s_Istream_cstrC_1, char *__s__Pc_1){ … … 230 230 231 231 ((void)___constructor__F_R9sofstream9sofstream_autogen___1((&___ret__9sofstream_1), ___src__9sofstream_1)); 232 return ___ret__9sofstream_1;232 return ((struct ofstream )___ret__9sofstream_1); 233 233 } 234 234 static inline void ___constructor__F_R9sofstreamPv_autogen___1(struct ofstream *___dst__R9sofstream_1, void *__file__Pv_1){ … … 437 437 ((void)((*___dst__R9sifstream_1).__file__Pv_1=___src__9sifstream_1.__file__Pv_1)); 438 438 ((void)___constructor__F_R9sifstream9sifstream_autogen___1((&___ret__9sifstream_1), ___src__9sifstream_1)); 439 return ___ret__9sifstream_1;439 return ((struct ifstream )___ret__9sifstream_1); 440 440 } 441 441 static inline void ___constructor__F_R9sifstreamPv_autogen___1(struct ifstream *___dst__R9sifstream_1, void *__file__Pv_1){ … … 1363 1363 ((void)L"a" "b" "c"); 1364 1364 ((void)(___retval_main__i_1=0) /* ?{} */); 1365 return ___retval_main__i_1;1365 return ((signed int )___retval_main__i_1); 1366 1366 } 1367 1367 static inline int invoke_main(int argc, char* argv[], char* envp[]) { (void)argc; (void)argv; (void)envp; return __main__Fi___1(); } … … 1378 1378 ((void)(___retval_main__i_1=(((void)(_tmp_cp_ret0=invoke_main(__argc__i_1, __argv__PPc_1, __envp__PPc_1))) , _tmp_cp_ret0)) /* ?{} */); 1379 1379 ((void)(_tmp_cp_ret0) /* ^?{} */); 1380 return ___retval_main__i_1;1381 } 1380 return ((signed int )___retval_main__i_1); 1381 } -
src/tests/.expect/64/KRfunctions.txt
rb10c621c rca278c1 34 34 ((void)((*___dst__R2sS_1).__i__i_1=___src__2sS_1.__i__i_1)); 35 35 ((void)___constructor__F_R2sS2sS_autogen___1((&___ret__2sS_1), ___src__2sS_1)); 36 return ___ret__2sS_1;36 return ((struct S )___ret__2sS_1); 37 37 } 38 38 static inline void ___constructor__F_R2sSi_autogen___1(struct S *___dst__R2sS_1, signed int __i__i_1){ … … 65 65 signed int *__x__FPi_ii__2(signed int __anonymous_object2, signed int __anonymous_object3); 66 66 ((void)(___retval_f10__PFPi_ii__1=__x__FPi_ii__2) /* ?{} */); 67 return ___retval_f10__PFPi_ii__1;67 return ((signed int *(*)(signed int __x__i_1, signed int __y__i_1))___retval_f10__PFPi_ii__1); 68 68 } 69 69 signed int (*__f11__FPA0i_iPiPi__1(signed int __a__i_1, signed int *__b__Pi_1, signed int *__c__Pi_1))[]{ -
src/tests/.expect/64/attributes.txt
rb10c621c rca278c1 24 24 struct __anonymous0 ___ret__13s__anonymous0_1; 25 25 ((void)___constructor__F_R13s__anonymous013s__anonymous0_autogen___1((&___ret__13s__anonymous0_1), ___src__13s__anonymous0_1)); 26 return ___ret__13s__anonymous0_1;26 return ((struct __anonymous0 )___ret__13s__anonymous0_1); 27 27 } 28 28 __attribute__ ((unused)) struct Agn1; … … 42 42 struct Agn2 ___ret__5sAgn2_1; 43 43 ((void)___constructor__F_R5sAgn25sAgn2_autogen___1((&___ret__5sAgn2_1), ___src__5sAgn2_1)); 44 return ___ret__5sAgn2_1;44 return ((struct Agn2 )___ret__5sAgn2_1); 45 45 } 46 46 enum __attribute__ ((unused)) __anonymous1 { … … 114 114 ((void)((*___dst__R4sFdl_1).__f9__Pi_1=___src__4sFdl_1.__f9__Pi_1)); 115 115 ((void)___constructor__F_R4sFdl4sFdl_autogen___1((&___ret__4sFdl_1), ___src__4sFdl_1)); 116 return ___ret__4sFdl_1;116 return ((struct Fdl )___ret__4sFdl_1); 117 117 } 118 118 static inline void ___constructor__F_R4sFdli_autogen___1(struct Fdl *___dst__R4sFdl_1, signed int __f1__i_1){ … … 301 301 ((void)((*___dst__R13s__anonymous4_2).__i__i_2=___src__13s__anonymous4_2.__i__i_2)); 302 302 ((void)___constructor__F_R13s__anonymous413s__anonymous4_autogen___2((&___ret__13s__anonymous4_2), ___src__13s__anonymous4_2)); 303 return ___ret__13s__anonymous4_2;303 return ((struct __anonymous4 )___ret__13s__anonymous4_2); 304 304 } 305 305 inline void ___constructor__F_R13s__anonymous4i_autogen___2(struct __anonymous4 *___dst__R13s__anonymous4_2, signed int __i__i_2){ … … 320 320 enum __anonymous5 ___ret__13e__anonymous5_2; 321 321 ((void)(___ret__13e__anonymous5_2=((*___dst__R13e__anonymous5_2)=___src__13e__anonymous5_2)) /* ?{} */); 322 return ___ret__13e__anonymous5_2;322 return ((enum __anonymous5 )___ret__13e__anonymous5_2); 323 323 } 324 324 ((void)sizeof(enum __anonymous5 )); … … 350 350 struct Vad ___ret__4sVad_1; 351 351 ((void)___constructor__F_R4sVad4sVad_autogen___1((&___ret__4sVad_1), ___src__4sVad_1)); 352 return ___ret__4sVad_1;353 } 352 return ((struct Vad )___ret__4sVad_1); 353 } -
src/tests/.expect/64/declarationSpecifier.txt
rb10c621c rca278c1 33 33 ((void)((*___dst__R13s__anonymous0_1).__i__i_1=___src__13s__anonymous0_1.__i__i_1)); 34 34 ((void)___constructor__F_R13s__anonymous013s__anonymous0_autogen___1((&___ret__13s__anonymous0_1), ___src__13s__anonymous0_1)); 35 return ___ret__13s__anonymous0_1;35 return ((struct __anonymous0 )___ret__13s__anonymous0_1); 36 36 } 37 37 static inline void ___constructor__F_R13s__anonymous0i_autogen___1(struct __anonymous0 *___dst__R13s__anonymous0_1, signed int __i__i_1){ … … 59 59 ((void)((*___dst__R13s__anonymous1_1).__i__i_1=___src__13s__anonymous1_1.__i__i_1)); 60 60 ((void)___constructor__F_R13s__anonymous113s__anonymous1_autogen___1((&___ret__13s__anonymous1_1), ___src__13s__anonymous1_1)); 61 return ___ret__13s__anonymous1_1;61 return ((struct __anonymous1 )___ret__13s__anonymous1_1); 62 62 } 63 63 static inline void ___constructor__F_R13s__anonymous1i_autogen___1(struct __anonymous1 *___dst__R13s__anonymous1_1, signed int __i__i_1){ … … 85 85 ((void)((*___dst__R13s__anonymous2_1).__i__i_1=___src__13s__anonymous2_1.__i__i_1)); 86 86 ((void)___constructor__F_R13s__anonymous213s__anonymous2_autogen___1((&___ret__13s__anonymous2_1), ___src__13s__anonymous2_1)); 87 return ___ret__13s__anonymous2_1;87 return ((struct __anonymous2 )___ret__13s__anonymous2_1); 88 88 } 89 89 static inline void ___constructor__F_R13s__anonymous2i_autogen___1(struct __anonymous2 *___dst__R13s__anonymous2_1, signed int __i__i_1){ … … 111 111 ((void)((*___dst__R13s__anonymous3_1).__i__i_1=___src__13s__anonymous3_1.__i__i_1)); 112 112 ((void)___constructor__F_R13s__anonymous313s__anonymous3_autogen___1((&___ret__13s__anonymous3_1), ___src__13s__anonymous3_1)); 113 return ___ret__13s__anonymous3_1;113 return ((struct __anonymous3 )___ret__13s__anonymous3_1); 114 114 } 115 115 static inline void ___constructor__F_R13s__anonymous3i_autogen___1(struct __anonymous3 *___dst__R13s__anonymous3_1, signed int __i__i_1){ … … 137 137 ((void)((*___dst__R13s__anonymous4_1).__i__i_1=___src__13s__anonymous4_1.__i__i_1)); 138 138 ((void)___constructor__F_R13s__anonymous413s__anonymous4_autogen___1((&___ret__13s__anonymous4_1), ___src__13s__anonymous4_1)); 139 return ___ret__13s__anonymous4_1;139 return ((struct __anonymous4 )___ret__13s__anonymous4_1); 140 140 } 141 141 static inline void ___constructor__F_R13s__anonymous4i_autogen___1(struct __anonymous4 *___dst__R13s__anonymous4_1, signed int __i__i_1){ … … 163 163 ((void)((*___dst__R13s__anonymous5_1).__i__i_1=___src__13s__anonymous5_1.__i__i_1)); 164 164 ((void)___constructor__F_R13s__anonymous513s__anonymous5_autogen___1((&___ret__13s__anonymous5_1), ___src__13s__anonymous5_1)); 165 return ___ret__13s__anonymous5_1;165 return ((struct __anonymous5 )___ret__13s__anonymous5_1); 166 166 } 167 167 static inline void ___constructor__F_R13s__anonymous5i_autogen___1(struct __anonymous5 *___dst__R13s__anonymous5_1, signed int __i__i_1){ … … 189 189 ((void)((*___dst__R13s__anonymous6_1).__i__i_1=___src__13s__anonymous6_1.__i__i_1)); 190 190 ((void)___constructor__F_R13s__anonymous613s__anonymous6_autogen___1((&___ret__13s__anonymous6_1), ___src__13s__anonymous6_1)); 191 return ___ret__13s__anonymous6_1;191 return ((struct __anonymous6 )___ret__13s__anonymous6_1); 192 192 } 193 193 static inline void ___constructor__F_R13s__anonymous6i_autogen___1(struct __anonymous6 *___dst__R13s__anonymous6_1, signed int __i__i_1){ … … 215 215 ((void)((*___dst__R13s__anonymous7_1).__i__i_1=___src__13s__anonymous7_1.__i__i_1)); 216 216 ((void)___constructor__F_R13s__anonymous713s__anonymous7_autogen___1((&___ret__13s__anonymous7_1), ___src__13s__anonymous7_1)); 217 return ___ret__13s__anonymous7_1;217 return ((struct __anonymous7 )___ret__13s__anonymous7_1); 218 218 } 219 219 static inline void ___constructor__F_R13s__anonymous7i_autogen___1(struct __anonymous7 *___dst__R13s__anonymous7_1, signed int __i__i_1){ … … 249 249 ((void)((*___dst__R13s__anonymous8_1).__i__s_1=___src__13s__anonymous8_1.__i__s_1)); 250 250 ((void)___constructor__F_R13s__anonymous813s__anonymous8_autogen___1((&___ret__13s__anonymous8_1), ___src__13s__anonymous8_1)); 251 return ___ret__13s__anonymous8_1;251 return ((struct __anonymous8 )___ret__13s__anonymous8_1); 252 252 } 253 253 static inline void ___constructor__F_R13s__anonymous8s_autogen___1(struct __anonymous8 *___dst__R13s__anonymous8_1, signed short int __i__s_1){ … … 275 275 ((void)((*___dst__R13s__anonymous9_1).__i__s_1=___src__13s__anonymous9_1.__i__s_1)); 276 276 ((void)___constructor__F_R13s__anonymous913s__anonymous9_autogen___1((&___ret__13s__anonymous9_1), ___src__13s__anonymous9_1)); 277 return ___ret__13s__anonymous9_1;277 return ((struct __anonymous9 )___ret__13s__anonymous9_1); 278 278 } 279 279 static inline void ___constructor__F_R13s__anonymous9s_autogen___1(struct __anonymous9 *___dst__R13s__anonymous9_1, signed short int __i__s_1){ … … 301 301 ((void)((*___dst__R14s__anonymous10_1).__i__s_1=___src__14s__anonymous10_1.__i__s_1)); 302 302 ((void)___constructor__F_R14s__anonymous1014s__anonymous10_autogen___1((&___ret__14s__anonymous10_1), ___src__14s__anonymous10_1)); 303 return ___ret__14s__anonymous10_1;303 return ((struct __anonymous10 )___ret__14s__anonymous10_1); 304 304 } 305 305 static inline void ___constructor__F_R14s__anonymous10s_autogen___1(struct __anonymous10 *___dst__R14s__anonymous10_1, signed short int __i__s_1){ … … 327 327 ((void)((*___dst__R14s__anonymous11_1).__i__s_1=___src__14s__anonymous11_1.__i__s_1)); 328 328 ((void)___constructor__F_R14s__anonymous1114s__anonymous11_autogen___1((&___ret__14s__anonymous11_1), ___src__14s__anonymous11_1)); 329 return ___ret__14s__anonymous11_1;329 return ((struct __anonymous11 )___ret__14s__anonymous11_1); 330 330 } 331 331 static inline void ___constructor__F_R14s__anonymous11s_autogen___1(struct __anonymous11 *___dst__R14s__anonymous11_1, signed short int __i__s_1){ … … 353 353 ((void)((*___dst__R14s__anonymous12_1).__i__s_1=___src__14s__anonymous12_1.__i__s_1)); 354 354 ((void)___constructor__F_R14s__anonymous1214s__anonymous12_autogen___1((&___ret__14s__anonymous12_1), ___src__14s__anonymous12_1)); 355 return ___ret__14s__anonymous12_1;355 return ((struct __anonymous12 )___ret__14s__anonymous12_1); 356 356 } 357 357 static inline void ___constructor__F_R14s__anonymous12s_autogen___1(struct __anonymous12 *___dst__R14s__anonymous12_1, signed short int __i__s_1){ … … 379 379 ((void)((*___dst__R14s__anonymous13_1).__i__s_1=___src__14s__anonymous13_1.__i__s_1)); 380 380 ((void)___constructor__F_R14s__anonymous1314s__anonymous13_autogen___1((&___ret__14s__anonymous13_1), ___src__14s__anonymous13_1)); 381 return ___ret__14s__anonymous13_1;381 return ((struct __anonymous13 )___ret__14s__anonymous13_1); 382 382 } 383 383 static inline void ___constructor__F_R14s__anonymous13s_autogen___1(struct __anonymous13 *___dst__R14s__anonymous13_1, signed short int __i__s_1){ … … 405 405 ((void)((*___dst__R14s__anonymous14_1).__i__s_1=___src__14s__anonymous14_1.__i__s_1)); 406 406 ((void)___constructor__F_R14s__anonymous1414s__anonymous14_autogen___1((&___ret__14s__anonymous14_1), ___src__14s__anonymous14_1)); 407 return ___ret__14s__anonymous14_1;407 return ((struct __anonymous14 )___ret__14s__anonymous14_1); 408 408 } 409 409 static inline void ___constructor__F_R14s__anonymous14s_autogen___1(struct __anonymous14 *___dst__R14s__anonymous14_1, signed short int __i__s_1){ … … 431 431 ((void)((*___dst__R14s__anonymous15_1).__i__s_1=___src__14s__anonymous15_1.__i__s_1)); 432 432 ((void)___constructor__F_R14s__anonymous1514s__anonymous15_autogen___1((&___ret__14s__anonymous15_1), ___src__14s__anonymous15_1)); 433 return ___ret__14s__anonymous15_1;433 return ((struct __anonymous15 )___ret__14s__anonymous15_1); 434 434 } 435 435 static inline void ___constructor__F_R14s__anonymous15s_autogen___1(struct __anonymous15 *___dst__R14s__anonymous15_1, signed short int __i__s_1){ … … 473 473 ((void)((*___dst__R14s__anonymous16_1).__i__i_1=___src__14s__anonymous16_1.__i__i_1)); 474 474 ((void)___constructor__F_R14s__anonymous1614s__anonymous16_autogen___1((&___ret__14s__anonymous16_1), ___src__14s__anonymous16_1)); 475 return ___ret__14s__anonymous16_1;475 return ((struct __anonymous16 )___ret__14s__anonymous16_1); 476 476 } 477 477 static inline void ___constructor__F_R14s__anonymous16i_autogen___1(struct __anonymous16 *___dst__R14s__anonymous16_1, signed int __i__i_1){ … … 499 499 ((void)((*___dst__R14s__anonymous17_1).__i__i_1=___src__14s__anonymous17_1.__i__i_1)); 500 500 ((void)___constructor__F_R14s__anonymous1714s__anonymous17_autogen___1((&___ret__14s__anonymous17_1), ___src__14s__anonymous17_1)); 501 return ___ret__14s__anonymous17_1;501 return ((struct __anonymous17 )___ret__14s__anonymous17_1); 502 502 } 503 503 static inline void ___constructor__F_R14s__anonymous17i_autogen___1(struct __anonymous17 *___dst__R14s__anonymous17_1, signed int __i__i_1){ … … 525 525 ((void)((*___dst__R14s__anonymous18_1).__i__i_1=___src__14s__anonymous18_1.__i__i_1)); 526 526 ((void)___constructor__F_R14s__anonymous1814s__anonymous18_autogen___1((&___ret__14s__anonymous18_1), ___src__14s__anonymous18_1)); 527 return ___ret__14s__anonymous18_1;527 return ((struct __anonymous18 )___ret__14s__anonymous18_1); 528 528 } 529 529 static inline void ___constructor__F_R14s__anonymous18i_autogen___1(struct __anonymous18 *___dst__R14s__anonymous18_1, signed int __i__i_1){ … … 551 551 ((void)((*___dst__R14s__anonymous19_1).__i__i_1=___src__14s__anonymous19_1.__i__i_1)); 552 552 ((void)___constructor__F_R14s__anonymous1914s__anonymous19_autogen___1((&___ret__14s__anonymous19_1), ___src__14s__anonymous19_1)); 553 return ___ret__14s__anonymous19_1;553 return ((struct __anonymous19 )___ret__14s__anonymous19_1); 554 554 } 555 555 static inline void ___constructor__F_R14s__anonymous19i_autogen___1(struct __anonymous19 *___dst__R14s__anonymous19_1, signed int __i__i_1){ … … 577 577 ((void)((*___dst__R14s__anonymous20_1).__i__i_1=___src__14s__anonymous20_1.__i__i_1)); 578 578 ((void)___constructor__F_R14s__anonymous2014s__anonymous20_autogen___1((&___ret__14s__anonymous20_1), ___src__14s__anonymous20_1)); 579 return ___ret__14s__anonymous20_1;579 return ((struct __anonymous20 )___ret__14s__anonymous20_1); 580 580 } 581 581 static inline void ___constructor__F_R14s__anonymous20i_autogen___1(struct __anonymous20 *___dst__R14s__anonymous20_1, signed int __i__i_1){ … … 603 603 ((void)((*___dst__R14s__anonymous21_1).__i__i_1=___src__14s__anonymous21_1.__i__i_1)); 604 604 ((void)___constructor__F_R14s__anonymous2114s__anonymous21_autogen___1((&___ret__14s__anonymous21_1), ___src__14s__anonymous21_1)); 605 return ___ret__14s__anonymous21_1;605 return ((struct __anonymous21 )___ret__14s__anonymous21_1); 606 606 } 607 607 static inline void ___constructor__F_R14s__anonymous21i_autogen___1(struct __anonymous21 *___dst__R14s__anonymous21_1, signed int __i__i_1){ … … 629 629 ((void)((*___dst__R14s__anonymous22_1).__i__i_1=___src__14s__anonymous22_1.__i__i_1)); 630 630 ((void)___constructor__F_R14s__anonymous2214s__anonymous22_autogen___1((&___ret__14s__anonymous22_1), ___src__14s__anonymous22_1)); 631 return ___ret__14s__anonymous22_1;631 return ((struct __anonymous22 )___ret__14s__anonymous22_1); 632 632 } 633 633 static inline void ___constructor__F_R14s__anonymous22i_autogen___1(struct __anonymous22 *___dst__R14s__anonymous22_1, signed int __i__i_1){ … … 655 655 ((void)((*___dst__R14s__anonymous23_1).__i__i_1=___src__14s__anonymous23_1.__i__i_1)); 656 656 ((void)___constructor__F_R14s__anonymous2314s__anonymous23_autogen___1((&___ret__14s__anonymous23_1), ___src__14s__anonymous23_1)); 657 return ___ret__14s__anonymous23_1;657 return ((struct __anonymous23 )___ret__14s__anonymous23_1); 658 658 } 659 659 static inline void ___constructor__F_R14s__anonymous23i_autogen___1(struct __anonymous23 *___dst__R14s__anonymous23_1, signed int __i__i_1){ … … 672 672 __attribute__ ((unused)) signed int ___retval_main__i_1; 673 673 ((void)(___retval_main__i_1=((signed int )0)) /* ?{} */); 674 return ___retval_main__i_1;674 return ((signed int )___retval_main__i_1); 675 675 ((void)(___retval_main__i_1=0) /* ?{} */); 676 return ___retval_main__i_1;676 return ((signed int )___retval_main__i_1); 677 677 } 678 678 static inline int invoke_main(int argc, char* argv[], char* envp[]) { (void)argc; (void)argv; (void)envp; return __main__Fi_iPPCc__1(argc, argv); } … … 689 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 690 ((void)(_tmp_cp_ret0) /* ^?{} */); 691 return ___retval_main__i_1;692 } 691 return ((signed int )___retval_main__i_1); 692 } -
src/tests/.expect/64/extension.txt
rb10c621c rca278c1 38 38 ((void)((*___dst__R2sS_1).__c__i_1=___src__2sS_1.__c__i_1)); 39 39 ((void)___constructor__F_R2sS2sS_autogen___1((&___ret__2sS_1), ___src__2sS_1)); 40 return ___ret__2sS_1;40 return ((struct S )___ret__2sS_1); 41 41 } 42 42 static inline void ___constructor__F_R2sSi_autogen___1(struct S *___dst__R2sS_1, signed int __a__i_1){ … … 71 71 ((void)__builtin_memcpy(((void *)___dst__R2uU_1), ((const void *)(&___src__2uU_1)), sizeof(union U ))); 72 72 ((void)___constructor__F_R2uU2uU_autogen___1((&___ret__2uU_1), ___src__2uU_1)); 73 return ___ret__2uU_1;73 return ((union U )___ret__2uU_1); 74 74 } 75 75 static inline void ___constructor__F_R2uUi_autogen___1(__attribute__ ((unused)) union U *___dst__R2uU_1, signed int __src__i_1){ -
src/tests/.expect/64/gccExtensions.txt
rb10c621c rca278c1 64 64 ((void)((*___dst__R2sS_2).__c__i_2=___src__2sS_2.__c__i_2)); 65 65 ((void)___constructor__F_R2sS2sS_autogen___2((&___ret__2sS_2), ___src__2sS_2)); 66 return ___ret__2sS_2;66 return ((struct S )___ret__2sS_2); 67 67 } 68 68 inline void ___constructor__F_R2sSi_autogen___2(struct S *___dst__R2sS_2, signed int __a__i_2){ … … 114 114 ((void)((*___dst__R3ss2_2).__i__i_2=___src__3ss2_2.__i__i_2)); 115 115 ((void)___constructor__F_R3ss23ss2_autogen___2((&___ret__3ss2_2), ___src__3ss2_2)); 116 return ___ret__3ss2_2;116 return ((struct s2 )___ret__3ss2_2); 117 117 } 118 118 inline void ___constructor__F_R3ss2i_autogen___2(struct s2 *___dst__R3ss2_2, signed int __i__i_2){ … … 135 135 ((void)((*___dst__R3ss3_2).__i__i_2=___src__3ss3_2.__i__i_2)); 136 136 ((void)___constructor__F_R3ss33ss3_autogen___2((&___ret__3ss3_2), ___src__3ss3_2)); 137 return ___ret__3ss3_2;137 return ((struct s3 )___ret__3ss3_2); 138 138 } 139 139 inline void ___constructor__F_R3ss3i_autogen___2(struct s3 *___dst__R3ss3_2, signed int __i__i_2){ … … 158 158 ((void)((*___dst__R3ss4_2).__i__i_2=___src__3ss4_2.__i__i_2)); 159 159 ((void)___constructor__F_R3ss43ss4_autogen___2((&___ret__3ss4_2), ___src__3ss4_2)); 160 return ___ret__3ss4_2;160 return ((struct s4 )___ret__3ss4_2); 161 161 } 162 162 inline void ___constructor__F_R3ss4i_autogen___2(struct s4 *___dst__R3ss4_2, signed int __i__i_2){ … … 169 169 signed int __m3__A0A0i_2[((unsigned long int )10)][((unsigned long int )10)]; 170 170 ((void)(___retval_main__i_1=((signed int )0)) /* ?{} */); 171 return ___retval_main__i_1;171 return ((signed int )___retval_main__i_1); 172 172 ((void)(___retval_main__i_1=0) /* ?{} */); 173 return ___retval_main__i_1;173 return ((signed int )___retval_main__i_1); 174 174 } 175 175 static inline int invoke_main(int argc, char* argv[], char* envp[]) { (void)argc; (void)argv; (void)envp; return __main__Fi_iPPCc__1(argc, argv); } … … 186 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 187 ((void)(_tmp_cp_ret0) /* ^?{} */); 188 return ___retval_main__i_1;188 return ((signed int )___retval_main__i_1); 189 189 } -
src/tests/.expect/64/literals.txt
rb10c621c rca278c1 77 77 ((void)((*___dst__R16s_Istream_cstrUC_1).__s__Pc_1=___src__16s_Istream_cstrUC_1.__s__Pc_1)); 78 78 ((void)___constructor__F_R16s_Istream_cstrUC16s_Istream_cstrUC_autogen___1((&___ret__16s_Istream_cstrUC_1), ___src__16s_Istream_cstrUC_1)); 79 return ___ret__16s_Istream_cstrUC_1;79 return ((struct _Istream_cstrUC )___ret__16s_Istream_cstrUC_1); 80 80 } 81 81 static inline void ___constructor__F_R16s_Istream_cstrUCPc_autogen___1(struct _Istream_cstrUC *___dst__R16s_Istream_cstrUC_1, char *__s__Pc_1){ … … 109 109 ((void)((*___dst__R15s_Istream_cstrC_1).__size__i_1=___src__15s_Istream_cstrC_1.__size__i_1)); 110 110 ((void)___constructor__F_R15s_Istream_cstrC15s_Istream_cstrC_autogen___1((&___ret__15s_Istream_cstrC_1), ___src__15s_Istream_cstrC_1)); 111 return ___ret__15s_Istream_cstrC_1;111 return ((struct _Istream_cstrC )___ret__15s_Istream_cstrC_1); 112 112 } 113 113 static inline void ___constructor__F_R15s_Istream_cstrCPc_autogen___1(struct _Istream_cstrC *___dst__R15s_Istream_cstrC_1, char *__s__Pc_1){ … … 230 230 231 231 ((void)___constructor__F_R9sofstream9sofstream_autogen___1((&___ret__9sofstream_1), ___src__9sofstream_1)); 232 return ___ret__9sofstream_1;232 return ((struct ofstream )___ret__9sofstream_1); 233 233 } 234 234 static inline void ___constructor__F_R9sofstreamPv_autogen___1(struct ofstream *___dst__R9sofstream_1, void *__file__Pv_1){ … … 437 437 ((void)((*___dst__R9sifstream_1).__file__Pv_1=___src__9sifstream_1.__file__Pv_1)); 438 438 ((void)___constructor__F_R9sifstream9sifstream_autogen___1((&___ret__9sifstream_1), ___src__9sifstream_1)); 439 return ___ret__9sifstream_1;439 return ((struct ifstream )___ret__9sifstream_1); 440 440 } 441 441 static inline void ___constructor__F_R9sifstreamPv_autogen___1(struct ifstream *___dst__R9sifstream_1, void *__file__Pv_1){ … … 1363 1363 ((void)L"a" "b" "c"); 1364 1364 ((void)(___retval_main__i_1=0) /* ?{} */); 1365 return ___retval_main__i_1;1365 return ((signed int )___retval_main__i_1); 1366 1366 } 1367 1367 static inline int invoke_main(int argc, char* argv[], char* envp[]) { (void)argc; (void)argv; (void)envp; return __main__Fi___1(); } … … 1378 1378 ((void)(___retval_main__i_1=(((void)(_tmp_cp_ret0=invoke_main(__argc__i_1, __argv__PPc_1, __envp__PPc_1))) , _tmp_cp_ret0)) /* ?{} */); 1379 1379 ((void)(_tmp_cp_ret0) /* ^?{} */); 1380 return ___retval_main__i_1;1381 } 1380 return ((signed int )___retval_main__i_1); 1381 } -
src/tests/.expect/references.txt
rb10c621c rca278c1 2 2 12 12 1 3 3 12 12 1 1 4 13 1 125 14 146 4 Default constructing a Y 7 5 Copy constructing a Y -
src/tests/Makefile.am
rb10c621c rca278c1 11 11 ## Created On : Sun May 31 09:08:15 2015 12 12 ## Last Modified By : Peter A. Buhr 13 ## Last Modified On : Tue Oct 10 14:04:40201714 ## Update Count : 4 713 ## Last Modified On : Mon Sep 11 16:17:16 2017 14 ## Update Count : 45 15 15 ############################################################################### 16 16 … … 22 22 concurrent = yes 23 23 quick_test += coroutine thread monitor 24 concurrent_test = \ 25 coroutine \ 26 fmtLines \ 27 pingpong \ 28 prodcons \ 29 thread \ 30 matrixSum \ 31 monitor \ 32 multi-monitor \ 33 boundedBuffer \ 34 preempt \ 35 sched-int-block \ 36 sched-int-disjoint \ 37 sched-int-wait \ 38 sched-ext-barge \ 39 sched-ext-dtor \ 40 sched-ext-else \ 41 sched-ext-parse \ 42 sched-ext-recurse \ 43 sched-ext-statment \ 24 concurrent_test = \ 25 coroutine \ 26 thread \ 27 monitor \ 28 multi-monitor \ 29 preempt \ 30 sched-int-block \ 31 sched-int-disjoint \ 32 sched-int-wait \ 33 sched-ext-barge \ 34 sched-ext-dtor \ 35 sched-ext-else \ 36 sched-ext-parse \ 37 sched-ext-recurse \ 38 sched-ext-statment \ 44 39 sched-ext-when 40 45 41 else 46 42 concurrent=no -
src/tests/Makefile.in
rb10c621c rca278c1 321 321 @BUILD_CONCURRENCY_FALSE@concurrent_test = 322 322 @BUILD_CONCURRENCY_TRUE@concurrent_test = \ 323 @BUILD_CONCURRENCY_TRUE@ coroutine \ 324 @BUILD_CONCURRENCY_TRUE@ fmtLines \ 325 @BUILD_CONCURRENCY_TRUE@ pingpong \ 326 @BUILD_CONCURRENCY_TRUE@ prodcons \ 327 @BUILD_CONCURRENCY_TRUE@ thread \ 328 @BUILD_CONCURRENCY_TRUE@ matrixSum \ 329 @BUILD_CONCURRENCY_TRUE@ monitor \ 330 @BUILD_CONCURRENCY_TRUE@ multi-monitor \ 331 @BUILD_CONCURRENCY_TRUE@ boundedBuffer \ 332 @BUILD_CONCURRENCY_TRUE@ preempt \ 333 @BUILD_CONCURRENCY_TRUE@ sched-int-block \ 334 @BUILD_CONCURRENCY_TRUE@ sched-int-disjoint \ 335 @BUILD_CONCURRENCY_TRUE@ sched-int-wait \ 336 @BUILD_CONCURRENCY_TRUE@ sched-ext-barge \ 337 @BUILD_CONCURRENCY_TRUE@ sched-ext-dtor \ 338 @BUILD_CONCURRENCY_TRUE@ sched-ext-else \ 339 @BUILD_CONCURRENCY_TRUE@ sched-ext-parse \ 340 @BUILD_CONCURRENCY_TRUE@ sched-ext-recurse \ 341 @BUILD_CONCURRENCY_TRUE@ sched-ext-statment \ 323 @BUILD_CONCURRENCY_TRUE@ coroutine \ 324 @BUILD_CONCURRENCY_TRUE@ thread \ 325 @BUILD_CONCURRENCY_TRUE@ monitor \ 326 @BUILD_CONCURRENCY_TRUE@ multi-monitor \ 327 @BUILD_CONCURRENCY_TRUE@ preempt \ 328 @BUILD_CONCURRENCY_TRUE@ sched-int-block \ 329 @BUILD_CONCURRENCY_TRUE@ sched-int-disjoint \ 330 @BUILD_CONCURRENCY_TRUE@ sched-int-wait \ 331 @BUILD_CONCURRENCY_TRUE@ sched-ext-barge \ 332 @BUILD_CONCURRENCY_TRUE@ sched-ext-dtor \ 333 @BUILD_CONCURRENCY_TRUE@ sched-ext-else \ 334 @BUILD_CONCURRENCY_TRUE@ sched-ext-parse \ 335 @BUILD_CONCURRENCY_TRUE@ sched-ext-recurse \ 336 @BUILD_CONCURRENCY_TRUE@ sched-ext-statment \ 342 337 @BUILD_CONCURRENCY_TRUE@ sched-ext-when 343 338 -
src/tests/references.c
rb10c621c rca278c1 37 37 int * toptr( int & r ) { return &r; } 38 38 39 void changeRef( int & r ) {40 r++;41 }42 43 39 int main() { 44 40 int x = 123456, *p1 = &x, **p2 = &p1, ***p3 = &p2, … … 47 43 **p3 = &x; // change p1 48 44 *p3 = &p1; // change p2 49 int y = 0, z = 11, & ar[3] = { x, y, z }; // initialize array of references45 int y, z, & ar[3] = { x, y, z }; // initialize array of references 50 46 51 47 // test that basic reference properties are true - r1 should be an alias for x … … 56 52 // test that functions using basic references work 57 53 printf("%d %d %d %d\n", toref(&x), toref(p1), toptr(r1) == toptr(x), toptr(r1) == &x); 58 59 changeRef( x );60 changeRef( y );61 changeRef( z );62 printf("%d %d %d\n", x, y, z);63 changeRef( r1 );64 printf("%d %d\n", r1, x);65 54 66 55 // test that reference members are not implicitly constructed/destructed/assigned
Note:
See TracChangeset
for help on using the changeset viewer.