Changes in / [b58affe7:c1ea11b]


Ignore:
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • Jenkinsfile

    rb58affe7 rc1ea11b  
    130130                        //Run the tests from the tests directory
    131131                        if ( Settings.RunAllTests ) {
    132                                 sh 'make --no-print-directory -C tests timeouts="--timeout=1200" all-tests debug=yes'
    133                                 sh 'make --no-print-directory -C tests timeouts="--timeout=1200" all-tests debug=no '
     132                                sh 'make --no-print-directory -C tests timeouts="--timeout=600" all-tests debug=yes'
     133                                sh 'make --no-print-directory -C tests timeouts="--timeout=600" all-tests debug=no '
    134134                        }
    135135                        else {
  • driver/cc1.cc

    rb58affe7 rc1ea11b  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // cc1.cc --
     7// cc1.cc -- 
    88//
    99// Author           : Peter A. Buhr
     
    107107        if ( tmpfilefd != -1 ) {                                                        // RACE, file created ?
    108108                rmtmpfile();                                                                    // remove
    109                 exit( EXIT_FAILURE );                                                   // terminate
     109                exit( EXIT_FAILURE );                                                   // terminate 
    110110        } // if
    111111} // sigTermHandler
     
    360360
    361361                #ifdef __DEBUG_H__
    362                 cerr << "cfa-cpp ncargs: " << (o_name ? o_name : "No -o") << " " << CFA_flag << " " << ncargs << endl;
     362                cerr << "cfa-cpp ncargs: " << o_name << " " << CFA_flag << " " << ncargs << endl;
    363363                for ( int i = 0; cargs[i] != NULL; i += 1 ) {
    364364                        cerr << cargs[i] << " ";
  • src/AST/Convert.cpp

    rb58affe7 rc1ea11b  
    18951895                };
    18961896                stmt->orElse = {
    1897                         GET_ACCEPT_1(orelse.statement, Stmt),
    1898                         GET_ACCEPT_1(orelse.condition, Expr),
     1897                        GET_ACCEPT_1(timeout.statement, Stmt),
     1898                        GET_ACCEPT_1(timeout.condition, Expr),
    18991899                };
    19001900
  • tests/sum.cfa

    rb58affe7 rc1ea11b  
    3535
    3636int main( void ) {
    37 #if 0
    3837        const int low = 5, High = 15, size = High - low;
    3938
     
    122121                 | sum( size, gs.x ) | ", check" | (int)s;              // add field array in generic type
    123122        delete( gs.x );
    124 #else
    125         const int low = 5, High = 15, size = High - low;
    126 
    127         signed char s = 0, a[size], v = (char)low;
    128         for ( int i = 0; i < size; i += 1, v += 1hh ) {
    129                 s += v;
    130                 a[i] = v;
    131         } // for
    132         printf( "sum from %d to %d is %hhd, check %hhd\n", low, High,
    133                  sum( size, (signed char *)a ), (signed char)s );
    134 
    135         unsigned char s = 0, a[size], v = low;
    136         for ( int i = 0; i < size; i += 1, v += 1hhu ) {
    137                 s += (unsigned char)v;
    138                 a[i] = (unsigned char)v;
    139         } // for
    140         printf( "sum from %d to %d is %hhu, check %hhu\n", low, High,
    141                  sum( size, (unsigned char *)a ), (unsigned char)s );
    142 
    143         short int s = 0, a[size], v = low;
    144         for ( int i = 0; i < size; i += 1, v += 1h ) {
    145                 s += (short int)v;
    146                 a[i] = (short int)v;
    147         } // for
    148         printf( "sum from %d to %d is %hd, check %hd\n", low, High,
    149                  sum( size, (short int *)a ), (short int)s );
    150 
    151         int s = 0, a[size], v = low;
    152         for ( int i = 0; i < size; i += 1, v += 1 ) {
    153                 s += (int)v;
    154                 a[i] = (int)v;
    155         } // for
    156         printf( "sum from %d to %d is %d, check %d\n", low, High,
    157                  sum( size, (int *)a ), (int)s );
    158 
    159         float s = 0.0f, a[size], v = low / 10.0f;
    160         for ( int i = 0; i < size; i += 1, v += 0.1f ) {
    161                 s += (float)v;
    162                 a[i] = (float)v;
    163         } // for
    164         printf( "sum from %g to %g is %g, check %g\n", low / 10.0f, High / 10.0f,
    165                  sum( size, (float *)a ), (float)s );
    166 
    167         double s = 0.0, a[size], v = low / 10.0;
    168         for ( int i = 0; i < size; i += 1, v += 0.1 ) {
    169                 s += (double)v;
    170                 a[i] = (double)v;
    171         } // for
    172         printf( "sum from %g to %g is %g, check %g\n", low / 10.0f, High / 10.0f,
    173                  sum( size, (double *)a ), (double)s );
    174 
    175         struct S { int i, j; };
    176         void ?{}( S & s ) { s.[i, j] = 0; }
    177         void ?{}( S & s, int i ) { s.[i, j] = [i, 0]; }
    178         void ?{}( S & s, int i, int j ) { s.[i, j] = [i, j]; }
    179         void ?{}( S & s, zero_t ) { s.[i, j] = 0; }
    180         void ?{}( S & s, one_t ) { s.[i, j] = 1; }
    181         S ?+?( S t1, S t2 ) { return (S){ t1.i + t2.i, t1.j + t2.j }; }
    182         S ?+=?( S & t1, S t2 ) { t1 = t1 + t2; return t1; }
    183         S ++?( S & t ) { t += (S){1}; return t; }
    184         S ?++( S & t ) { S temp = t; t += (S){1}; return temp; }
    185         ofstream & ?|?( ofstream & os, S v ) { return os | v.i | v.j; }
    186         void ?|?( ofstream & os, S v ) { (ofstream &)(os | v); nl( os ); }
    187 
    188         S s = (S){0}, a[size], v = { low, low };
    189         for ( int i = 0; i < size; i += 1, v += (S){1} ) {
    190                 s += (S)v;
    191                 a[i] = (S)v;
    192         } // for
    193         printf( "sum from %d to %d is %d %d, check %d %d\n", low, High,
    194                  sum( size, (S *)a ).[i, j], s.[i, j] );
    195 
    196         forall( otype Impl | sumable( Impl ) )
    197         struct GS {
    198                 Impl * x, * y;
    199         };
    200         GS(int) gs;
    201         // FIX ME, resolution problem with anew not picking up the LH type
    202         gs.x = (typeof(gs.x))anew( size );                                      // create array storage for field
    203         s = 0; v = low;
    204         for ( int i = 0; i < size; i += 1, v += 1 ) {
    205                 s += (int)v;
    206                 gs.x[i] = (int)v;                                                               // set field array in generic type
    207         } // for
    208         printf( "sum from %d to %d is %d, check %d\n", low, High,
    209                  sum( size, gs.x ), (int)s );           // add field array in generic type
    210         delete( gs.x );
    211 #endif
    212123} // main
    213124
Note: See TracChangeset for help on using the changeset viewer.