- Timestamp:
- Sep 4, 2016, 3:25:32 PM (8 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- b16898e
- Parents:
- 85517ddb
- Location:
- src
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Common/utility.h
r85517ddb r1ba88a0 261 261 262 262 template< typename T > 263 struct ReverseIter{263 struct reverseIterate_t { 264 264 T& ref; 265 265 266 ReverseIter( T & ref ) : ref(ref) {}266 reverseIterate_t( T & ref ) : ref(ref) {} 267 267 268 268 typedef typename T::reverse_iterator iterator; … … 272 272 273 273 template< typename T > 274 ReverseIter< T > ReverseIterate( T & ref ) {275 return ReverseIter< T >( ref );274 reverseIterate_t< T > reverseIterate( T & ref ) { 275 return reverseIterate_t< T >( ref ); 276 276 } 277 277 -
src/GenPoly/Box.cc
r85517ddb r1ba88a0 158 158 class PolyGenericCalculator : public PolyMutator { 159 159 public: 160 typedef PolyMutator Parent; 161 using Parent::mutate; 162 160 163 template< typename DeclClass > 161 164 DeclClass *handleDecl( DeclClass *decl, Type *type ); … … 1675 1678 DeclClass * PolyGenericCalculator::handleDecl( DeclClass *decl, Type *type ) { 1676 1679 beginTypeScope( type ); 1680 // knownLayouts.beginScope(); 1681 // knownOffsets.beginScope(); 1682 1683 DeclClass *ret = static_cast< DeclClass *>( Parent::mutate( decl ) ); 1684 1685 // knownOffsets.endScope(); 1686 // knownLayouts.endScope(); 1687 endTypeScope(); 1688 return ret; 1689 } 1690 1691 ObjectDecl * PolyGenericCalculator::mutate( ObjectDecl *objectDecl ) { 1692 return handleDecl( objectDecl, objectDecl->get_type() ); 1693 } 1694 1695 DeclarationWithType * PolyGenericCalculator::mutate( FunctionDecl *functionDecl ) { 1677 1696 knownLayouts.beginScope(); 1678 1697 knownOffsets.beginScope(); 1679 1698 1680 DeclClass *ret = static_cast< DeclClass *>( Mutator::mutate( decl ) ); 1681 1699 DeclarationWithType * decl = handleDecl( functionDecl, functionDecl->get_functionType() ); 1682 1700 knownOffsets.endScope(); 1683 1701 knownLayouts.endScope(); 1684 endTypeScope(); 1685 return ret; 1686 } 1687 1688 ObjectDecl * PolyGenericCalculator::mutate( ObjectDecl *objectDecl ) { 1689 return handleDecl( objectDecl, objectDecl->get_type() ); 1690 } 1691 1692 DeclarationWithType * PolyGenericCalculator::mutate( FunctionDecl *functionDecl ) { 1693 return handleDecl( functionDecl, functionDecl->get_functionType() ); 1702 return decl; 1694 1703 } 1695 1704 … … 1700 1709 TypeDecl * PolyGenericCalculator::mutate( TypeDecl *typeDecl ) { 1701 1710 scopeTyVars[ typeDecl->get_name() ] = typeDecl->get_kind(); 1702 return Mutator::mutate( typeDecl );1711 return Parent::mutate( typeDecl ); 1703 1712 } 1704 1713 … … 1706 1715 beginTypeScope( pointerType ); 1707 1716 1708 Type *ret = Mutator::mutate( pointerType );1717 Type *ret = Parent::mutate( pointerType ); 1709 1718 1710 1719 endTypeScope(); … … 1724 1733 } 1725 1734 1726 Type *ret = Mutator::mutate( funcType );1735 Type *ret = Parent::mutate( funcType ); 1727 1736 1728 1737 endTypeScope(); … … 1745 1754 } 1746 1755 } 1747 return Mutator::mutate( declStmt );1756 return Parent::mutate( declStmt ); 1748 1757 } 1749 1758 … … 1787 1796 Expression *PolyGenericCalculator::mutate( MemberExpr *memberExpr ) { 1788 1797 // mutate, exiting early if no longer MemberExpr 1789 Expression *expr = Mutator::mutate( memberExpr );1798 Expression *expr = Parent::mutate( memberExpr ); 1790 1799 memberExpr = dynamic_cast< MemberExpr* >( expr ); 1791 1800 if ( ! memberExpr ) return expr; … … 1972 1981 Expression *PolyGenericCalculator::mutate( OffsetofExpr *offsetofExpr ) { 1973 1982 // mutate, exiting early if no longer OffsetofExpr 1974 Expression *expr = Mutator::mutate( offsetofExpr );1983 Expression *expr = Parent::mutate( offsetofExpr ); 1975 1984 offsetofExpr = dynamic_cast< OffsetofExpr* >( expr ); 1976 1985 if ( ! offsetofExpr ) return expr; -
src/GenPoly/PolyMutator.h
r85517ddb r1ba88a0 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // PolyMutator.h -- 7 // PolyMutator.h -- 8 8 // 9 9 // Author : Richard C. Bilson … … 30 30 class PolyMutator : public Mutator { 31 31 public: 32 typedef Mutator Parent; 33 using Parent::mutate; 34 32 35 PolyMutator(); 33 36 … … 42 45 virtual Statement* mutate(ExprStmt *catchStmt); 43 46 virtual Statement* mutate(ReturnStmt *catchStmt); 44 47 45 48 virtual Expression* mutate(UntypedExpr *untypedExpr); 46 49 … … 54 57 Statement* mutateStatement( Statement *stmt ); 55 58 Expression* mutateExpression( Expression *expr ); 56 59 57 60 TyVarMap scopeTyVars; 58 61 TypeSubstitution *env; … … 60 63 std::list< Statement* > stmtsToAddAfter; 61 64 }; 62 } // namespace 65 } // namespace 63 66 64 67 #endif // _POLYMUTATOR_H -
src/InitTweak/FixInit.cc
r85517ddb r1ba88a0 787 787 // need to iterate through members in reverse in order for 788 788 // ctor/dtor statements to come out in the right order 789 for ( Declaration * member : ReverseIterate( structDecl->get_members() ) ) {789 for ( Declaration * member : reverseIterate( structDecl->get_members() ) ) { 790 790 DeclarationWithType * field = dynamic_cast< DeclarationWithType * >( member ); 791 791 // skip non-DWT members -
src/InitTweak/GenInit.cc
r85517ddb r1ba88a0 25 25 #include "SynTree/Mutator.h" 26 26 #include "SymTab/Autogen.h" 27 #include "SymTab/Mangler.h" 27 28 #include "GenPoly/PolyMutator.h" 28 29 #include "GenPoly/DeclMutator.h" 30 #include "GenPoly/ScopedSet.h" 29 31 30 32 namespace InitTweak { … … 55 57 class CtorDtor : public GenPoly::PolyMutator { 56 58 public: 59 typedef GenPoly::PolyMutator Parent; 60 using Parent::mutate; 57 61 /// create constructor and destructor statements for object declarations. 58 62 /// the actual call statements will be added in after the resolver has run … … 65 69 // should not traverse into any of these declarations to find objects 66 70 // that need to be constructed or destructed 67 virtual Declaration* mutate( StructDecl *aggregateDecl ) { return aggregateDecl; }71 virtual Declaration* mutate( StructDecl *aggregateDecl ); 68 72 virtual Declaration* mutate( UnionDecl *aggregateDecl ) { return aggregateDecl; } 69 73 virtual Declaration* mutate( EnumDecl *aggregateDecl ) { return aggregateDecl; } … … 74 78 virtual Type * mutate( FunctionType *funcType ) { return funcType; } 75 79 76 protected: 80 virtual CompoundStmt * mutate( CompoundStmt * compoundStmt ); 81 82 private: 83 // set of mangled type names for which a constructor or destructor exists in the current scope. 84 // these types require a ConstructorInit node to be generated, anything else is a POD type and thus 85 // should not have a ConstructorInit generated. 86 87 bool isManaged( ObjectDecl * objDecl ) const ; // determine if object is managed 88 void handleDWT( DeclarationWithType * dwt ); // add type to managed if ctor/dtor 89 GenPoly::ScopedSet< std::string > managedTypes; 90 bool inFunction = false; 77 91 }; 78 92 … … 142 156 143 157 DeclarationWithType* ReturnFixer::mutate( FunctionDecl *functionDecl ) { 144 std::list<DeclarationWithType*> oldReturnVals = returnVals;145 std::string oldFuncName = funcName;158 ValueGuard< std::list<DeclarationWithType*> > oldReturnVals( returnVals ); 159 ValueGuard< std::string > oldFuncName( funcName ); 146 160 147 161 FunctionType * type = functionDecl->get_functionType(); … … 149 163 funcName = functionDecl->get_name(); 150 164 DeclarationWithType * decl = Mutator::mutate( functionDecl ); 151 returnVals = oldReturnVals;152 funcName = oldFuncName;153 165 return decl; 154 166 } … … 197 209 198 210 DeclarationWithType * HoistArrayDimension::mutate( FunctionDecl *functionDecl ) { 199 bool oldInFunc = inFunction;211 ValueGuard< bool > oldInFunc( inFunction ); 200 212 inFunction = true; 201 213 DeclarationWithType * decl = Parent::mutate( functionDecl ); 202 inFunction = oldInFunc;203 214 return decl; 204 215 } … … 209 220 } 210 221 222 bool CtorDtor::isManaged( ObjectDecl * objDecl ) const { 223 Type * type = objDecl->get_type(); 224 while ( ArrayType * at = dynamic_cast< ArrayType * >( type ) ) { 225 type = at->get_base(); 226 } 227 return managedTypes.find( SymTab::Mangler::mangle( type ) ) != managedTypes.end(); 228 } 229 230 void CtorDtor::handleDWT( DeclarationWithType * dwt ) { 231 // if this function is a user-defined constructor or destructor, mark down the type as "managed" 232 if ( ! LinkageSpec::isOverridable( dwt->get_linkage() ) && isCtorDtor( dwt->get_name() ) ) { 233 std::list< DeclarationWithType * > & params = GenPoly::getFunctionType( dwt->get_type() )->get_parameters(); 234 assert( ! params.empty() ); 235 PointerType * type = safe_dynamic_cast< PointerType * >( params.front()->get_type() ); 236 managedTypes.insert( SymTab::Mangler::mangle( type->get_base() ) ); 237 } 238 } 239 211 240 DeclarationWithType * CtorDtor::mutate( ObjectDecl * objDecl ) { 212 // hands off if designated, if @=, or if extern 213 if ( tryConstruct( objDecl ) ) { 241 handleDWT( objDecl ); 242 // hands off if @=, extern, builtin, etc. 243 // if global but initializer is not constexpr, always try to construct, since this is not legal C 244 if ( ( tryConstruct( objDecl ) && isManaged( objDecl ) ) || (! inFunction && ! isConstExpr( objDecl->get_init() ) ) ) { 245 // constructed objects cannot be designated 246 if ( isDesignated( objDecl->get_init() ) ) throw SemanticError( "Cannot include designations in the initializer for a managed Object. If this is really what you want, then initialize with @=.", objDecl ); 247 // xxx - constructed objects should not have initializers nested too deeply 248 214 249 // call into genImplicitCall from Autogen.h to generate calls to ctor/dtor 215 250 // for each constructable object … … 241 276 } 242 277 } 243 return Mutator::mutate( objDecl );278 return Parent::mutate( objDecl ); 244 279 } 245 280 246 281 DeclarationWithType * CtorDtor::mutate( FunctionDecl *functionDecl ) { 282 ValueGuard< bool > oldInFunc = inFunction; 283 inFunction = true; 284 285 handleDWT( functionDecl ); 286 287 managedTypes.beginScope(); 288 // go through assertions and recursively add seen ctor/dtors 289 for ( TypeDecl * tyDecl : functionDecl->get_functionType()->get_forall() ) { 290 for ( DeclarationWithType *& assertion : tyDecl->get_assertions() ) { 291 assertion = assertion->acceptMutator( *this ); 292 } 293 } 247 294 // parameters should not be constructed and destructed, so don't mutate FunctionType 248 295 mutateAll( functionDecl->get_oldDecls(), *this ); 249 296 functionDecl->set_statements( maybeMutate( functionDecl->get_statements(), *this ) ); 297 298 managedTypes.endScope(); 250 299 return functionDecl; 251 300 } 301 302 Declaration* CtorDtor::mutate( StructDecl *aggregateDecl ) { 303 // don't construct members, but need to take note if there is a managed member, 304 // because that means that this type is also managed 305 for ( Declaration * member : aggregateDecl->get_members() ) { 306 if ( ObjectDecl * field = dynamic_cast< ObjectDecl * >( member ) ) { 307 if ( isManaged( field ) ) { 308 managedTypes.insert( SymTab::Mangler::mangle( aggregateDecl ) ); 309 break; 310 } 311 } 312 } 313 return aggregateDecl; 314 } 315 316 CompoundStmt * CtorDtor::mutate( CompoundStmt * compoundStmt ) { 317 managedTypes.beginScope(); 318 CompoundStmt * stmt = Parent::mutate( compoundStmt ); 319 managedTypes.endScope(); 320 return stmt; 321 } 322 252 323 } // namespace InitTweak 253 324 -
src/InitTweak/InitTweak.cc
r85517ddb r1ba88a0 232 232 return ! LinkageSpec::isBuiltin( objDecl->get_linkage() ) && 233 233 (objDecl->get_init() == NULL || 234 ( objDecl->get_init() != NULL && objDecl->get_init()->get_maybeConstructed() )) && 235 ! isDesignated( objDecl->get_init() ) 234 ( objDecl->get_init() != NULL && objDecl->get_init()->get_maybeConstructed() )) 236 235 && objDecl->get_storageClass() != DeclarationNode::Extern; 237 236 } … … 391 390 virtual void visit( ApplicationExpr *applicationExpr ) { isConstExpr = false; } 392 391 virtual void visit( UntypedExpr *untypedExpr ) { isConstExpr = false; } 393 virtual void visit( NameExpr *nameExpr ) { isConstExpr = false; } 394 virtual void visit( CastExpr *castExpr ) { isConstExpr = false; } 392 virtual void visit( NameExpr *nameExpr ) { 393 // xxx - temporary hack, because 0 and 1 really should be constexprs, even though they technically aren't in Cforall today 394 if ( nameExpr->get_name() != "0" && nameExpr->get_name() != "1" ) isConstExpr = false; 395 } 396 // virtual void visit( CastExpr *castExpr ) { isConstExpr = false; } 397 virtual void visit( AddressExpr *addressExpr ) { 398 // address of a variable or member expression is constexpr 399 Expression * arg = addressExpr->get_arg(); 400 if ( ! dynamic_cast< NameExpr * >( arg) && ! dynamic_cast< VariableExpr * >( arg ) && ! dynamic_cast< MemberExpr * >( arg ) && ! dynamic_cast< UntypedMemberExpr * >( arg ) ) isConstExpr = false; 401 } 395 402 virtual void visit( LabelAddressExpr *labAddressExpr ) { isConstExpr = false; } 396 403 virtual void visit( UntypedMemberExpr *memberExpr ) { isConstExpr = false; } 397 404 virtual void visit( MemberExpr *memberExpr ) { isConstExpr = false; } 398 405 virtual void visit( VariableExpr *variableExpr ) { isConstExpr = false; } 399 virtual void visit( ConstantExpr *constantExpr ) { /* bottom out */ }400 406 // these might be okay? 401 407 // virtual void visit( SizeofExpr *sizeofExpr ); -
src/ResolvExpr/Resolver.cc
r85517ddb r1ba88a0 528 528 529 529 void Resolver::visit( ConstructorInit *ctorInit ) { 530 try { 531 maybeAccept( ctorInit->get_ctor(), *this ); 532 maybeAccept( ctorInit->get_dtor(), *this ); 533 } catch ( SemanticError ) { 534 // no alternatives for the constructor initializer - fallback on C-style initializer 535 // xxx - not sure if this makes a ton of sense - should maybe never be able to have this situation? 536 fallbackInit( ctorInit ); 537 return; 538 } 530 // xxx - fallback init has been removed => remove fallbackInit function and remove complexity from FixInit and remove C-init from ConstructorInit 531 maybeAccept( ctorInit->get_ctor(), *this ); 532 maybeAccept( ctorInit->get_dtor(), *this ); 539 533 540 534 // found a constructor - can get rid of C-style initializer -
src/SymTab/Indexer.cc
r85517ddb r1ba88a0 21 21 #include <unordered_set> 22 22 #include <utility> 23 #include <algorithm> 23 24 24 25 #include "Mangler.h" … … 33 34 #include "SynTree/Initializer.h" 34 35 #include "SynTree/Statement.h" 36 37 #include "InitTweak/InitTweak.h" 35 38 36 39 #define debugPrint(x) if ( doDebug ) { std::cout << x; } … … 99 102 100 103 if ( --toFree->refCount == 0 ) delete toFree; 104 } 105 106 void Indexer::removeSpecialOverrides( const std::string &id, std::list< DeclarationWithType * > & out ) const { 107 // only need to perform this step for constructors and destructors 108 if ( ! InitTweak::isCtorDtor( id ) ) return; 109 110 // helpful data structure 111 struct ValueType { 112 struct DeclBall { 113 FunctionDecl * decl; 114 bool isUserDefinedFunc; // properties for this particular decl 115 bool isDefaultFunc; 116 bool isCopyFunc; 117 }; 118 // properties for this type 119 bool userDefinedFunc = false; // any user defined function found 120 bool userDefinedDefaultFunc = false; // user defined default ctor found 121 bool userDefinedCopyFunc = false; // user defined copy ctor found 122 std::list< DeclBall > decls; 123 124 // another FunctionDecl for the current type was found - determine 125 // if it has special properties and update data structure accordingly 126 ValueType & operator+=( FunctionDecl * function ) { 127 bool isUserDefinedFunc = ! LinkageSpec::isOverridable( function->get_linkage() ); 128 bool isDefaultFunc = function->get_functionType()->get_parameters().size() == 1; 129 bool isCopyFunc = InitTweak::isCopyConstructor( function ); 130 decls.push_back( DeclBall{ function, isUserDefinedFunc, isDefaultFunc, isCopyFunc } ); 131 userDefinedFunc = userDefinedFunc || isUserDefinedFunc; 132 userDefinedDefaultFunc = userDefinedDefaultFunc || (isUserDefinedFunc && isDefaultFunc); 133 userDefinedCopyFunc = userDefinedCopyFunc || (isUserDefinedFunc && isCopyFunc); 134 return *this; 135 } 136 }; // ValueType 137 138 std::list< DeclarationWithType * > copy; 139 copy.splice( copy.end(), out ); 140 141 // organize discovered declarations by type 142 std::unordered_map< std::string, ValueType > funcMap; 143 for ( DeclarationWithType * decl : copy ) { 144 if ( FunctionDecl * function = dynamic_cast< FunctionDecl * >( decl ) ) { 145 std::list< DeclarationWithType * > params = function->get_functionType()->get_parameters(); 146 assert( ! params.empty() ); 147 funcMap[ Mangler::mangle( params.front()->get_type() ) ] += function; 148 } else { 149 out.push_back( decl ); 150 } 151 } 152 153 // if a type contains user defined ctor/dtors, then special rules trigger, which determine 154 // the set of ctor/dtors that are seen by the requester. In particular, if the user defines 155 // a default ctor, then the generated default ctor should never be seen, likewise for copy ctor 156 // and dtor. If the user defines any ctor/dtor, then no generated field ctors should be seen. 157 for ( std::pair< const std::string, ValueType > & pair : funcMap ) { 158 ValueType & val = pair.second; 159 for ( ValueType::DeclBall ball : val.decls ) { 160 if ( ! val.userDefinedFunc || ball.isUserDefinedFunc || (! val.userDefinedDefaultFunc && ball.isDefaultFunc) || (! val.userDefinedCopyFunc && ball.isCopyFunc) ) { 161 // decl conforms to the rules described above, so it should be seen by the requester 162 out.push_back( ball.decl ); 163 } 164 } 165 } 101 166 } 102 167 … … 461 526 searchTables = searchTables->base.tables; 462 527 } 528 529 // some special functions, e.g. constructors and destructors 530 // remove autogenerated functions when they are defined so that 531 // they can never be matched 532 removeSpecialOverrides( id, out ); 463 533 } 464 534 -
src/SymTab/Indexer.h
r85517ddb r1ba88a0 128 128 static void deleteRef( Impl *toFree ); 129 129 130 // Removes matching autogenerated constructors and destructors 131 // so that they will not be selected 132 // void removeSpecialOverrides( FunctionDecl *decl ); 133 void removeSpecialOverrides( const std::string &id, std::list< DeclarationWithType * > & out ) const; 134 130 135 /// Ensures that tables variable is writable (i.e. allocated, uniquely owned by this Indexer, and at the current scope) 131 136 void makeWritable(); -
src/tests/.expect/64/declarationSpecifier.txt
r85517ddb r1ba88a0 530 530 return ((int )_retVal0); 531 531 } 532 __attribute__ ((constructor(),)) static void _init_declarationSpecifier(void){533 ((void)___constructor__F_P13s__anonymous0_autogen___1(((struct __anonymous0 *)(&__x10__CV13s__anonymous0_1))));534 ((void)___constructor__F_P13s__anonymous1_autogen___1(((struct __anonymous1 *)(&__x11__CV13s__anonymous1_1))));535 ((void)___constructor__F_P13s__anonymous2_autogen___1(((struct __anonymous2 *)(&__x12__CV13s__anonymous2_1))));536 ((void)___constructor__F_P13s__anonymous3_autogen___1(((struct __anonymous3 *)(&__x13__CV13s__anonymous3_1))));537 ((void)___constructor__F_P13s__anonymous4_autogen___1(((struct __anonymous4 *)(&__x14__CV13s__anonymous4_1))));538 ((void)___constructor__F_P13s__anonymous5_autogen___1(((struct __anonymous5 *)(&__x15__CV13s__anonymous5_1))));539 ((void)___constructor__F_P13s__anonymous6_autogen___1(((struct __anonymous6 *)(&__x16__CV13s__anonymous6_1))));540 ((void)___constructor__F_P13s__anonymous7_autogen___1(((struct __anonymous7 *)(&__x17__CV13s__anonymous7_1))));541 ((void)___constructor__F_P13s__anonymous8_autogen___1(((struct __anonymous8 *)(&__x29__CV13s__anonymous8_1))));542 ((void)___constructor__F_P13s__anonymous9_autogen___1(((struct __anonymous9 *)(&__x30__CV13s__anonymous9_1))));543 ((void)___constructor__F_P14s__anonymous10_autogen___1(((struct __anonymous10 *)(&__x31__CV14s__anonymous10_1))));544 ((void)___constructor__F_P14s__anonymous11_autogen___1(((struct __anonymous11 *)(&__x32__CV14s__anonymous11_1))));545 ((void)___constructor__F_P14s__anonymous12_autogen___1(((struct __anonymous12 *)(&__x33__CV14s__anonymous12_1))));546 ((void)___constructor__F_P14s__anonymous13_autogen___1(((struct __anonymous13 *)(&__x34__CV14s__anonymous13_1))));547 ((void)___constructor__F_P14s__anonymous14_autogen___1(((struct __anonymous14 *)(&__x35__CV14s__anonymous14_1))));548 ((void)___constructor__F_P14s__anonymous15_autogen___1(((struct __anonymous15 *)(&__x36__CV14s__anonymous15_1))));549 }550 __attribute__ ((destructor(),)) static void _destroy_declarationSpecifier(void){551 ((void)___destructor__F_P14s__anonymous15_autogen___1(((struct __anonymous15 *)(&__x36__CV14s__anonymous15_1))));552 ((void)___destructor__F_P14s__anonymous14_autogen___1(((struct __anonymous14 *)(&__x35__CV14s__anonymous14_1))));553 ((void)___destructor__F_P14s__anonymous13_autogen___1(((struct __anonymous13 *)(&__x34__CV14s__anonymous13_1))));554 ((void)___destructor__F_P14s__anonymous12_autogen___1(((struct __anonymous12 *)(&__x33__CV14s__anonymous12_1))));555 ((void)___destructor__F_P14s__anonymous11_autogen___1(((struct __anonymous11 *)(&__x32__CV14s__anonymous11_1))));556 ((void)___destructor__F_P14s__anonymous10_autogen___1(((struct __anonymous10 *)(&__x31__CV14s__anonymous10_1))));557 ((void)___destructor__F_P13s__anonymous9_autogen___1(((struct __anonymous9 *)(&__x30__CV13s__anonymous9_1))));558 ((void)___destructor__F_P13s__anonymous8_autogen___1(((struct __anonymous8 *)(&__x29__CV13s__anonymous8_1))));559 ((void)___destructor__F_P13s__anonymous7_autogen___1(((struct __anonymous7 *)(&__x17__CV13s__anonymous7_1))));560 ((void)___destructor__F_P13s__anonymous6_autogen___1(((struct __anonymous6 *)(&__x16__CV13s__anonymous6_1))));561 ((void)___destructor__F_P13s__anonymous5_autogen___1(((struct __anonymous5 *)(&__x15__CV13s__anonymous5_1))));562 ((void)___destructor__F_P13s__anonymous4_autogen___1(((struct __anonymous4 *)(&__x14__CV13s__anonymous4_1))));563 ((void)___destructor__F_P13s__anonymous3_autogen___1(((struct __anonymous3 *)(&__x13__CV13s__anonymous3_1))));564 ((void)___destructor__F_P13s__anonymous2_autogen___1(((struct __anonymous2 *)(&__x12__CV13s__anonymous2_1))));565 ((void)___destructor__F_P13s__anonymous1_autogen___1(((struct __anonymous1 *)(&__x11__CV13s__anonymous1_1))));566 ((void)___destructor__F_P13s__anonymous0_autogen___1(((struct __anonymous0 *)(&__x10__CV13s__anonymous0_1))));567 } -
src/tests/.expect/64/extension.txt
r85517ddb r1ba88a0 86 86 __extension__ int __c__i_2; 87 87 }; 88 int __i__i_2; 89 ((void)((*((int *)(&__i__i_2)))=(__extension__ __a__i_1+__extension__ 3)) /* ?{} */); 88 int __i__i_2 = ((int )(__extension__ __a__i_1+__extension__ 3)); 90 89 ((void)__extension__ 3); 91 90 ((void)__extension__ __a__i_1); -
src/tests/.expect/64/gccExtensions.txt
r85517ddb r1ba88a0 76 76 ((void)((*((int *)(&(*___dst__P2sS_2).__c__i_2)))=__c__i_2) /* ?{} */); 77 77 } 78 int __i__i_2; 79 ((void)((*((int *)(&__i__i_2)))=__extension__ 3) /* ?{} */); 78 int __i__i_2 = ((int )__extension__ 3); 80 79 __extension__ int __a__i_2; 81 80 __extension__ int __b__i_2; … … 133 132 } 134 133 struct s3 __x1__3ss3_2; 135 ((void)___constructor__F_P3ss3_autogen___2(((struct s3 *)(&__x1__3ss3_2))));136 134 struct s3 __y1__3ss3_2; 137 ((void)___constructor__F_P3ss3_autogen___2(((struct s3 *)(&__y1__3ss3_2))));138 135 struct s4 { 139 136 int __i__i_2; … … 141 138 inline struct s4 ___operator_assign__F3ss4_P3ss43ss4_autogen___2(struct s4 *___dst__P3ss4_2, struct s4 ___src__3ss4_2){ 142 139 ((void)((*___dst__P3ss4_2).__i__i_2=___src__3ss4_2.__i__i_2)); 143 ((void)___destructor__F_P3ss3_autogen___2(((struct s3 *)(&__y1__3ss3_2))));144 ((void)___destructor__F_P3ss3_autogen___2(((struct s3 *)(&__x1__3ss3_2))));145 140 return ((struct s4 )___src__3ss4_2); 146 141 } … … 158 153 } 159 154 struct s4 __x2__3ss4_2; 160 ((void)___constructor__F_P3ss4_autogen___2(((struct s4 *)(&__x2__3ss4_2))));161 155 struct s4 __y2__3ss4_2; 162 ((void)___constructor__F_P3ss4_autogen___2(((struct s4 *)(&__y2__3ss4_2))));163 156 int __m1__A0i_2[((long unsigned int )10)]; 164 157 int __m2__A0A0i_2[((long unsigned int )10)][((long unsigned int )10)]; … … 166 159 int _retVal0 = { 0 }; 167 160 ((void)(_retVal0=0) /* ?{} */); 168 ((void)___destructor__F_P3ss4_autogen___2(((struct s4 *)(&__y2__3ss4_2))));169 ((void)___destructor__F_P3ss4_autogen___2(((struct s4 *)(&__x2__3ss4_2))));170 ((void)___destructor__F_P3ss3_autogen___2(((struct s3 *)(&__y1__3ss3_2))));171 ((void)___destructor__F_P3ss3_autogen___2(((struct s3 *)(&__x1__3ss3_2))));172 161 return ((int )_retVal0); 173 ((void)___destructor__F_P3ss4_autogen___2(((struct s4 *)(&__y2__3ss4_2))));174 ((void)___destructor__F_P3ss4_autogen___2(((struct s4 *)(&__x2__3ss4_2))));175 ((void)___destructor__F_P3ss3_autogen___2(((struct s3 *)(&__y1__3ss3_2))));176 ((void)___destructor__F_P3ss3_autogen___2(((struct s3 *)(&__x1__3ss3_2))));177 162 }
Note: See TracChangeset
for help on using the changeset viewer.