Changeset a97b9ed


Ignore:
Timestamp:
Oct 16, 2023, 8:09:51 AM (14 months ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
master
Children:
2bf46a5, 54e59dd, 61e5d99
Parents:
946a6e4 (diff), 8cbe732 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

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

Files:
3 added
24 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/concurrency/channel.hfa

    r946a6e4 ra97b9ed  
    130130static inline void __cons_handoff( channel(T) & chan, T & elem ) with(chan) {
    131131    memcpy( cons`first.extra, (void *)&elem, sizeof(T) ); // do waiting consumer work
     132    __atomic_thread_fence( __ATOMIC_SEQ_CST );
    132133    wake_one( cons );
    133134}
     
    136137static inline void __prods_handoff( channel(T) & chan, T & retval ) with(chan) {
    137138    memcpy( (void *)&retval, prods`first.extra, sizeof(T) );
     139    __atomic_thread_fence( __ATOMIC_SEQ_CST );
    138140    wake_one( prods );
    139141}
  • libcfa/src/concurrency/cofor.cfa

    r946a6e4 ra97b9ed  
    44// cofor ( uC++ COFOR )
    55
    6 thread co_runner {
     6thread cofor_runner {
    77        ssize_t low, high;
    88        __cofor_body_t loop_body;
    99};
    1010
    11 static void ?{}( co_runner & this, ssize_t low, ssize_t high, __cofor_body_t loop_body ) {
     11static void ?{}( cofor_runner & this, ssize_t low, ssize_t high, __cofor_body_t loop_body ) {
    1212        this.low = low;
    1313        this.high = high;
     
    1515}
    1616
    17 void main( co_runner & this ) with( this ) {
     17void main( cofor_runner & this ) with( this ) {
    1818        for ( ssize_t i = low; i < high; i++ )
    1919                loop_body(i);
     
    2929        ssize_t i = 0;
    3030        ssize_t stride_iter = low;
    31         co_runner * runners[ threads ];
     31        cofor_runner * runners[ threads ];
    3232        for ( i; threads ) {
    3333                runners[i] = alloc();
     
    4545}
    4646
    47 //////////////////////////////////////////////////////////////////////////////////////////
    48 // parallel (COBEGIN/COEND)
    4947
    50 thread para_runner {
    51         parallel_stmt_t body;
    52         void * arg;
    53 };
    54 
    55 static void ?{}( para_runner & this, parallel_stmt_t body, void * arg ) {
    56         this.body = body;
    57         this.arg = arg;
    58 }
    59 
    60 void main( para_runner & this ) with( this ) { body( arg ); }
    61 
    62 void parallel( parallel_stmt_t * stmts, void ** args, size_t num ) libcfa_public {
    63         para_runner * runners[ num ];
    64         for ( i; num )
    65                 (*(runners[i] = malloc())){ stmts[i], args[i] };
    66         for ( i; num )
    67                 delete( runners[i] );
    68 }
    69 
  • libcfa/src/concurrency/cofor.hfa

    r946a6e4 ra97b9ed  
    1616
    1717//////////////////////////////////////////////////////////////////////////////////////////
    18 // parallel (COBEGIN/COEND)
    19 typedef void (*parallel_stmt_t)( void * );
     18// corun
    2019
    21 void parallel( parallel_stmt_t * stmts, void ** args, size_t num );
     20//
     21typedef void (*__CFA_corun_lambda_t)( void );
     22
     23// used to run a corun statement in parallel
     24thread co_runner {
     25        __CFA_corun_lambda_t body;
     26};
     27
     28// wraps a co_runner to provide RAII deallocation
     29struct runner_block {
     30    co_runner * runner;
     31};
     32static inline void ?{}( co_runner & this, __CFA_corun_lambda_t body ) { this.body = body; }
     33
     34void main( co_runner & this ) with( this ) { body(); }
     35
     36static inline void ?{}( runner_block & this ) {}
     37static inline void ?{}( runner_block & this, __CFA_corun_lambda_t body ) {
     38    (*(this.runner = malloc())){ body };
     39}
     40
     41static inline void ^?{}( runner_block & this ) {
     42    delete( this.runner );
     43}
     44
  • src/AST/Convert.cpp

    r946a6e4 ra97b9ed  
    269269                        node->location,
    270270                        Type::StorageClasses( node->storage.val ),
    271             get<Type>().accept1( node->base ),
     271                        get<Type>().accept1( node->base ),
    272272                        LinkageSpec::Spec( node->linkage.val )
    273273                );
     
    567567        }
    568568
    569     const ast::WhenClause * visit( const ast::WhenClause * node ) override final {
     569        const ast::WhenClause * visit( const ast::WhenClause * node ) override final {
    570570                // There is no old-AST WhenClause, so this should never be called.
    571571                assert( !node );
     
    604604        }
    605605
    606     const ast::Stmt * visit( const ast::WaitUntilStmt * node ) override final {
    607         // There is no old-AST WaitUntilStmt, so this should never be called.
     606        const ast::Stmt * visit( const ast::WaitUntilStmt * node ) override final {
     607                // There is no old-AST WaitUntilStmt, so this should never be called.
    608608                assert( !node );
    609609                return nullptr;
     
    648648                );
    649649                return stmtPostamble( stmt, node );
     650        }
     651
     652        const ast::Stmt * visit( const ast::CorunStmt * node ) override final {
     653                // There is no old-AST CorunStmt, so this should never be called.
     654                assert( !node );
     655                return nullptr;
    650656        }
    651657
     
    853859                // New workd:   one public type: node->result, plus node->underlyer only to support roundtrip conversion
    854860                //              preserving underlyer because the correct type for string literals is complicated to construct,
    855             //              and distinguishing a string from other literals using the type is hard to do accurately
     861                //              and distinguishing a string from other literals using the type is hard to do accurately
    856862                // Both worlds: the outer, expression-level type can change during resolution
    857863                //              for a string, that's char[k] before-resolve and char * after
     
    859865                //              for a string, that's char[k] always
    860866                // Both worlds: the "rep" field of a constant is the C source file fragment that compiles to the desired value
    861         //              for a string, that includes outer quotes, backslashes, et al cases from the Literals test
     867                //              for a string, that includes outer quotes, backslashes, et al cases from the Literals test
    862868                ConstantExpr *rslt = new ConstantExpr(Constant(
    863869                        get<Type>().accept1(node->underlyer),
     
    15181524                return strict_dynamic_cast< ast::Decl * >( node );
    15191525        }
    1520        
     1526
    15211527        ConverterOldToNew() = default;
    15221528        ConverterOldToNew(const ConverterOldToNew &) = delete;
     
    15811587        ast::Label make_label(const Label* old) {
    15821588                CodeLocation const & location =
    1583                     ( old->labelled ) ? old->labelled->location : CodeLocation();
     1589                        ( old->labelled ) ? old->labelled->location : CodeLocation();
    15841590                return ast::Label(
    15851591                        location,
     
    22402246        // TypeSubstitution shouldn't exist yet in old.
    22412247        ast::TypeSubstitution * convertTypeSubstitution(const TypeSubstitution * old) {
    2242                
    22432248                if (!old) return nullptr;
    22442249                if (old->empty()) return nullptr;
     
    22852290        ast::Expr * visitBaseExpr_SkipResultType( const Expression * old, ast::Expr * nw) {
    22862291
    2287                 nw->env    = convertTypeSubstitution(old->env);
     2292                nw->env = convertTypeSubstitution(old->env);
    22882293
    22892294                nw->extension = old->extension;
     
    28562861
    28572862        virtual void visit( const EnumInstType * old ) override final {
    2858                 ast::EnumInstType * ty; 
     2863                ast::EnumInstType * ty;
    28592864                if ( old->baseEnum ) {
    28602865                        ty = new ast::EnumInstType{
  • src/AST/Fwd.hpp

    r946a6e4 ra97b9ed  
    6767class ImplicitCtorDtorStmt;
    6868class MutexStmt;
     69class CorunStmt;
    6970
    7071class Expr;
  • src/AST/Node.cpp

    r946a6e4 ra97b9ed  
    192192template class ast::ptr_base< ast::MutexStmt, ast::Node::ref_type::weak >;
    193193template class ast::ptr_base< ast::MutexStmt, ast::Node::ref_type::strong >;
     194template class ast::ptr_base< ast::CorunStmt, ast::Node::ref_type::weak >;
     195template class ast::ptr_base< ast::CorunStmt, ast::Node::ref_type::strong >;
    194196template class ast::ptr_base< ast::Expr, ast::Node::ref_type::weak >;
    195197template class ast::ptr_base< ast::Expr, ast::Node::ref_type::strong >;
  • src/AST/Pass.hpp

    r946a6e4 ra97b9ed  
    162162        const ast::FinallyClause *    visit( const ast::FinallyClause        * ) override final;
    163163        const ast::Stmt *             visit( const ast::SuspendStmt          * ) override final;
    164     const ast::WhenClause *       visit( const ast::WhenClause           * ) override final;
     164        const ast::WhenClause *       visit( const ast::WhenClause           * ) override final;
    165165        const ast::Stmt *             visit( const ast::WaitForStmt          * ) override final;
    166166        const ast::WaitForClause *    visit( const ast::WaitForClause        * ) override final;
    167     const ast::Stmt *             visit( const ast::WaitUntilStmt        * ) override final;
     167        const ast::Stmt *             visit( const ast::WaitUntilStmt        * ) override final;
    168168        const ast::Decl *             visit( const ast::WithStmt             * ) override final;
    169169        const ast::NullStmt *         visit( const ast::NullStmt             * ) override final;
     
    171171        const ast::Stmt *             visit( const ast::ImplicitCtorDtorStmt * ) override final;
    172172        const ast::Stmt *             visit( const ast::MutexStmt            * ) override final;
     173        const ast::Stmt *             visit( const ast::CorunStmt            * ) override final;
    173174        const ast::Expr *             visit( const ast::ApplicationExpr      * ) override final;
    174175        const ast::Expr *             visit( const ast::UntypedExpr          * ) override final;
  • src/AST/Pass.impl.hpp

    r946a6e4 ra97b9ed  
    11211121
    11221122//--------------------------------------------------------------------------
     1123// CorunStmt
     1124template< typename core_t >
     1125const ast::Stmt * ast::Pass< core_t >::visit( const ast::CorunStmt * node ) {
     1126        VISIT_START( node );
     1127
     1128        if ( __visit_children() ) {
     1129                maybe_accept( node, &CorunStmt::stmt );
     1130        }
     1131
     1132        VISIT_END( Stmt, node );
     1133}
     1134
     1135//--------------------------------------------------------------------------
    11231136// ApplicationExpr
    11241137template< typename core_t >
  • src/AST/Print.cpp

    r946a6e4 ra97b9ed  
    209209        }
    210210
    211     void print( const ast::WaitStmt * node ) {
     211        void print( const ast::WaitStmt * node ) {
    212212                if ( node->timeout_time ) {
    213213                        os << indent-1 << "timeout of:" << endl;
     
    860860        }
    861861
    862     virtual const ast::Stmt * visit( const ast::WaitUntilStmt * node ) override final {
     862        virtual const ast::Stmt * visit( const ast::WaitUntilStmt * node ) override final {
    863863                os << "Waituntil Statement" << endl;
    864864                indent += 2;
     
    866866                        clause->accept( *this );
    867867                }
    868         print(node);    // calls print( const ast::WaitStmt * node )
     868                // calls print( const ast::WaitStmt * node )
     869                print(node);
    869870                return node;
    870871        }
     
    913914                printAll( node->mutexObjs );
    914915                --indent;
     916                os << indent << "... with Statement: ";
     917                ++indent;
     918                safe_print( node->stmt );
     919                --indent;
     920                os << endl;
     921
     922                return node;
     923        }
     924
     925        virtual const ast::Stmt * visit( const ast::CorunStmt * node ) override final {
     926                os << "Corun Statement" << endl;
    915927                os << indent << "... with Statement: ";
    916928                ++indent;
  • src/AST/Stmt.hpp

    r946a6e4 ra97b9ed  
    532532};
    533533
     534// Corun Statement
     535class CorunStmt final : public Stmt {
     536  public:
     537        ptr<Stmt> stmt;
     538
     539        CorunStmt( const CodeLocation & loc, const Stmt * stmt, const std::vector<Label> && labels = {} )
     540                : Stmt(loc, std::move(labels)), stmt(stmt) {}
     541
     542        const Stmt * accept( Visitor & v ) const override { return v.visit( this ); }
     543  private:
     544        CorunStmt * clone() const override { return new CorunStmt{ *this }; }
     545        MUTATE_FRIEND
     546};
     547
    534548} // namespace ast
    535549
  • src/AST/Visitor.hpp

    r946a6e4 ra97b9ed  
    5959    virtual const ast::Stmt *             visit( const ast::ImplicitCtorDtorStmt * ) = 0;
    6060    virtual const ast::Stmt *             visit( const ast::MutexStmt            * ) = 0;
     61    virtual const ast::Stmt *             visit( const ast::CorunStmt            * ) = 0;
    6162    virtual const ast::Expr *             visit( const ast::ApplicationExpr      * ) = 0;
    6263    virtual const ast::Expr *             visit( const ast::UntypedExpr          * ) = 0;
  • src/Common/CodeLocationTools.cpp

    r946a6e4 ra97b9ed  
    137137    macro(ImplicitCtorDtorStmt, Stmt) \
    138138    macro(MutexStmt, Stmt) \
     139    macro(CorunStmt, Stmt) \
    139140    macro(ApplicationExpr, Expr) \
    140141    macro(UntypedExpr, Expr) \
  • src/Concurrency/module.mk

    r946a6e4 ra97b9ed  
    1818        Concurrency/Actors.cpp \
    1919        Concurrency/Actors.hpp \
     20        Concurrency/Corun.cpp \
     21        Concurrency/Corun.hpp \
    2022        Concurrency/KeywordsNew.cpp \
    2123        Concurrency/Keywords.cc \
  • src/GenPoly/BoxNew.cpp

    r946a6e4 ra97b9ed  
    9494
    9595/// Adds parameters for otype size and alignment to a function type.
    96 void addOTypeParams(
    97                 ast::FunctionDecl * decl,
     96void addSTypeParams(
     97                ast::vector<ast::DeclWithType> & params,
    9898                ast::vector<ast::TypeDecl> const & sizedParams ) {
    99         // TODO: Can we fold this into buildLayoutFunction to avoid rebuilding?
    100         ast::FunctionType * type = ast::mutate( decl->type.get() );
    10199        for ( ast::ptr<ast::TypeDecl> const & sizedParam : sizedParams ) {
    102100                ast::TypeInstType inst( sizedParam );
    103101                std::string paramName = Mangle::mangleType( &inst );
    104                 decl->params.emplace_back( new ast::ObjectDecl(
     102                params.emplace_back( new ast::ObjectDecl(
    105103                        sizedParam->location,
    106104                        sizeofName( paramName ),
    107105                        makeSizeAlignType()
    108106                ) );
    109                 type->params.emplace_back( makeSizeAlignType() );
    110                 decl->params.emplace_back( new ast::ObjectDecl(
     107                params.emplace_back( new ast::ObjectDecl(
    111108                        sizedParam->location,
    112109                        alignofName( paramName ),
    113110                        makeSizeAlignType()
    114111                ) );
    115                 type->params.emplace_back( makeSizeAlignType() );
    116         }
    117         decl->type = type;
     112        }
    118113}
    119114
     
    129124};
    130125
    131 // TODO: Is there a better way to handle the different besides a flag?
    132126LayoutData buildLayoutFunction(
    133127                CodeLocation const & location, ast::AggregateDecl const * aggr,
     128                ast::vector<ast::TypeDecl> const & sizedParams,
    134129                bool isInFunction, bool isStruct ) {
    135130        ast::ObjectDecl * sizeParam = new ast::ObjectDecl(
     
    153148                params.push_back( offsetParam );
    154149        }
     150        addSTypeParams( params, sizedParams );
    155151
    156152        // Routines at global scope marked "static" to prevent multiple
     
    238234
    239235        // Build layout function signature.
    240         LayoutData layout =
    241                 buildLayoutFunction( location, decl, isInFunction(), true );
     236        LayoutData layout = buildLayoutFunction(
     237                location, decl, sizedParams, isInFunction(), true );
    242238        ast::FunctionDecl * layoutDecl = layout.function;
    243239        // Also return these or extract them from the parameter list?
     
    246242        ast::ObjectDecl const * offsetofParam = layout.offsetofParam;
    247243        assert( nullptr != layout.offsetofParam );
    248         addOTypeParams( layoutDecl, sizedParams );
    249244
    250245        // Calculate structure layout in function body.
     
    313308
    314309        // Build layout function signature.
    315         LayoutData layout =
    316                 buildLayoutFunction( location, decl, isInFunction(), false );
     310        LayoutData layout = buildLayoutFunction(
     311                location, decl, sizedParams, isInFunction(), false );
    317312        ast::FunctionDecl * layoutDecl = layout.function;
    318313        // Also return these or extract them from the parameter list?
     
    320315        ast::ObjectDecl const * alignofParam = layout.alignofParam;
    321316        assert( nullptr == layout.offsetofParam );
    322         addOTypeParams( layoutDecl, sizedParams );
    323317
    324318        // Calculate union layout in function body.
     
    641635        // the variable can be reused as a parameter to the call rather than
    642636        // creating a new temporary variable. Previously this step was an
    643         // optimization, but
    644         // ...
    645         // with the introduction of tuples and UniqueExprs, it is necessary to
    646         // ensure that they use the same variable.
     637        // optimization, but with the introduction of tuples and UniqueExprs,
     638        // it is necessary to ensure that they use the same variable.
    647639        // Essentially, looking for pattern:
    648640        // (x=f(...), x)
     
    689681        // the distinction between _conc_T30 and T3(int)) concRetType may not be
    690682        // a good name in one or both of these places.
    691         // TODO A more appropriate name change is welcome.
    692683        if ( dynRetType ) {
    693684                ast::Type const * result = mutExpr->result;
     
    698689        } else if ( needsAdapter( function, scopeTypeVars )
    699690                        && !needsAdapter( function, exprTypeVars ) ) {
    700                 // TODO:
    701                 // The !needsAdapter check may be incorrect. It seems there is some
    702                 // situation where an adapter is applied where it shouldn't be,
    703                 // and this fixes it for some case. More investigation is needed.
    704 
    705691                // Change the application so it calls the adapter rather than the
    706692                // passed function.
     
    17741760        /// Adds type parameters to the layout call; will generate the
    17751761        /// appropriate parameters if needed.
    1776         void addOTypeParamsToLayoutCall(
     1762        void addSTypeParamsToLayoutCall(
    17771763                ast::UntypedExpr * layoutCall,
    17781764                const ast::vector<ast::Type> & otypeParams );
     
    20142000                ast::MemberExpr const * expr ) {
    20152001        // Only mutate member expressions for polymorphic types.
    2016         int typeDepth;
    20172002        ast::Type const * objectType = hasPolyBase(
    2018                 expr->aggregate->result, scopeTypeVars, &typeDepth
     2003                expr->aggregate->result, scopeTypeVars
    20192004        );
    20202005        if ( !objectType ) return expr;
     
    20942079        }
    20952080        // MemberExpr was converted to pointer + offset; and it is not valid C to
    2096         // take the address of an addition, so stript the address-of.
     2081        // take the address of an addition, so strip away the address-of.
    20972082        // It also preserves the env value.
    20982083        return ast::mutate_field( expr->arg.get(), &ast::Expr::env, expr->env );
     
    22952280                                } );
    22962281
    2297                         addOTypeParamsToLayoutCall( layoutCall, sizedParams );
     2282                        addSTypeParamsToLayoutCall( layoutCall, sizedParams );
    22982283
    22992284                        stmtsToAddBefore.emplace_back(
     
    23362321                        } );
    23372322
    2338                 addOTypeParamsToLayoutCall( layoutCall, sizedParams );
     2323                addSTypeParamsToLayoutCall( layoutCall, sizedParams );
    23392324
    23402325                stmtsToAddBefore.emplace_back(
     
    23462331}
    23472332
    2348 void PolyGenericCalculator::addOTypeParamsToLayoutCall(
     2333void PolyGenericCalculator::addSTypeParamsToLayoutCall(
    23492334                ast::UntypedExpr * layoutCall,
    23502335                const ast::vector<ast::Type> & otypeParams ) {
  • src/Parser/StatementNode.cc

    r946a6e4 ra97b9ed  
    498498} // build_mutex
    499499
     500ast::Stmt * build_corun( const CodeLocation & location, StatementNode * stmt ) {
     501        ast::Stmt * body = maybeMoveBuild( stmt );
     502        return new ast::CorunStmt( location, body );
     503} // build_corun
     504
    500505// Local Variables: //
    501506// tab-width: 4 //
  • src/Parser/StatementNode.h

    r946a6e4 ra97b9ed  
    105105ast::Stmt * build_with( const CodeLocation &, ExpressionNode * exprs, StatementNode * stmt );
    106106ast::Stmt * build_mutex( const CodeLocation &, ExpressionNode * exprs, StatementNode * stmt );
     107ast::Stmt * build_corun( const CodeLocation &, StatementNode * stmt );
  • src/Parser/parser.yy

    r946a6e4 ra97b9ed  
    17211721corun_statement:
    17221722        CORUN statement
    1723                 { SemanticError( yylloc, "corun statement is currently unimplemented." ); $$ = nullptr; }
     1723                { $$ = new StatementNode( build_corun( yylloc, $2 ) ); }
    17241724        ;
    17251725
  • src/ResolvExpr/ResolveTypeof.cc

    r946a6e4 ra97b9ed  
    231231            const ast::Designation *des = mutListInit->designations[k].get();
    232232            // Desination here
    233             ast::Designation * newDesination = new ast::Designation(des->location);
     233            ast::Designation * newDesignation = new ast::Designation(des->location);
    234234            std::deque<ast::ptr<ast::Expr>> newDesignators;
    235235
     
    265265            }           
    266266           
    267             newDesination->designators = newDesignators;
    268             mutListInit = ast::mutate_field_index(mutListInit, &ast::ListInit::designations, k, newDesination);
     267            newDesignation->designators = newDesignators;
     268            mutListInit = ast::mutate_field_index(mutListInit, &ast::ListInit::designations, k, newDesignation);
    269269           
    270270        }
  • src/main.cc

    r946a6e4 ra97b9ed  
    4646#include "Common/utility.h"                 // for deleteAll, filter, printAll
    4747#include "Concurrency/Actors.hpp"           // for implementActors
     48#include "Concurrency/Corun.hpp"            // for implementCorun
    4849#include "Concurrency/Keywords.h"           // for implementMutex, implement...
    4950#include "Concurrency/Waitfor.h"            // for generateWaitfor
     
    345346                PASS( "Implement Concurrent Keywords", Concurrency::implementKeywords, transUnit );
    346347                PASS( "Fix Unique Ids", Validate::fixUniqueIds, transUnit );
     348                PASS( "Implement Corun", Concurrency::implementCorun, transUnit );
    347349                PASS( "Hoist Control Declarations", ControlStruct::hoistControlDecls, transUnit );
    348350
  • tests/.expect/linkonce.txt

    r946a6e4 ra97b9ed  
    1 signed=-7 unsigned=12
     1signed=7 unsigned=12
  • tests/concurrency/cofor.cfa

    r946a6e4 ra97b9ed  
    11#include <cofor.hfa>
    22
    3 long total = 0;
    4 void add_num( void * arg ) { __atomic_fetch_add( &total, (long)arg, __ATOMIC_SEQ_CST ); }
     3
     4void add_num( long * total, long val ) { __atomic_fetch_add( total, (long)val, __ATOMIC_SEQ_CST ); }
    55
    66int main() {
    77    printf("start\n");
    88    processor p[4];
     9    long total = 0;
    910    COFOR( i, 0, 10, __atomic_fetch_add( &total, i, __ATOMIC_SEQ_CST ); );
    10     parallel_stmt_t stmts[5] = { add_num, add_num, add_num, add_num, add_num };
    11     void * nums[5] = { (void *)11, (void *)12, (void *)13, (void *)14, (void *)15 };
    12     parallel( stmts, nums, 5 );
     11    {
     12        corun;      // does nothing
     13        corun{};    // does nothing
     14        corun add_num( &total, 11 );
     15        corun { add_num( &total, 12 ); }
     16        corun __atomic_fetch_add( &total, 13, __ATOMIC_SEQ_CST );
     17        corun { __atomic_fetch_add( &total, 14, __ATOMIC_SEQ_CST ); }
     18        __atomic_fetch_add( &total, 15, __ATOMIC_SEQ_CST ); // run by main thd
     19    }
    1320    printf("total: %ld\n", total);
    1421    printf("done\n");
  • tests/link-once/main.cfa

    r946a6e4 ra97b9ed  
    11// Test our new cfa_linkonce attribute:
    22
    3 __attribute__(( cfa_linkonce )) signed int example = -7;
     3__attribute__(( cfa_linkonce )) signed int example = 7;
    44__attribute__(( cfa_linkonce )) unsigned int example = 12;
    55
  • tests/link-once/partner.cfa

    r946a6e4 ra97b9ed  
    11// Side file for the link-once test.
    22
    3 __attribute__(( cfa_linkonce )) signed int example = -7;
     3__attribute__(( cfa_linkonce )) signed int example = 7;
    44__attribute__(( cfa_linkonce )) unsigned int example = 12;
    55
  • tests/test.py

    r946a6e4 ra97b9ed  
    125125        parser.add_argument('--archive-errors', help='If called with a valid path, on test crashes the test script will copy the core dump and the executable to the specified path.', type=str, default='')
    126126        parser.add_argument('-j', '--jobs', help='Number of tests to run simultaneously, 0 (default) for unlimited', nargs='?', const=0, type=int)
    127         parser.add_argument('--list-comp', help='List all valide arguments', action='store_true')
     127        parser.add_argument('--list-comp', help='List all valid arguments', action='store_true')
    128128        parser.add_argument('--list-dist', help='List all tests for distribution', action='store_true')
    129129        parser.add_argument('-I','--include', help='Directory of test to include, can be used multiple time, All  if omitted', action='append')
Note: See TracChangeset for help on using the changeset viewer.