Changeset 66812dd


Ignore:
Timestamp:
Sep 27, 2020, 10:00:39 PM (3 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
0a19c51
Parents:
bd47f35
Message:

convert tests to always print output (no empty .expect files)

Location:
tests
Files:
66 edited

Legend:

Unmodified
Added
Removed
  • tests/.expect/array.txt

    rbd47f35 r66812dd  
     1array.cfa: In function '_X4mainFi___1':
     2array.cfa:54:9: note: #pragma message: Compiled
     3   54 |
     4      |         ^     
  • tests/.expect/cast.txt

    rbd47f35 r66812dd  
     1cast.cfa: In function '_X4mainFi_iPPKc__1':
     2cast.cfa:18:9: note: #pragma message: Compiled
  • tests/.expect/enum.txt

    rbd47f35 r66812dd  
     1done
  • tests/.expect/expression.txt

    rbd47f35 r66812dd  
     1expression.cfa: In function '_X4mainFi___1':
     2expression.cfa:88:9: note: #pragma message: Compiled
  • tests/.expect/forall.txt

    rbd47f35 r66812dd  
     1forall.cfa: In function '_X4mainFi___1':
     2forall.cfa:218:9: note: #pragma message: Compiled
     3  218 |
     4      |         ^     
  • tests/.expect/heap.txt

    rbd47f35 r66812dd  
     1done
  • tests/.expect/identFuncDeclarator.txt

    rbd47f35 r66812dd  
     1identFuncDeclarator.cfa: In function '_X4mainFi___1':
     2identFuncDeclarator.cfa:116:9: note: #pragma message: Compiled
     3  116 |
     4      |         ^     
  • tests/.expect/identParamDeclarator.txt

    rbd47f35 r66812dd  
     1done
  • tests/.expect/labelledExit.txt

    rbd47f35 r66812dd  
     1labelledExit.cfa: In function '_X4mainFi_iPPKc__1':
     2labelledExit.cfa:183:9: note: #pragma message: Compiled
     3  183 |
     4      |         ^     
  • tests/.expect/limits.txt

    rbd47f35 r66812dd  
     1limits.cfa: In function '_X4mainFi_iPPKc__1':
     2limits.cfa:151:9: note: #pragma message: Compiled
     3  151 |
     4      |         ^     
  • tests/.expect/maybe.txt

    rbd47f35 r66812dd  
     1done
  • tests/.expect/nested-types.txt

    rbd47f35 r66812dd  
     1nested-types.cfa: In function '_X4mainFi___1':
     2nested-types.cfa:102:9: note: #pragma message: Compiled
     3  102 |
     4      |         ^     
  • tests/.expect/numericConstants.txt

    rbd47f35 r66812dd  
     1numericConstants.cfa: In function '_X4mainFi___1':
     2numericConstants.cfa:68:9: note: #pragma message: Compiled
     3   68 |
     4      |         ^     
  • tests/.expect/operators.txt

    rbd47f35 r66812dd  
     1done
  • tests/.expect/result.txt

    rbd47f35 r66812dd  
     1done
  • tests/.expect/stdincludes.txt

    rbd47f35 r66812dd  
     1stdincludes.cfa: In function '_X4mainFi___1':
     2stdincludes.cfa:52:9: note: #pragma message: Compiled
     3   52 |
     4      |         ^     
  • tests/.expect/switch.txt

    rbd47f35 r66812dd  
     1switch.cfa: In function '_X4mainFi___1':
     2switch.cfa:105:9: note: #pragma message: Compiled
     3  105 |
     4      |         ^     
  • tests/.expect/typedefRedef-ERR1.txt

    rbd47f35 r66812dd  
    11typedefRedef.cfa:4:1 error: Cannot redefine typedef: Foo
    2 typedefRedef.cfa:60:1 error: Cannot redefine typedef: ARR
     2typedefRedef.cfa:59:1 error: Cannot redefine typedef: ARR
  • tests/.expect/typedefRedef.txt

    rbd47f35 r66812dd  
     1typedefRedef.cfa: In function '_X4mainFi___1':
     2typedefRedef.cfa:71:9: note: #pragma message: Compiled
  • tests/.expect/typeof.txt

    rbd47f35 r66812dd  
     1done
  • tests/.expect/variableDeclarator.txt

    rbd47f35 r66812dd  
     1variableDeclarator.cfa: In function '_X4mainFi_iPPKc__1':
     2variableDeclarator.cfa:182:9: note: #pragma message: Compiled
     3  182 |
     4      |         ^     
  • tests/.expect/voidPtr.txt

    rbd47f35 r66812dd  
     1done
  • tests/Makefile.am

    rbd47f35 r66812dd  
    1111## Created On       : Sun May 31 09:08:15 2015
    1212## Last Modified By : Peter A. Buhr
    13 ## Last Modified On : Tue Nov 20 11:18:51 2018
    14 ## Update Count     : 68
     13## Last Modified On : Sun Sep 27 19:01:41 2020
     14## Update Count     : 84
    1515###############################################################################
    1616
     
    133133        $(CFACOMPILETEST) -CFA -XCFA -p -c -fsyntax-only -o $(abspath ${@})
    134134
    135 # Use for tests where the make command is expected to succeed but the expected.txt should be compared to stderr
    136 EXPECT_STDERR = builtins/sync warnings/self-assignment
    137 $(EXPECT_STDERR): % : %.cfa $(CFACCBIN)
    138         $(CFACOMPILETEST) -c -fsyntax-only 2> $(abspath ${@})
    139 
    140135#------------------------------------------------------------------------------
    141136# CUSTOM TARGET
    142137#------------------------------------------------------------------------------
    143 # tests that just validate syntax
    144 expression : expression.cfa $(CFACCBIN)
    145         $(CFACOMPILETEST) -c -fsyntax-only 2> $(abspath ${@})
     138# tests that just validate syntax and compiler output should be compared to stderr
     139SYNTAX_ONLY_CODE = expression typedefRedef variableDeclarator switch numericConstants identFuncDeclarator forall limits nested-types stdincludes cast labelledExit array builtins/sync warnings/self-assignment
     140$(SYNTAX_ONLY_CODE): % : %.cfa $(CFACCBIN)
     141        $(CFACOMPILETEST) -Wno-unused-variable -Wno-unused-label -c -fsyntax-only 2> $(abspath ${@})
    146142
    147143# expected failures
  • tests/array.cfa

    rbd47f35 r66812dd  
    1111// Created On       : Tue Feb 19 21:18:06 2019
    1212// Last Modified By : Peter A. Buhr
    13 // Last Modified On : Tue Feb 19 21:18:46 2019
    14 // Update Count     : 1
     13// Last Modified On : Sun Sep 27 09:05:40 2020
     14// Update Count     : 4
    1515//
    1616
    17 int a1[];
     17int a1[0];
    1818//int a2[*];
    1919//double a4[3.0];
    2020
    21 int m1[][3];
     21int m1[0][3];
    2222//int m2[*][*];
    2323int m4[3][3];
     
    4949}
    5050
    51 int main() {}
     51int main() {
     52        #pragma message( "Compiled" )                                           // force non-empty .expect file
     53}
    5254
    5355// Local Variables: //
  • tests/builtins/sync.cfa

    rbd47f35 r66812dd  
    355355
    356356int main() {
    357         return 0;
     357        #pragma message( "Compiled" )                   // force non-empty .expect file
    358358}
  • tests/cast.cfa

    rbd47f35 r66812dd  
    1313
    1414//Dummy main
    15 int main(int argc, char const *argv[])
    16 {
    17         return 0;
     15int main( int argc, char const * argv[] ) {
     16        #pragma message( "Compiled" )                   // force non-empty .expect file
    1817}
  • tests/concurrent/.expect/cluster.txt

    rbd47f35 r66812dd  
     1done
  • tests/concurrent/cluster.cfa

    rbd47f35 r66812dd  
    3232                }
    3333        }
    34         return 0;
     34        printf( "done\n" );                             // non-empty .expect file
    3535}
  • tests/concurrent/examples/.expect/datingService.txt

    rbd47f35 r66812dd  
     1done
  • tests/concurrent/examples/datingService.cfa

    rbd47f35 r66812dd  
    1010// Created On       : Mon Oct 30 12:56:20 2017
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Jun 21 11:32:34 2019
    13 // Update Count     : 38
     12// Last Modified On : Sun Sep 27 15:42:25 2020
     13// Update Count     : 40
    1414//
    1515
     
    108108                if ( girlck[ boyck[i] ] != boyck[ girlck[i] ] ) abort();
    109109        } // for
     110
     111        printf( "done\n" );                                                                     // non-empty .expect file
    110112} // main
    111113
  • tests/concurrent/futures/.expect/basic.txt

    rbd47f35 r66812dd  
     1done
  • tests/concurrent/futures/basic.cfa

    rbd47f35 r66812dd  
    9191                }
    9292        }
     93        printf( "done\n" );                             // non-empty .expect file
     94
    9395}
  • tests/concurrent/park/.expect/force_preempt.txt

    rbd47f35 r66812dd  
     1done
  • tests/concurrent/park/.expect/start_parked.txt

    rbd47f35 r66812dd  
     1done
  • tests/concurrent/park/force_preempt.cfa

    rbd47f35 r66812dd  
    5757                Waiter waiters[5];
    5858        }
     59        printf( "done\n" );                             // non-empty .expect file
    5960}
  • tests/concurrent/park/start_parked.cfa

    rbd47f35 r66812dd  
    33thread Parker {};
    44void main( Parker & ) {
    5       park( __cfaabi_dbg_ctx );
     5        park( __cfaabi_dbg_ctx );
    66}
    77
    88int main() {
    9       for(1000) {
    10             Parker parker;
    11             unpark( parker __cfaabi_dbg_ctx2 );
    12       }
     9        for(1000) {
     10                Parker parker;
     11                unpark( parker __cfaabi_dbg_ctx2 );
     12        }
     13        printf( "done\n" );                                                                     // non-empty .expect file
    1314}
  • tests/enum.cfa

    rbd47f35 r66812dd  
    2626//Dummy main
    2727int main(int argc, char const *argv[]) {
     28        printf( "done\n" );                             // non-empty .expect file
    2829}
  • tests/exceptions/.expect/virtual-cast.txt

    rbd47f35 r66812dd  
     1done
  • tests/exceptions/.expect/virtual-poly.txt

    rbd47f35 r66812dd  
     1done
  • tests/exceptions/virtual-cast.cfa

    rbd47f35 r66812dd  
    7474        free(tri);
    7575        free(top);
     76        printf( "done\n" );                             // non-empty .expect file
    7677}
  • tests/exceptions/virtual-poly.cfa

    rbd47f35 r66812dd  
    7777        mono_poly_test();
    7878        poly_poly_test();
     79        printf( "done\n" );                             // non-empty .expect file
    7980}
  • tests/expression.cfa

    rbd47f35 r66812dd  
    88
    99int main() {
    10     int a[3] = { 0, 0, 0 };
    11     S s = { 3 }, * ps = &s;
    12     [int] t = { 3 };
    13     * [int] pt = &t;
    14     int i = 1, j = 2;
     10        int a[3] = { 0, 0, 0 };
     11        S s = { 3 }, * ps = &s;
     12        [int] t = { 3 };
     13        * [int] pt = &t;
     14        int i = 1, j = 2;
    1515
    16     // operators
     16        // operators
    1717
    18     !i;
    19     ~i;
    20     +i;
    21     -i;
    22     *ps;
    23     ++ps;
    24     --ps;
    25     ps++;
    26     ps--;
     18        !i;
     19        ~i;
     20        +i;
     21        -i;
     22        *ps;
     23        ++ps;
     24        --ps;
     25        ps++;
     26        ps--;
    2727
    28     i + j;
    29     i - j;
    30     i * j;
     28        i + j;
     29        i - j;
     30        i * j;
    3131
    32     i / j;
    33     i % j;
    34     i ^ j;
    35     i & j;
    36     i | j;
    37     i < j;
    38     i > j;
    39     i = j;
     32        i / j;
     33        i % j;
     34        i ^ j;
     35        i & j;
     36        i | j;
     37        i < j;
     38        i > j;
     39        i = j;
    4040
    41     i == j;
    42     i != j;
    43     i << j;
    44     i >> j;
    45     i <= j;
    46     i >= j;
    47     i && j;
    48     i || j;
    49     ps->i;
     41        i == j;
     42        i != j;
     43        i << j;
     44        i >> j;
     45        i <= j;
     46        i >= j;
     47        i && j;
     48        i || j;
     49        ps->i;
    5050
    51     i *= j;
    52     i /= j;
    53     i %= j;
    54     i += j;
    55     i -= j;
    56     i &= j;
    57     i |= j;
    58     i ^= j;
    59     i <<= j;
    60     i >>= j;
     51        i *= j;
     52        i /= j;
     53        i %= j;
     54        i += j;
     55        i -= j;
     56        i &= j;
     57        i |= j;
     58        i ^= j;
     59        i <<= j;
     60        i >>= j;
    6161
    62     i ? i : j;
     62        i ? i : j;
    6363
    64     // postfix function call
     64        // postfix function call
    6565
    66     (3 + 4)`mary;
    67     ({3 + 4;})`mary;
    68     [3, 4]`mary;
    69     3`mary;
    70     a[0]`mary;
    71     a[0]`mary`mary;
    72     s{0}`mary;
    73     a[3]`jane++;
    74     jack(3)`mary;
    75     s.i`mary;
    76     t.0`mary;
    77     s.[i]`mary;
    78     ps->i`mary;
    79     pt->0`mary;
    80     ps->[i]`mary;
    81     i++`mary;
    82     i--`mary;
    83     (S){2}`mary;
    84     (S)@{2}`mary;
     66        (3 + 4)`mary;
     67        ({3 + 4;})`mary;
     68        [3, 4]`mary;
     69        3`mary;
     70        a[0]`mary;
     71        a[0]`mary`mary;
     72        s{0}`mary;
     73        a[3]`jane++;
     74        jack(3)`mary;
     75        s.i`mary;
     76        t.0`mary;
     77        s.[i]`mary;
     78        ps->i`mary;
     79        pt->0`mary;
     80        ps->[i]`mary;
     81        i++`mary;
     82        i--`mary;
     83        (S){2}`mary;
     84        (S)@{2}`mary;
     85
     86        #pragma message( "Compiled" )                   // force non-empty .expect file
    8587} // main
  • tests/forall.cfa

    rbd47f35 r66812dd  
    1010// Created On       : Wed May  9 08:48:15 2018
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Mar 19 08:29:38 2019
    13 // Update Count     : 32
     12// Last Modified On : Sun Sep 27 08:43:20 2020
     13// Update Count     : 35
    1414//
    1515
     
    158158}
    159159forall( otype T ) inline static {
    160         int RT9( T ) { T t; }
     160        int RT9( T ) { T t; return 3; }
    161161}
    162162
     
    213213// w3 g3;
    214214
    215 int main( void ) {}
     215int main( void ) {
     216        #pragma message( "Compiled" )                   // force non-empty .expect file
     217}
    216218
    217219// Local Variables: //
  • tests/heap.cfa

    rbd47f35 r66812dd  
    1010// Created On       : Tue Nov  6 17:54:56 2018
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon Sep  7 18:37:41 2020
    13 // Update Count     : 72
     12// Last Modified On : Fri Sep 25 15:21:52 2020
     13// Update Count     : 73
    1414//
    1515
     
    485485        // checkFreeOn();
    486486        // malloc_stats();
     487        printf( "done\n" );                                                                     // non-empty .expect file
    487488}
    488489
  • tests/identFuncDeclarator.cfa

    rbd47f35 r66812dd  
    1010// Created On       : Wed Aug 17 08:36:34 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Nov  6 17:56:33 2018
    13 // Update Count     : 3
     12// Last Modified On : Sun Sep 27 08:20:46 2020
     13// Update Count     : 5
    1414//
    1515
     
    111111        int (* (* const f80)(int))();
    112112        int (* const(* const f81)(int))();
     113
     114        #pragma message( "Compiled" )                   // force non-empty .expect file
    113115}
    114116
  • tests/identParamDeclarator.cfa

    rbd47f35 r66812dd  
    1010// Created On       : Wed Aug 17 08:37:56 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Nov  6 17:56:44 2018
    13 // Update Count     : 3
     12// Last Modified On : Fri Sep 25 14:31:08 2020
     13// Update Count     : 4
    1414//
    1515
     
    158158
    159159int main( int argc, char const *argv[] ) {                              // dummy main
    160         return 0;
     160        printf( "done\n" );                                                                     // non-empty .expect file
    161161}
    162162
  • tests/labelledExit.cfa

    rbd47f35 r66812dd  
    1010// Created On       : Wed Aug 10 07:29:39 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Feb  5 16:49:48 2020
    13 // Update Count     : 9
     12// Last Modified On : Sun Sep 27 09:01:34 2020
     13// Update Count     : 12
    1414//
    1515
     
    179179
    180180int main( int argc, char const *argv[] ) {
    181         /* code */
     181        #pragma message( "Compiled" )                                           // force non-empty .expect file
    182182}
    183183
  • tests/limits.cfa

    rbd47f35 r66812dd  
    1010// Created On       : Tue May 10 20:44:20 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Nov  6 17:57:55 2018
    13 // Update Count     : 8
     12// Last Modified On : Sun Sep 27 08:45:43 2020
     13// Update Count     : 10
    1414//
    1515
     
    147147
    148148int main(int argc, char const *argv[]) {
    149         //DUMMY
    150         return 0;
     149        #pragma message( "Compiled" )                                           // force non-empty .expect file
    151150}
    152151
  • tests/maybe.cfa

    rbd47f35 r66812dd  
    1010// Created On       : Thr May 25 16:02:00 2017
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Jul 20 15:24:07 2017
    13 // Update Count     : 1
     12// Last Modified On : Fri Sep 25 15:13:28 2020
     13// Update Count     : 2
    1414//
    1515
     
    6565        //checkNamedConstructors();
    6666        checkSetters();
     67        printf( "done\n" );                             // non-empty .expect file
    6768}
  • tests/nested-types.cfa

    rbd47f35 r66812dd  
    1010// Created On       : Mon Jul 9 10:20:03 2018
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Feb 12 18:21:15 2020
    13 // Update Count     : 3
     12// Last Modified On : Sun Sep 27 08:48:59 2020
     13// Update Count     : 6
    1414//
    1515
    1616typedef int N;
    1717struct A {
    18   forall(otype T)
    19   struct N {
    20     T x;
    21   };
     18        forall(otype T)
     19        struct N {
     20                T x;
     21        };
    2222};
    2323
    2424struct S {
    25   struct T {
    26     int i;
    27     typedef int Bar;
    28   };
    29   T x;
     25        struct T {
     26                int i;
     27                typedef int Bar;
     28        };
     29        T x;
    3030
    31   // struct U;
    32   typedef T Bar;
    33   typedef int Baz;
     31        // struct U;
     32        typedef T Bar;
     33        typedef int Baz;
    3434};
    3535
     
    6565
    6666int main() {
    67   // access nested struct
    68   S.T x;
     67        // access nested struct
     68        S.T x;
    6969
    70   {
    71     struct S {
    72       int i;
    73       struct Z {
    74         double d;
    75       };
    76     };
     70        {
     71                struct S {
     72                  int i;
     73                  struct Z {
     74                    double d;
     75                  };
     76                };
    7777
    78     S.Z z;   // gets local S
    79     .S.T y;  // lookup at global scope only
     78                S.Z z;                                                                                  // gets local S
     79                .S.T y;                                                                                 // lookup at global scope only
    8080
    81     const volatile .S.T q;
     81                const volatile .S.T q;
    8282#if ERR1
    83     T err1;           // error: no T in scope
     83                T err1;                                                                                 // error: no T in scope
    8484#endif
    8585#if ERR2
    86     .Z err2;          // error: no Z in global scope
    87     .S.Baz.Bar err3;  // error: .S.Baz => int, int is not aggregate and should not appear left of the dot
    88     .S.Z err4;        // error: no Z in global S
     86                .Z err2;                                                                                // error: no Z in global scope
     87                .S.Baz.Bar err3;                                                                // error: .S.Baz => int, int is not aggregate and should not appear left of the dot
     88                .S.Z err4;                                                                              // error: no Z in global S
    8989#endif
    90   }
     90        }
    9191
    92   // U.S un;
     92        // U.S un;
    9393
    94   S.Bar y;
    95   S.Baz x;
    96   S.T.Bar z;
     94        S.Bar y;
     95        S.Baz x;
     96        S.T.Bar z;
    9797
    98   // A.N(int) x;  // xxx - should not be an error, but currently is.
     98        // A.N(int) x;  // xxx - should not be an error, but currently is.
     99
     100        #pragma message( "Compiled" )                   // force non-empty .expect file
    99101}
    100102
  • tests/numericConstants.cfa

    rbd47f35 r66812dd  
    1010// Created On       : Wed May 24 22:10:36 2017
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Feb  5 08:58:16 2019
    13 // Update Count     : 5
     12// Last Modified On : Sun Sep 27 07:55:22 2020
     13// Update Count     : 7
    1414//
    1515
     
    6363        0x_ff.ffp0;                                     // hex real
    6464        0x_1.ffff_ffff_p_128_l;
     65
     66        #pragma message( "Compiled" )   // force non-empty .expect file
    6567} // main
    6668
  • tests/operators.cfa

    rbd47f35 r66812dd  
    3131int main(int argc, char const *argv[]) {
    3232        /* code */
    33         return 0;
     33        printf( "done\n" );                             // non-empty .expect file
    3434}
    3535
  • tests/raii/.expect/ctor-autogen.txt

    rbd47f35 r66812dd  
     1done
  • tests/raii/.expect/init_once.txt

    rbd47f35 r66812dd  
     1done
  • tests/raii/ctor-autogen.cfa

    rbd47f35 r66812dd  
    151151        identity(gcs);
    152152        identity(gcu);
     153        printf( "done\n" );                             // non-empty .expect file
    153154}
  • tests/raii/init_once.cfa

    rbd47f35 r66812dd  
    1010// Created On       : Tue Jun 14 15:43:35 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Mar 22 13:41:26 2019
    13 // Update Count     : 4
     12// Last Modified On : Fri Sep 25 15:36:39 2020
     13// Update Count     : 5
    1414//
    1515
     
    188188                static_variable();
    189189        }
     190        printf( "done\n" );                                                                     // non-empty .expect file
    190191}
    191192
  • tests/result.cfa

    rbd47f35 r66812dd  
    1010// Created On       : Thr May 25 16:50:00 2017
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Jul 20 15:24:12 2017
    13 // Update Count     : 1
     12// Last Modified On : Fri Sep 25 15:22:59 2020
     13// Update Count     : 2
    1414//
    1515
     
    6666        checkGetters();
    6767        checkSetters();
     68        printf( "done\n" );                             // non-empty .expect file
    6869}
  • tests/stdincludes.cfa

    rbd47f35 r66812dd  
    1010// Created On       : Tue Aug 29 08:26:14 2017
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Nov  6 18:00:53 2018
    13 // Update Count     : 6
     12// Last Modified On : Sun Sep 27 08:51:38 2020
     13// Update Count     : 8
    1414//
    1515
     
    4747#include <wctype.h>
    4848
    49 int main() {}
     49int main() {
     50        #pragma message( "Compiled" )                   // force non-empty .expect file
     51}
    5052
    5153// Local Variables: //
  • tests/switch.cfa

    rbd47f35 r66812dd  
    1010// Created On       : Tue Jul 12 06:50:22 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Nov  6 18:01:34 2018
    13 // Update Count     : 37
     12// Last Modified On : Sun Sep 27 08:35:02 2020
     13// Update Count     : 43
    1414//
    1515
     
    100100                j = 5;
    101101        } // choose
     102
     103        #pragma message( "Compiled" )                                           // force non-empty .expect file
    102104} // main
    103105
  • tests/typedefRedef.cfa

    rbd47f35 r66812dd  
    2727typedef int ARR[];
    2828typedef int ARR[];
    29 // #ifdef ERR1
    30 // if a typedef has an array dimension,
    31 // it can only be redefined to the same dimension
     29#ifdef ERR1
     30// if a typedef has an array dimension, it can only be redefined to the same dimension
    3231typedef int ARR[2];
    33 // #endif
     32#endif
    3433
    3534typedef int X;
     
    5453
    5554int main() {
    56   typedef int ARR[sz];
     55        typedef int ARR[sz];
    5756
    58   // can't redefine typedef which is VLA
     57        // can't redefine typedef which is VLA
    5958#if ERR1
    60   typedef int ARR[sz];
     59        typedef int ARR[sz];
    6160#endif
    6261
    63   Foo *x;
     62        Foo * x;
    6463
    65   typedef struct Bar Foo;
    66   Foo *y;
     64        typedef struct Bar Foo;
     65        Foo * y;
    6766
    68   typedef int *** pt;
     67        typedef int *** pt;
     68
     69        #pragma message( "Compiled" )                   // force non-empty .expect file
    6970}
  • tests/typeof.cfa

    rbd47f35 r66812dd  
    11int main() {
    2     int *v1;
    3     typeof(v1) v2;
    4     typeof(*v1) v3[4];
    5     char *v4[4];
    6     typeof(typeof(char *)[4]) v5;
    7     typeof (int *) v6;
    8     typeof( int ( int, int p ) ) *v7;
    9     typeof( [int] ( int, int p ) ) *v8;
    10     (typeof(v1)) v2; // cast with typeof
     2        int *v1;
     3        typeof(v1) v2;
     4        typeof(*v1) v3[4];
     5        char *v4[4];
     6        typeof(typeof(char *)[4]) v5;
     7        typeof (int *) v6;
     8        typeof( int ( int, int p ) ) *v7;
     9        typeof( [int] ( int, int p ) ) *v8;
     10        (typeof(v1)) v2; // cast with typeof
     11        printf( "done\n" );                             // non-empty .expect file
    1112}
  • tests/variableDeclarator.cfa

    rbd47f35 r66812dd  
    1010// Created On       : Wed Aug 17 08:41:42 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Nov  6 18:02:16 2018
    13 // Update Count     : 2
     12// Last Modified On : Sun Sep 27 07:46:17 2020
     13// Update Count     : 13
    1414//
    1515
     
    1818int (f2);
    1919
    20 int *f3;
    21 int **f4;
    22 int * const *f5;
     20int * f3;
     21int ** f4;
     22int * const * f5;
    2323int * const * const f6;
    2424
    25 int *(f7);
    26 int **(f8);
    27 int * const *(f9);
     25int * (f7);
     26int ** (f8);
     27int * const * (f9);
    2828int * const * const (f10);
    2929
    30 int (*f11);
    31 int (**f12);
    32 int (* const *f13);
     30int (* f11);
     31int (** f12);
     32int (* const * f13);
    3333int (* const * const f14);
    3434
    35 int f15[];
     35int f15[0];
    3636int f16[10];
    37 int (f17[]);
     37int (f17[0]);
    3838int (f18[10]);
    3939
    40 int *f19[];
    41 int *f20[10];
    42 int **f21[];
    43 int **f22[10];
    44 int * const *f23[];
    45 int * const *f24[10];
    46 int * const * const f25[];
     40int * f19[0];
     41int * f20[10];
     42int ** f21[0];
     43int ** f22[10];
     44int * const * f23[0];
     45int * const * f24[10];
     46int * const * const f25[0];
    4747int * const * const f26[10];
    4848
    49 int *(f27[]);
     49int *(f27[0]);
    5050int *(f28[10]);
    51 int **(f29[]);
     51int **(f29[0]);
    5252int **(f30[10]);
    53 int * const *(f31[]);
     53int * const *(f31[0]);
    5454int * const *(f32[10]);
    55 int * const * const (f33[]);
     55int * const * const (f33[0]);
    5656int * const * const (f34[10]);
    5757
    58 int (*f35)[];
    59 int (*f36)[10];
    60 int (**f37)[];
    61 int (**f38)[10];
    62 int (* const *f39)[];
    63 int (* const *f40)[10];
     58int (* f35)[];
     59int (* f36)[10];
     60int (** f37)[];
     61int (** f38)[10];
     62int (* const * f39)[];
     63int (* const * f40)[10];
    6464int (* const * const f41)[];
    6565int (* const * const f42)[10];
    6666
    67 int f43[][3];
     67int f43[0][3];
    6868int f44[3][3];
    69 int (f45[])[3];
     69int (f45[0])[3];
    7070int (f46[3])[3];
    71 int ((f47[]))[3];
     71int ((f47[0]))[3];
    7272int ((f48[3]))[3];
    7373
    74 int *f49[][3];
    75 int *f50[3][3];
    76 int **f51[][3];
    77 int **f52[3][3];
    78 int * const *f53[][3];
    79 int * const *f54[3][3];
    80 int * const * const f55[][3];
     74int * f49[0][3];
     75int * f50[3][3];
     76int ** f51[0][3];
     77int ** f52[3][3];
     78int * const * f53[0][3];
     79int * const * f54[3][3];
     80int * const * const f55[0][3];
    8181int * const * const f56[3][3];
    8282
    83 int (*f57[][3]);
    84 int (*f58[3][3]);
    85 int (**f59[][3]);
    86 int (**f60[3][3]);
    87 int (* const *f61[][3]);
    88 int (* const *f62[3][3]);
    89 int (* const * const f63[][3]);
     83int (* f57[0][3]);
     84int (* f58[3][3]);
     85int (** f59[0][3]);
     86int (** f60[3][3]);
     87int (* const * f61[0][3]);
     88int (* const * f62[3][3]);
     89int (* const * const f63[0][3]);
    9090int (* const * const f64[3][3]);
    9191
     
    9393int (f66)(int);
    9494
    95 int *f67(int);
    96 int **f68(int);
    97 int * const *f69(int);
     95int * f67(int);
     96int ** f68(int);
     97int * const * f69(int);
    9898int * const * const f70(int);
    9999
     
    104104int * const * const (f74)(int);
    105105
    106 int (*f75)(int);
    107 int (**f76)(int);
    108 int (* const *f77)(int);
     106int (* f75)(int);
     107int (** f76)(int);
     108int (* const * f77)(int);
    109109int (* const * const f78)(int);
    110110
    111 int (*(*f79)(int))();
     111int (*(* f79)(int))();
    112112int (*(* const f80)(int))();
    113113int (* const(* const f81)(int))();
     
    119119//int fe2()[];                          // returning an array
    120120//int fe3()();                          // returning a function
    121 //int (*fe4)()();                               // returning a function
    122 //int ((*fe5())())[];                   // returning an array
     121//int (* fe4)()();                              // returning a function
     122//int ((* fe5())())[];                  // returning an array
    123123
     124#ifdef __CFA__
    124125// Cforall extensions
    125126
     
    129130const * const * int cf6;
    130131
    131 [] int cf15;
     132[0] int cf15;
    132133[10] int cf16;
    133134
    134 [] * int cf19;
     135[0] * int cf19;
    135136[10] * int cf20;
    136 int **cf21[];
     137int ** cf21[0];
    137138[10] * * int cf22;
    138 [] * const * int cf23;
     139[0] * const * int cf23;
    139140[10] * const * int cf24;
    140 [] const * const * int cf25;
     141[0] const * const * int cf25;
    141142[10] const * const * int cf26;
    142143
     
    150151const * const * [10] int cf42;
    151152
    152 [][3] int cf43;
     153[0][3] int cf43;
    153154[3][3] int cf44;
    154155
    155 [][3] * int cf49;
     156[0][3] * int cf49;
    156157[3][3] * int cf50;
    157 [][3] * * int cf51;
     158[0][3] * * int cf51;
    158159[3][3] * * int cf52;
    159 [][3] const * int cf53;
     160[0][3] const * int cf53;
    160161[3][3] * const * int cf54;
    161 [][3] const * const * int cf55;
     162[0][3] const * const * int cf55;
    162163[3][3] const * const * int cf56;
    163164
     
    173174
    174175*[]*[]* [ *[]*[] int ]( *[]*[] int, *[]*[] int ) v3;
     176#endif // __CFA__
    175177
    176178//Dummy main
    177 int main(int argc, char const *argv[])
    178 {
    179         return 0;
     179int main( int argc, char const * argv[] ) {
     180        #pragma message( "Compiled" )                                           // force non-empty .expect file
    180181}
    181182
  • tests/voidPtr.cfa

    rbd47f35 r66812dd  
    1313        if ( ! a ) {
    1414                abort();
    15         }       
     15        }
     16        printf( "done\n" );                             // non-empty .expect file
    1617}
    1718
  • tests/warnings/.expect/self-assignment.txt

    rbd47f35 r66812dd  
    2424... to:
    2525  reference to signed int
     26warnings/self-assignment.cfa: In function '_X4mainFi___1':
     27warnings/self-assignment.cfa:36:9: note: #pragma message: Compiled
     28   36 |
     29      |         ^     
  • tests/warnings/self-assignment.cfa

    rbd47f35 r66812dd  
    1010// Created On       : Thu Mar 1 13:53:57 2018
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Feb 20 07:56:17 2019
    13 // Update Count     : 3
     12// Last Modified On : Sun Sep 27 09:24:34 2020
     13// Update Count     : 6
    1414//
    1515
     
    3131        s.i = s.i;
    3232        t.s.i = t.s.i;
     33
     34        #pragma message( "Compiled" )                   // force non-empty .expect file
    3335}
    3436
    3537// Local Variables: //
    3638// tab-width: 4 //
    37 // compile-command: "cfa dtor-early-exit" //
     39// compile-command: "cfa self-assignment.cfa" //
    3840// End: //
  • tests/zombies/structMember.cfa

    rbd47f35 r66812dd  
    5353// C useless declarations
    5454
     55#ifdef ERROR
    5556        int;
    5657        TD;
     
    7071        W(int);
    7172        W(int).X;
     73#endif // ERROR
    7274};
    7375
Note: See TracChangeset for help on using the changeset viewer.