Changeset 5a40e4e for tests


Ignore:
Timestamp:
Sep 9, 2021, 3:56:32 PM (4 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, ast-experimental, enum, forall-pointer-decay, master, pthread-emulation, qualifiedEnum
Children:
d0b9247
Parents:
dd1cc02 (diff), d8d512e (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

Location:
tests
Files:
12 added
22 edited

Legend:

Unmodified
Added
Removed
  • tests/.expect/declarationSpecifier.arm64.txt

    rdd1cc02 r5a40e4e  
    11321132char **_X13cfa_args_argvPPc_1;
    11331133char **_X13cfa_args_envpPPc_1;
     1134signed int _X17cfa_main_returnedi_1 = ((signed int )0);
    11341135signed int main(signed int _X4argci_1, char **_X4argvPPc_1, char **_X4envpPPc_1){
    11351136    __attribute__ ((unused)) signed int _X12_retval_maini_1;
     
    11461147    }
    11471148
    1148     {
    1149         signed int _tmp_cp_ret6;
    1150         ((void)(_X12_retval_maini_1=(((void)(_tmp_cp_ret6=invoke_main(_X4argci_1, _X4argvPPc_1, _X4envpPPc_1))) , _tmp_cp_ret6)) /* ?{} */);
     1149    signed int _tmp_cp_ret6;
     1150    signed int _X3reti_2 = (((void)(_tmp_cp_ret6=invoke_main(_X4argci_1, _X4argvPPc_1, _X4envpPPc_1))) , _tmp_cp_ret6);
     1151    {
     1152        ((void)(_X17cfa_main_returnedi_1=((signed int )1)));
     1153    }
     1154
     1155    {
     1156        ((void)(_X12_retval_maini_1=_X3reti_2) /* ?{} */);
    11511157    }
    11521158
  • tests/.expect/declarationSpecifier.x64.txt

    rdd1cc02 r5a40e4e  
    11321132char **_X13cfa_args_argvPPc_1;
    11331133char **_X13cfa_args_envpPPc_1;
     1134signed int _X17cfa_main_returnedi_1 = ((signed int )0);
    11341135signed int main(signed int _X4argci_1, char **_X4argvPPc_1, char **_X4envpPPc_1){
    11351136    __attribute__ ((unused)) signed int _X12_retval_maini_1;
     
    11461147    }
    11471148
    1148     {
    1149         signed int _tmp_cp_ret6;
    1150         ((void)(_X12_retval_maini_1=(((void)(_tmp_cp_ret6=invoke_main(_X4argci_1, _X4argvPPc_1, _X4envpPPc_1))) , _tmp_cp_ret6)) /* ?{} */);
     1149    signed int _tmp_cp_ret6;
     1150    signed int _X3reti_2 = (((void)(_tmp_cp_ret6=invoke_main(_X4argci_1, _X4argvPPc_1, _X4envpPPc_1))) , _tmp_cp_ret6);
     1151    {
     1152        ((void)(_X17cfa_main_returnedi_1=((signed int )1)));
     1153    }
     1154
     1155    {
     1156        ((void)(_X12_retval_maini_1=_X3reti_2) /* ?{} */);
    11511157    }
    11521158
  • tests/.expect/declarationSpecifier.x86.txt

    rdd1cc02 r5a40e4e  
    11321132char **_X13cfa_args_argvPPc_1;
    11331133char **_X13cfa_args_envpPPc_1;
     1134signed int _X17cfa_main_returnedi_1 = ((signed int )0);
    11341135signed int main(signed int _X4argci_1, char **_X4argvPPc_1, char **_X4envpPPc_1){
    11351136    __attribute__ ((unused)) signed int _X12_retval_maini_1;
     
    11461147    }
    11471148
    1148     {
    1149         signed int _tmp_cp_ret6;
    1150         ((void)(_X12_retval_maini_1=(((void)(_tmp_cp_ret6=invoke_main(_X4argci_1, _X4argvPPc_1, _X4envpPPc_1))) , _tmp_cp_ret6)) /* ?{} */);
     1149    signed int _tmp_cp_ret6;
     1150    signed int _X3reti_2 = (((void)(_tmp_cp_ret6=invoke_main(_X4argci_1, _X4argvPPc_1, _X4envpPPc_1))) , _tmp_cp_ret6);
     1151    {
     1152        ((void)(_X17cfa_main_returnedi_1=((signed int )1)));
     1153    }
     1154
     1155    {
     1156        ((void)(_X12_retval_maini_1=_X3reti_2) /* ?{} */);
    11511157    }
    11521158
  • tests/.expect/gccExtensions.arm64.txt

    rdd1cc02 r5a40e4e  
    324324char **_X13cfa_args_argvPPc_1;
    325325char **_X13cfa_args_envpPPc_1;
     326signed int _X17cfa_main_returnedi_1 = ((signed int )0);
    326327signed int main(signed int _X4argci_1, char **_X4argvPPc_1, char **_X4envpPPc_1){
    327328    __attribute__ ((unused)) signed int _X12_retval_maini_1;
     
    338339    }
    339340
    340     {
    341         signed int _tmp_cp_ret6;
    342         ((void)(_X12_retval_maini_1=(((void)(_tmp_cp_ret6=invoke_main(_X4argci_1, _X4argvPPc_1, _X4envpPPc_1))) , _tmp_cp_ret6)) /* ?{} */);
     341    signed int _tmp_cp_ret6;
     342    signed int _X3reti_2 = (((void)(_tmp_cp_ret6=invoke_main(_X4argci_1, _X4argvPPc_1, _X4envpPPc_1))) , _tmp_cp_ret6);
     343    {
     344        ((void)(_X17cfa_main_returnedi_1=((signed int )1)));
     345    }
     346
     347    {
     348        ((void)(_X12_retval_maini_1=_X3reti_2) /* ?{} */);
    343349    }
    344350
  • tests/.expect/gccExtensions.x64.txt

    rdd1cc02 r5a40e4e  
    324324char **_X13cfa_args_argvPPc_1;
    325325char **_X13cfa_args_envpPPc_1;
     326signed int _X17cfa_main_returnedi_1 = ((signed int )0);
    326327signed int main(signed int _X4argci_1, char **_X4argvPPc_1, char **_X4envpPPc_1){
    327328    __attribute__ ((unused)) signed int _X12_retval_maini_1;
     
    338339    }
    339340
    340     {
    341         signed int _tmp_cp_ret6;
    342         ((void)(_X12_retval_maini_1=(((void)(_tmp_cp_ret6=invoke_main(_X4argci_1, _X4argvPPc_1, _X4envpPPc_1))) , _tmp_cp_ret6)) /* ?{} */);
     341    signed int _tmp_cp_ret6;
     342    signed int _X3reti_2 = (((void)(_tmp_cp_ret6=invoke_main(_X4argci_1, _X4argvPPc_1, _X4envpPPc_1))) , _tmp_cp_ret6);
     343    {
     344        ((void)(_X17cfa_main_returnedi_1=((signed int )1)));
     345    }
     346
     347    {
     348        ((void)(_X12_retval_maini_1=_X3reti_2) /* ?{} */);
    343349    }
    344350
  • tests/.expect/gccExtensions.x86.txt

    rdd1cc02 r5a40e4e  
    302302char **_X13cfa_args_argvPPc_1;
    303303char **_X13cfa_args_envpPPc_1;
     304signed int _X17cfa_main_returnedi_1 = ((signed int )0);
    304305signed int main(signed int _X4argci_1, char **_X4argvPPc_1, char **_X4envpPPc_1){
    305306    __attribute__ ((unused)) signed int _X12_retval_maini_1;
     
    316317    }
    317318
    318     {
    319         signed int _tmp_cp_ret6;
    320         ((void)(_X12_retval_maini_1=(((void)(_tmp_cp_ret6=invoke_main(_X4argci_1, _X4argvPPc_1, _X4envpPPc_1))) , _tmp_cp_ret6)) /* ?{} */);
     319    signed int _tmp_cp_ret6;
     320    signed int _X3reti_2 = (((void)(_tmp_cp_ret6=invoke_main(_X4argci_1, _X4argvPPc_1, _X4envpPPc_1))) , _tmp_cp_ret6);
     321    {
     322        ((void)(_X17cfa_main_returnedi_1=((signed int )1)));
     323    }
     324
     325    {
     326        ((void)(_X12_retval_maini_1=_X3reti_2) /* ?{} */);
    321327    }
    322328
  • tests/Makefile.am

    rdd1cc02 r5a40e4e  
    7575        pybin/tools.py \
    7676        long_tests.hfa \
     77        .in/parseconfig-all.txt \
     78        .in/parseconfig-errors.txt \
     79        .in/parseconfig-missing.txt \
    7780        io/.in/io.data \
    7881        io/.in/many_read.data \
  • tests/bitmanip3.cfa

    rdd1cc02 r5a40e4e  
    1010// Created On       : Tue Apr  7 21:22:59 2020
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon Aug 24 09:53:26 2020
    13 // Update Count     : 66
     12// Last Modified On : Sun Aug  8 23:12:19 2021
     13// Update Count     : 76
    1414//
    1515
     
    133133        sout | nl | "floor2" | nl | nl;
    134134
    135         printf( "signed char\n" );
     135        sout | "signed char";
    136136        for ( sc = 1; sc != 0; sc <<= 1 ) {
    137137                scr1 = floor2( sc, sc ); scr2 = floor2( sc + 2hh, sc ); scr3 = floor2( -sc - 2hh, sc );
    138                 printf( "floor2(%hhd, %hhd) = %hhd, floor2(%hhd, %hhd) = %hhd, floor2(%hhd, %hhd) = %hhd\n", sc, sc, scr1, sc + 2hh, sc, scr2, -sc - 2hh, sc, scr3 );
    139         } // for
    140         printf( "\n" );
    141 
    142         printf( "unsigned char\n" );
     138//              printf( "floor2(%hhd, %hhd) = %hhd, floor2(%hhd, %hhd) = %hhd, floor2(%hhd, %hhd) = %hhd\n", sc, sc, scr1, sc + 2hh, sc, scr2, -sc - 2hh, sc, scr3 );
     139                sout | "floor2(" | sc | "," | sc | ") = " | scr1 | ", floor2(" | sc + 2hh | "," | sc | ") = " | scr2 | ", floor2(" | -sc - 2hh | "," | sc | ") = " | scr3;
     140        } // for
     141        sout | nl;
     142
     143        sout | "unsigned char";
    143144        for ( uc = 1; uc != 0; uc <<= 1 ) {
    144145                ucr1 = floor2( uc, uc ); ucr2 = floor2( uc + 2hh, uc ); ucr3 = floor2( -uc - 2hh, uc );
    145                 printf( "floor2(%hhu, %hhu) = %hhu, floor2(%hhu, %hhu) = %hhu, floor2(%hhu, %hhu) = %hhu\n", uc, uc, ucr1, uc + 2uhh, uc, ucr2, -uc - 2uhh, uc, ucr3 );
    146         } // for
    147         printf( "\n" );
    148 
    149         printf( "short int\n" );
     146//              printf( "floor2(%hhu, %hhu) = %hhu, floor2(%hhu, %hhu) = %hhu, floor2(%hhu, %hhu) = %hhu\n", uc, uc, ucr1, uc + 2uhh, uc, ucr2, -uc - 2uhh, uc, ucr3 );
     147                sout | "floor2(" | uc | "," | uc | ") = " | ucr1 | ", floor2(" | uc + 2uhh | "," | uc | ") = " | ucr2 | ", floor2(" | -uc - 2uhh | "," | uc | ") = " | ucr3;
     148        } // for
     149        sout | nl;
     150
     151        sout | "short int";
    150152        for ( si = 1; si != 0; si <<= 1 ) {
    151153                sir1 = floor2( si, si ); sir2 = floor2( si + 2hh, si ); sir3 = floor2( -si - 2hh, si );
    152                 printf( "floor2(%hd, %hd) = %hd, floor2(%hd, %hd) = %hd, floor2(%hd, %hd) = %hd\n", si, si, sir1, si + 2h, si, sir2, -si - 2h, si, sir3 );
    153         } // for
    154         printf( "\n" );
    155 
    156         printf( "unsigned short int\n" );
     154//              printf( "floor2(%hd, %hd) = %hd, floor2(%hd, %hd) = %hd, floor2(%hd, %hd) = %hd\n", si, si, sir1, si + 2h, si, sir2, -si - 2h, si, sir3 );
     155                sout | "floor2(" | si | "," | si | ") = " | sir1 | ", floor2(" | si + 2h | "," | si | ") = " | sir2 | ", floor2(" | -si - 2h | "," | si | ") = " | sir3;
     156        } // for
     157        sout | nl;
     158
     159        sout | "unsigned short int";
    157160        for ( usi = 1; usi != 0; usi <<= 1 ) {
    158161                usir1 = floor2( usi, usi ); usir2 = floor2( usi + 2hh, usi ); usir3 = floor2( -usi - 2hh, usi );
    159                 printf( "floor2(%hu, %hu) = %hu, floor2(%hu, %hu) = %hu, floor2(%hu, %hu) = %hu\n", usi, usi, usir1, usi + 2uh, usi, usir2, -usi - 2uh, usi, usir3 );
    160         } // for
    161         printf( "\n" );
    162 
    163         printf( "int\n" );
     162//              printf( "floor2(%hu, %hu) = %hu, floor2(%hu, %hu) = %hu, floor2(%hu, %hu) = %hu\n", usi, usi, usir1, usi + 2uh, usi, usir2, -usi - 2uh, usi, usir3 );
     163                sout | "floor2(" | usi | "," | usi | ") = " | usir1 | ", floor2(" | usi + 2uh | "," | usi | ") = " | usir2 | ", floor2(" | -usi - 2uh | "," | usi | ") = " | usir3;
     164        } // for
     165        sout | nl;
     166
     167        sout | "int";
    164168        for ( i = 1; i != 0; i <<= 1 ) {
    165169                ir1 = floor2( i, i ); ir2 = floor2( i + 2hh, i ); ir3 = floor2( -i - 2hh, i );
    166                 printf( "floor2(%d, %d) = %d, floor2(%d, %d) = %d, floor2(%d, %d) = %d\n", i, i, ir1, i + 2h, i, ir2, -i - 2h, i, ir3 );
    167         } // for
    168         printf( "\n" );
    169 
    170         printf( "unsigned int\n" );
     170//              printf( "floor2(%d, %d) = %d, floor2(%d, %d) = %d, floor2(%d, %d) = %d\n", i, i, ir1, i + 2, i, ir2, -i - 2, i, ir3 );
     171                sout | "floor2(" | i | "," | i | ") = " | ir1 | ", floor2(" | i + 2 | "," | i | ") = " | ir2 | ", floor2(" | -i - 2 | "," | i | ") = " | ir3;
     172        } // for
     173        sout | nl;
     174
     175        sout | "unsigned int";
    171176        for ( ui = 1; ui != 0; ui <<= 1 ) {
    172177                uir1 = floor2( ui, ui ); uir2 = floor2( ui + 2hh, ui ); uir3 = floor2( -ui - 2hh, ui );
    173                 printf( "floor2(%u, %u) = %u, floor2(%u, %u) = %u, floor2(%u, %u) = %u\n", ui, ui, uir1, ui + 2h, ui, uir2, -ui - 2h, ui, uir3 );
    174         } // for
    175         printf( "\n" );
    176 
    177         printf( "long int\n" );
     178//              printf( "floor2(%u, %u) = %u, floor2(%u, %u) = %u, floor2(%u, %u) = %u\n", ui, ui, uir1, ui + 2, ui, uir2, -ui - 2, ui, uir3 );
     179                sout | "floor2(" | ui | "," | ui | ") = " | uir1 | ", floor2(" | ui + 2 | "," | ui | ") = " | uir2 | ", floor2(" | -ui - 2 | "," | ui | ") = " | uir3;
     180        } // for
     181        sout | nl;
     182
     183        sout | "long int";
    178184        for ( li = 1; li != 0; li <<= 1 ) {
    179185                lir1 = floor2( li, li ); lir2 = floor2( li + 2hh, li ); lir3 = floor2( -li - 2hh, li );
    180                 printf( "floor2(%ld, %ld) = %ld, floor2(%ld, %ld) = %ld, floor2(%ld, %ld) = %ld\n", li, li, lir1, li + 2h, li, lir2, -li - 2h, li, lir3 );
    181         } // for
    182         printf( "\n" );
    183 
    184         printf( "unsigned long int\n" );
     186//              printf( "floor2(%ld, %ld) = %ld, floor2(%ld, %ld) = %ld, floor2(%ld, %ld) = %ld\n", li, li, lir1, li + 2l, li, lir2, -li - 2l, li, lir3 );
     187                sout | "floor2(" | li | "," | li | ") = " | lir1 | ", floor2(" | li + 2l | "," | li | ") = " | lir2 | ", floor2(" | -li - 2l | "," | li | ") = " | lir3;
     188        } // for
     189        sout | nl;
     190
     191        sout | "unsigned long int";
    185192        for ( uli = 1; uli != 0; uli <<= 1 ) {
    186193                ulir1 = floor2( uli, uli ); ulir2 = floor2( uli + 2hh, uli ); ulir3 = floor2( -uli - 2hh, uli );
    187                 printf( "floor2(%lu, %lu) = %lu, floor2(%lu, %lu) = %lu, floor2(%lu, %lu) = %lu\n", uli, uli, ulir1, uli + 2h, uli, ulir2, -uli - 2h, uli, ulir3 );
    188         } // for
    189         printf( "\n" );
    190 
    191         printf( "long long int\n" );
     194//              printf( "floor2(%lu, %lu) = %lu, floor2(%lu, %lu) = %lu, floor2(%lu, %lu) = %lu\n", uli, uli, ulir1, uli + 2l, uli, ulir2, -uli - 2l, uli, ulir3 );
     195                sout | "floor2(" | uli | "," | uli | ") = " | ulir1 | ", floor2(" | uli + 2l | "," | uli | ") = " | ulir2 | ", floor2(" | -uli - 2l | "," | uli | ") = " | ulir3;
     196        } // for
     197        sout | nl;
     198
     199        sout | "long long int";
    192200        for ( lli = 1; lli != 0; lli <<= 1 ) {
    193201                llir1 = floor2( lli, lli ); llir2 = floor2( lli + 2hh, lli ); llir3 = floor2( -lli - 2hh, lli );
    194                 printf( "floor2(%lld, %lld) = %lld, floor2(%lld, %lld) = %lld, floor2(%lld, %lld) = %lld\n", lli, lli, llir1, lli + 2h, lli, llir2, -lli - 2h, lli, llir3 );
    195         } // for
    196         printf( "\n" );
    197 
    198         printf( "unsigned long long int\n" );
     202//              printf( "floor2(%lld, %lld) = %lld, floor2(%lld, %lld) = %lld, floor2(%lld, %lld) = %lld\n", lli, lli, llir1, lli + 2ll, lli, llir2, -lli - 2ll, lli, llir3 );
     203                sout | "floor2(" | lli | "," | lli | ") = " | llir1 | ", floor2(" | lli + 2ll | "," | lli | ") = " | llir2 | ", floor2(" | -lli - 2ll | "," | lli | ") = " | llir3;
     204        } // for
     205        sout | nl;
     206
     207        sout | "unsigned long long int";
    199208        for ( ulli = 1; ulli != 0; ulli <<= 1 ) {
    200209                ullir1 = floor2( ulli, ulli ); ullir2 = floor2( ulli + 2hh, ulli ); ullir3 = floor2( -ulli - 2hh, ulli );
    201                 printf( "floor2(%llu, %llu) = %llu, floor2(%llu, %llu) = %llu, floor2(%llu, %llu) = %llu\n", ulli, ulli, ullir1, ulli + 2h, ulli, ullir2, -ulli - 2h, ulli, ullir3 );
    202         } // for
    203         printf( "\n" );
     210//              printf( "floor2(%llu, %llu) = %llu, floor2(%llu, %llu) = %llu, floor2(%llu, %llu) = %llu\n", ulli, ulli, ullir1, ulli + 2h, ulli, ullir2, -ulli - 2h, ulli, ullir3 );
     211                sout | "floor2(" | ulli | "," | ulli | ") = " | ullir1 | ", floor2(" | ulli + 2ll | "," | ulli | ") = " | ullir2 | ", floor2(" | -ulli - 2ll | "," | ulli | ") = " | ullir3;
     212        } // for
     213        sout | nl;
    204214#endif // 0
    205215        //============================================================
     
    207217        sout | nl | "ceiling2" | nl | nl;
    208218
    209         printf( "signed char\n" );
     219        sout | "signed char";
    210220        for ( sc = 1; sc != 0; sc <<= 1 ) {
    211221                scr1 = ceiling2( sc, sc ); scr2 = ceiling2( sc + 2hh, sc ); scr3 = ceiling2( -sc - 2hh, sc );
    212                 printf( "ceiling2(%hhd, %hhd) = %hhd, ceiling2(%hhd, %hhd) = %hhd, ceiling2(%hhd, %hhd) = %hhd\n", sc, sc, scr1, sc + 2hh, sc, scr2, -sc - 2hh, sc, scr3 );
    213         } // for
    214         printf( "\n" );
    215 
    216         printf( "unsigned char\n" );
     222//              printf( "ceiling2(%hhd, %hhd) = %hhd, ceiling2(%hhd, %hhd) = %hhd, ceiling2(%hhd, %hhd) = %hhd\n", sc, sc, scr1, sc + 2hh, sc, scr2, -sc - 2hh, sc, scr3 );
     223                sout | "ceiling2(" | sc | "," | sc | ") = " | scr1 | ", ceiling2(" | sc + 2hh | "," | sc | ") = " | scr2 | ", ceiling2(" | -sc - 2hh | "," | sc | ") = " | scr3;
     224        } // for
     225        sout | nl;
     226
     227        sout | "unsigned char";
    217228        for ( uc = 1; uc != 0; uc <<= 1 ) {
    218229                ucr1 = ceiling2( uc, uc ); ucr2 = ceiling2( uc + 2hh, uc ); ucr3 = ceiling2( -uc - 2hh, uc );
    219                 printf( "ceiling2(%hhu, %hhu) = %hhu, ceiling2(%hhu, %hhu) = %hhu, ceiling2(%hhu, %hhu) = %hhu\n", uc, uc, ucr1, uc + 2uhh, uc, ucr2, -uc - 2uhh, uc, ucr3 );
    220         } // for
    221         printf( "\n" );
    222 
    223         printf( "short int\n" );
     230//              printf( "ceiling2(%hhu, %hhu) = %hhu, ceiling2(%hhu, %hhu) = %hhu, ceiling2(%hhu, %hhu) = %hhu\n", uc, uc, ucr1, uc + 2uhh, uc, ucr2, -uc - 2uhh, uc, ucr3 );
     231                sout | "ceiling2(" | uc | "," | uc | ") = " | ucr1 | ", ceiling2(" | uc + 2hh | "," | uc | ") = " | ucr2 | ", ceiling2(" | -uc - 2hh | "," | uc | ") = " | ucr3;
     232        } // for
     233        sout | nl;
     234
     235        sout | "short int";
    224236        for ( si = 1; si != 0; si <<= 1 ) {
    225237                sir1 = ceiling2( si, si ); sir2 = ceiling2( si + 2hh, si ); sir3 = ceiling2( -si - 2hh, si );
    226                 printf( "ceiling2(%hd, %hd) = %hd, ceiling2(%hd, %hd) = %hd, ceiling2(%hd, %hd) = %hd\n", si, si, sir1, si + 2h, si, sir2, -si - 2h, si, sir3 );
    227         } // for
    228         printf( "\n" );
    229 
    230         printf( "unsigned short int\n" );
     238//              printf( "ceiling2(%hd, %hd) = %hd, ceiling2(%hd, %hd) = %hd, ceiling2(%hd, %hd) = %hd\n", si, si, sir1, si + 2h, si, sir2, -si - 2h, si, sir3 );
     239                sout | "ceiling2(" | si | "," | si | ") = " | sir1 | ", ceiling2(" | si + 2h | "," | si | ") = " | sir2 | ", ceiling2(" | -si - 2h | "," | si | ") = " | sir3;
     240        } // for
     241        sout | nl;
     242
     243        sout | "unsigned short int";
    231244        for ( usi = 1; usi != 0; usi <<= 1 ) {
    232245                usir1 = ceiling2( usi, usi ); usir2 = ceiling2( usi + 2hh, usi ); usir3 = ceiling2( -usi - 2hh, usi );
    233                 printf( "ceiling2(%hu, %hu) = %hu, ceiling2(%hu, %hu) = %hu, ceiling2(%hu, %hu) = %hu\n", usi, usi, usir1, usi + 2uh, usi, usir2, -usi - 2uh, usi, usir3 );
    234         } // for
    235         printf( "\n" );
    236 
    237         printf( "int\n" );
     246//              printf( "ceiling2(%hu, %hu) = %hu, ceiling2(%hu, %hu) = %hu, ceiling2(%hu, %hu) = %hu\n", usi, usi, usir1, usi + 2uh, usi, usir2, -usi - 2uh, usi, usir3 );
     247                sout | "ceiling2(" | usi | "," | usi | ") = " | usir1 | ", ceiling2(" | usi + 2h | "," | usi | ") = " | usir2 | ", ceiling2(" | -usi - 2h | "," | usi | ") = " | usir3;
     248        } // for
     249        sout | nl;
     250
     251        sout | "int";
    238252        for ( i = 1; i != 0; i <<= 1 ) {
    239253                ir1 = ceiling2( i, i ); ir2 = ceiling2( i + 2hh, i ); ir3 = ceiling2( -i - 2hh, i );
    240                 printf( "ceiling2(%d, %d) = %d, ceiling2(%d, %d) = %d, ceiling2(%d, %d) = %d\n", i, i, ir1, i + 2h, i, ir2, -i - 2h, i, ir3 );
    241         } // for
    242         printf( "\n" );
    243 
    244         printf( "unsigned int\n" );
     254//              printf( "ceiling2(%d, %d) = %d, ceiling2(%d, %d) = %d, ceiling2(%d, %d) = %d\n", i, i, ir1, i + 2, i, ir2, -i - 2, i, ir3 );
     255                sout | "ceiling2(" | i | "," | i | ") = " | ir1 | ", ceiling2(" | i + 2 | "," | i | ") = " | ir2 | ", ceiling2(" | -i - 2 | "," | i | ") = " | ir3;
     256        } // for
     257        sout | nl;
     258
     259        sout | "unsigned int";
    245260        for ( ui = 1; ui != 0; ui <<= 1 ) {
    246261                uir1 = ceiling2( ui, ui ); uir2 = ceiling2( ui + 2hh, ui ); uir3 = ceiling2( -ui - 2hh, ui );
    247                 printf( "ceiling2(%u, %u) = %u, ceiling2(%u, %u) = %u, ceiling2(%u, %u) = %u\n", ui, ui, uir1, ui + 2h, ui, uir2, -ui - 2h, ui, uir3 );
    248         } // for
    249         printf( "\n" );
    250 
    251         printf( "long int\n" );
     262//              printf( "ceiling2(%u, %u) = %u, ceiling2(%u, %u) = %u, ceiling2(%u, %u) = %u\n", ui, ui, uir1, ui + 2, ui, uir2, -ui - 2, ui, uir3 );
     263                sout | "ceiling2(" | ui | "," | ui | ") = " | uir1 | ", ceiling2(" | ui + 2 | "," | ui | ") = " | uir2 | ", ceiling2(" | -ui - 2 | "," | ui | ") = " | uir3;
     264        } // for
     265        sout | nl;
     266
     267        sout | "long int";
    252268        for ( li = 1; li != 0; li <<= 1 ) {
    253269                lir1 = ceiling2( li, li ); lir2 = ceiling2( li + 2hh, li ); lir3 = ceiling2( -li - 2hh, li );
    254                 printf( "ceiling2(%ld, %ld) = %ld, ceiling2(%ld, %ld) = %ld, ceiling2(%ld, %ld) = %ld\n", li, li, lir1, li + 2h, li, lir2, -li - 2h, li, lir3 );
    255         } // for
    256         printf( "\n" );
    257 
    258         printf( "unsigned long int\n" );
     270//              printf( "ceiling2(%ld, %ld) = %ld, ceiling2(%ld, %ld) = %ld, ceiling2(%ld, %ld) = %ld\n", li, li, lir1, li + 2l, li, lir2, -li - 2l, li, lir3 );
     271                sout | "ceiling2(" | li | "," | li | ") = " | lir1 | ", ceiling2(" | li + 2l | "," | li | ") = " | lir2 | ", ceiling2(" | -li - 2l | "," | li | ") = " | lir3;
     272        } // for
     273        sout | nl;
     274
     275        sout | "unsigned long int";
    259276        for ( uli = 1; uli != 0; uli <<= 1 ) {
    260277                ulir1 = ceiling2( uli, uli ); ulir2 = ceiling2( uli + 2hh, uli ); ulir3 = ceiling2( -uli - 2hh, uli );
    261                 printf( "ceiling2(%lu, %lu) = %lu, ceiling2(%lu, %lu) = %lu, ceiling2(%lu, %lu) = %lu\n", uli, uli, ulir1, uli + 2h, uli, ulir2, -uli - 2h, uli, ulir3 );
    262         } // for
    263         printf( "\n" );
    264 
    265         printf( "long long int\n" );
     278//              printf( "ceiling2(%lu, %lu) = %lu, ceiling2(%lu, %lu) = %lu, ceiling2(%lu, %lu) = %lu\n", uli, uli, ulir1, uli + 2, uli, ulir2, -uli - 2, uli, ulir3 );
     279                sout | "ceiling2(" | uli | "," | uli | ") = " | ulir1 | ", ceiling2(" | uli + 2l | "," | uli | ") = " | ulir2 | ", ceiling2(" | -uli - 2l | "," | uli | ") = " | ulir3;
     280        } // for
     281        sout | nl;
     282
     283        sout | "long long int";
    266284        for ( lli = 1; lli != 0; lli <<= 1 ) {
    267285                llir1 = ceiling2( lli, lli ); llir2 = ceiling2( lli + 2hh, lli ); llir3 = ceiling2( -lli - 2hh, lli );
    268                 printf( "ceiling2(%lld, %lld) = %lld, ceiling2(%lld, %lld) = %lld, ceiling2(%lld, %lld) = %lld\n", lli, lli, llir1, lli + 2h, lli, llir2, -lli - 2h, lli, llir3 );
    269         } // for
    270         printf( "\n" );
    271 
    272         printf( "unsigned long long int\n" );
     286//              printf( "ceiling2(%lld, %lld) = %lld, ceiling2(%lld, %lld) = %lld, ceiling2(%lld, %lld) = %lld\n", lli, lli, llir1, lli + 2ll, lli, llir2, -lli - 2ll, lli, llir3 );
     287                sout | "ceiling2(" | lli | "," | lli | ") = " | llir1 | ", ceiling2(" | lli + 2ll | "," | lli | ") = " | llir2 | ", ceiling2(" | -lli - 2ll | "," | lli | ") = " | llir3;
     288        } // for
     289        sout | nl;
     290
     291        sout | "unsigned long long int";
    273292        for ( ulli = 1; ulli != 0; ulli <<= 1 ) {
    274293                ullir1 = ceiling2( ulli, ulli ); ullir2 = ceiling2( ulli + 2hh, ulli ); ullir3 = ceiling2( -ulli - 2hh, ulli );
    275                 printf( "ceiling2(%llu, %llu) = %llu, ceiling2(%llu, %llu) = %llu, ceiling2(%llu, %llu) = %llu\n", ulli, ulli, ullir1, ulli + 2h, ulli, ullir2, -ulli - 2h, ulli, ullir3 );
    276         } // for
    277         printf( "\n" );
     294//              printf( "ceiling2(%llu, %llu) = %llu, ceiling2(%llu, %llu) = %llu, ceiling2(%llu, %llu) = %llu\n", ulli, ulli, ullir1, ulli + 2h, ulli, ullir2, -ulli - 2h, ulli, ullir3 );
     295                sout | "ceiling2(" | ulli | "," | ulli | ") = " | ullir1 | ", ceiling2(" | ulli + 2ll | "," | ulli | ") = " | ullir2 | ", ceiling2(" | -ulli - 2ll | "," | ulli | ") = " | ullir3;
     296        } // for
     297        sout | nl;
    278298#endif // 0
    279299} // main
  • tests/exceptions/.expect/type-check.txt

    rdd1cc02 r5a40e4e  
    1 exceptions/type-check.cfa:8:1 error: catch must have pointer to an exception type
    2 exceptions/type-check.cfa:9:1 error: catch must have pointer to an exception type
    3 exceptions/type-check.cfa:10:1 error: catchResume must have pointer to an exception type
    4 exceptions/type-check.cfa:11:1 error: catchResume must have pointer to an exception type
     1exceptions/type-check.cfa:6:1 error: catch must have pointer to an exception type
     2exceptions/type-check.cfa:7:1 error: catch must have pointer to an exception type
     3exceptions/type-check.cfa:8:1 error: catchResume must have pointer to an exception type
     4exceptions/type-check.cfa:9:1 error: catchResume must have pointer to an exception type
  • tests/exceptions/cancel/coroutine.cfa

    rdd1cc02 r5a40e4e  
    22
    33#include <coroutine.hfa>
    4 #include <exception.hfa>
    54
    6 EHM_EXCEPTION(internal_error)();
    7 EHM_VIRTUAL_TABLE(internal_error, internal_vt);
     5exception internal_error {};
     6vtable(internal_error) internal_vt;
    87
    98coroutine WillCancel {};
  • tests/exceptions/cancel/thread.cfa

    rdd1cc02 r5a40e4e  
    22
    33#include <thread.hfa>
    4 #include <exception.hfa>
    54
    6 EHM_EXCEPTION(internal_error)();
    7 EHM_VIRTUAL_TABLE(internal_error, internal_vt);
     5exception internal_error {};
     6vtable(internal_error) internal_vt;
    87
    98thread WillCancel {};
  • tests/exceptions/conditional.cfa

    rdd1cc02 r5a40e4e  
    44// up the non-trivial exception is reasonable to do.
    55
    6 #include <exception.hfa>
     6exception num_error {
     7        int num;
     8};
    79
    8 EHM_EXCEPTION(num_error)(
    9         int num;
    10 );
    11 
    12 EHM_VIRTUAL_TABLE(num_error, num_error_vt);
     10vtable(num_error) num_error_vt;
    1311
    1412void caught_num_error(int expect, num_error * actual) {
  • tests/exceptions/data-except.cfa

    rdd1cc02 r5a40e4e  
    11// Test exceptions that add data but no functionality.
    22
    3 #include <exception.hfa>
    4 
    5 EHM_EXCEPTION(paired)(
     3exception paired {
    64        int first;
    75        int second;
    8 );
     6};
    97
    10 EHM_VIRTUAL_TABLE(paired, paired_vt);
     8vtable(paired) paired_vt;
    119
    1210const char * virtual_msg(paired * this) {
  • tests/exceptions/defaults.cfa

    rdd1cc02 r5a40e4e  
    44#include <exception.hfa>
    55
    6 EHM_EXCEPTION(log_message)(
     6exception log_message {
    77        char * msg;
    8 );
     8};
    99
    1010_EHM_DEFINE_COPY(log_message, )
     
    3232
    3333// I don't have a good use case for doing the same with termination.
    34 EHM_EXCEPTION(jump)();
     34exception jump {};
    3535void defaultTerminationHandler(jump &) {
    3636        printf("jump default handler.\n");
    3737}
    3838
    39 EHM_VIRTUAL_TABLE(jump, jump_vt);
     39vtable(jump) jump_vt;
    4040
    4141void jump_test(void) {
     
    4848}
    4949
    50 EHM_EXCEPTION(first)();
    51 EHM_VIRTUAL_TABLE(first, first_vt);
     50exception first {};
     51vtable(first) first_vt;
    5252
    53 EHM_EXCEPTION(unhandled_exception)();
    54 EHM_VIRTUAL_TABLE(unhandled_exception, unhandled_vt);
     53exception unhandled_exception {};
     54vtable(unhandled_exception) unhandled_vt;
    5555
    5656void unhandled_test(void) {
     
    6969}
    7070
    71 EHM_EXCEPTION(second)();
    72 EHM_VIRTUAL_TABLE(second, second_vt);
     71exception second {};
     72vtable(second) second_vt;
    7373
    7474void cross_test(void) {
  • tests/exceptions/finally.cfa

    rdd1cc02 r5a40e4e  
    11// Finally Clause Tests
    22
    3 #include <exception.hfa>
    43#include "except-io.hfa"
    54
    6 EHM_EXCEPTION(myth)();
     5exception myth {};
    76
    8 EHM_VIRTUAL_TABLE(myth, myth_vt);
     7vtable(myth) myth_vt;
    98
    109int main(int argc, char * argv[]) {
  • tests/exceptions/interact.cfa

    rdd1cc02 r5a40e4e  
    11// Testing Interactions Between Termination and Resumption
    22
    3 #include <exception.hfa>
    43#include "except-io.hfa"
    54
    6 EHM_EXCEPTION(star)();
    7 EHM_EXCEPTION(moon)();
     5exception star {};
     6exception moon {};
    87
    9 EHM_VIRTUAL_TABLE(star, star_vt);
    10 EHM_VIRTUAL_TABLE(moon, moon_vt);
     8vtable(star) star_vt;
     9vtable(moon) moon_vt;
    1110
    1211int main(int argc, char * argv[]) {
  • tests/exceptions/polymorphic.cfa

    rdd1cc02 r5a40e4e  
    11// Testing polymophic exception types.
    22
    3 #include <exception.hfa>
     3forall(T &) exception proxy {};
    44
    5 EHM_FORALL_EXCEPTION(proxy, (T&), (T))();
    6 
    7 EHM_FORALL_VIRTUAL_TABLE(proxy, (int), proxy_int);
    8 EHM_FORALL_VIRTUAL_TABLE(proxy, (char), proxy_char);
     5vtable(proxy(int)) proxy_int;
     6vtable(proxy(char)) proxy_char;
    97
    108void proxy_test(void) {
     
    3331}
    3432
    35 EHM_FORALL_EXCEPTION(cell, (T), (T))(
     33forall(T) exception cell {
    3634        T data;
    37 );
     35};
    3836
    39 EHM_FORALL_VIRTUAL_TABLE(cell, (int), int_cell);
    40 EHM_FORALL_VIRTUAL_TABLE(cell, (char), char_cell);
    41 EHM_FORALL_VIRTUAL_TABLE(cell, (bool), bool_cell);
     37vtable(cell(int)) int_cell;
     38vtable(cell(char)) char_cell;
     39vtable(cell(bool)) bool_cell;
    4240
    4341void cell_test(void) {
  • tests/exceptions/resume.cfa

    rdd1cc02 r5a40e4e  
    11// Resumption Exception Tests
    22
    3 #include <exception.hfa>
    43#include "except-io.hfa"
    54
    6 EHM_EXCEPTION(yin)();
    7 EHM_EXCEPTION(yang)();
    8 EHM_EXCEPTION(zen)();
     5exception yin {};
     6exception yang {};
     7exception zen {};
    98
    10 EHM_VIRTUAL_TABLE(yin, yin_vt);
    11 EHM_VIRTUAL_TABLE(yang, yang_vt);
    12 EHM_VIRTUAL_TABLE(zen, zen_vt);
     9vtable(yin) yin_vt;
     10vtable(yang) yang_vt;
     11vtable(zen) zen_vt;
    1312
    1413void in_void(void);
  • tests/exceptions/terminate.cfa

    rdd1cc02 r5a40e4e  
    11// Termination Exception Tests
    22
    3 #include <exception.hfa>
    43#include "except-io.hfa"
    54
    6 EHM_EXCEPTION(yin)();
    7 EHM_EXCEPTION(yang)();
    8 EHM_EXCEPTION(zen)();
     5exception yin {};
     6exception yang {};
     7exception zen {};
    98
    10 EHM_VIRTUAL_TABLE(yin, yin_vt);
    11 EHM_VIRTUAL_TABLE(yang, yang_vt);
    12 EHM_VIRTUAL_TABLE(zen, zen_vt);
     9vtable(yin) yin_vt;
     10vtable(yang) yang_vt;
     11vtable(zen) zen_vt;
    1312
    1413void in_void(void);
  • tests/exceptions/trash.cfa

    rdd1cc02 r5a40e4e  
    11// Make sure throw-catch during unwind does not trash internal data.
    22
    3 #include <exception.hfa>
     3exception yin {};
     4exception yang {};
    45
    5 EHM_EXCEPTION(yin)();
    6 EHM_EXCEPTION(yang)();
    7 
    8 EHM_VIRTUAL_TABLE(yin, yin_vt);
    9 EHM_VIRTUAL_TABLE(yang, yang_vt);
     6vtable(yin) yin_vt;
     7vtable(yang) yang_vt;
    108
    119int main(int argc, char * argv[]) {
  • tests/exceptions/type-check.cfa

    rdd1cc02 r5a40e4e  
    11// Check that the exception type check works.
    22
    3 #include <exception.hfa>
    4 
    5 EHM_EXCEPTION(truth)();
     3exception truth {};
    64
    75int main(int argc, char * argv[]) {
  • tests/mathX.cfa

    rdd1cc02 r5a40e4e  
    1010// Created On       : Thu May 24 20:56:54 2018
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sat Feb 20 18:26:38 2021
    13 // Update Count     : 30
     12// Last Modified On : Sun Aug  8 22:33:46 2021
     13// Update Count     : 31
    1414//
    1515
     
    255255                sout | "ceiling(" | ulli | ", " | ulli | ") = " | ullir1 | ", ceiling(" | ulli + 2ull | ", " | ulli | ") = " | ullir2 | ", ceiling(" | -ulli - 2ull | ", " | ulli | ") = " | ullir3;
    256256        } // for
    257         printf( "\n" );
     257        sout | nl;
    258258#endif // 0
    259259} // main
Note: See TracChangeset for help on using the changeset viewer.