- Timestamp:
- Oct 7, 2020, 4:31:43 PM (5 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 848439f
- Parents:
- ae2c27a (diff), 597c5d18 (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. - Location:
- tests
- Files:
-
- 11 added
- 71 edited
- 98 moved
Legend:
- Unmodified
- Added
- Removed
-
tests/.expect/array.txt
rae2c27a rc76bd34 1 array.cfa: In function '_X4mainFi___1': 2 array.cfa:55:9: note: #pragma message: Compiled -
tests/.expect/cast.txt
rae2c27a rc76bd34 1 cast.cfa: In function '_X4mainFi_iPPKc__1': 2 cast.cfa:18:9: note: #pragma message: Compiled -
tests/.expect/enum.txt
rae2c27a rc76bd34 1 done -
tests/.expect/expression.txt
rae2c27a rc76bd34 1 expression.cfa: In function '_X4mainFi___1': 2 expression.cfa:89:9: note: #pragma message: Compiled -
tests/.expect/forall.txt
rae2c27a rc76bd34 1 forall.cfa: In function '_X4mainFi___1': 2 forall.cfa:218:9: note: #pragma message: Compiled -
tests/.expect/heap.txt
rae2c27a rc76bd34 1 done -
tests/.expect/identFuncDeclarator.txt
rae2c27a rc76bd34 1 identFuncDeclarator.cfa: In function '_X4mainFi___1': 2 identFuncDeclarator.cfa:116:9: note: #pragma message: Compiled -
tests/.expect/identParamDeclarator.txt
rae2c27a rc76bd34 1 done -
tests/.expect/labelledExit.txt
rae2c27a rc76bd34 1 labelledExit.cfa: In function '_X4mainFi_iPPKc__1': 2 labelledExit.cfa:183:9: note: #pragma message: Compiled -
tests/.expect/limits.txt
rae2c27a rc76bd34 1 limits.cfa: In function '_X4mainFi_iPPKc__1': 2 limits.cfa:151:9: note: #pragma message: Compiled -
tests/.expect/maybe.txt
rae2c27a rc76bd34 1 done -
tests/.expect/nested-types.txt
rae2c27a rc76bd34 1 nested-types.cfa: In function '_X4mainFi___1': 2 nested-types.cfa:102:9: note: #pragma message: Compiled -
tests/.expect/numericConstants.txt
rae2c27a rc76bd34 1 numericConstants.cfa: In function '_X4mainFi___1': 2 numericConstants.cfa:68:9: note: #pragma message: Compiled -
tests/.expect/operators.txt
rae2c27a rc76bd34 1 done -
tests/.expect/result.txt
rae2c27a rc76bd34 1 done -
tests/.expect/stdincludes.txt
rae2c27a rc76bd34 1 stdincludes.cfa: In function '_X4mainFi___1': 2 stdincludes.cfa:52:9: note: #pragma message: Compiled -
tests/.expect/switch.txt
rae2c27a rc76bd34 1 switch.cfa: In function '_X4mainFi___1': 2 switch.cfa:105:9: note: #pragma message: Compiled -
tests/.expect/typedefRedef-ERR1.txt
rae2c27a rc76bd34 1 1 typedefRedef.cfa:4:1 error: Cannot redefine typedef: Foo 2 typedefRedef.cfa: 60:1 error: Cannot redefine typedef: ARR2 typedefRedef.cfa:59:1 error: Cannot redefine typedef: ARR -
tests/.expect/typedefRedef.txt
rae2c27a rc76bd34 1 typedefRedef.cfa: In function '_X4mainFi___1': 2 typedefRedef.cfa:71:9: note: #pragma message: Compiled -
tests/.expect/typeof.txt
rae2c27a rc76bd34 1 done -
tests/.expect/variableDeclarator.txt
rae2c27a rc76bd34 1 variableDeclarator.cfa: In function '_X4mainFi_iPPKc__1': 2 variableDeclarator.cfa:182:9: note: #pragma message: Compiled -
tests/.expect/voidPtr.txt
rae2c27a rc76bd34 1 done -
tests/Makefile.am
rae2c27a rc76bd34 11 11 ## Created On : Sun May 31 09:08:15 2015 12 12 ## Last Modified By : Peter A. Buhr 13 ## Last Modified On : Tue Nov 20 11:18:51 201814 ## Update Count : 6813 ## Last Modified On : Sun Sep 27 19:01:41 2020 14 ## Update Count : 84 15 15 ############################################################################### 16 16 … … 38 38 # since automake doesn't have support for CFA we have to 39 39 AM_CFLAGS = $(if $(test), 2> $(test), ) \ 40 -fdebug-prefix-map=$(abspath ${abs_srcdir})= \ 41 -fdebug-prefix-map=/tmp= \ 42 -fno-diagnostics-show-caret \ 40 43 -g \ 41 44 -Wall \ … … 50 53 51 54 # adjust CC to current flags 52 CC = $(if $(DISTCC_CFA_PATH),distcc $(DISTCC_CFA_PATH) ${ARCH_FLAGS},$(TARGET_CFA) ${DEBUG_FLAGS} ${ARCH_FLAGS})55 CC = LC_ALL=C $(if $(DISTCC_CFA_PATH),distcc $(DISTCC_CFA_PATH) ${ARCH_FLAGS},$(TARGET_CFA) ${DEBUG_FLAGS} ${ARCH_FLAGS}) 53 56 CFACC = $(CC) 54 57 … … 58 61 # adjusted CC but without the actual distcc call 59 62 CFACCLOCAL = $(if $(DISTCC_CFA_PATH),$(DISTCC_CFA_PATH) ${ARCH_FLAGS},$(TARGET_CFA) ${DEBUG_FLAGS} ${ARCH_FLAGS}) 63 CFACCLINK = $(CFACCLOCAL) -quiet $(if $(test), 2> $(test), ) $($(shell echo "${@}_FLAGSLD" | sed 's/-\|\//_/g')) 60 64 61 65 PRETTY_PATH=mkdir -p $(dir $(abspath ${@})) && cd ${srcdir} && … … 110 114 % : %.cfa $(CFACCBIN) 111 115 $(CFACOMPILETEST) -c -o $(abspath ${@}).o 112 $(CFACCLOCAL) $($(shell echo "${@}_FLAGSLD" | sed 's/-\|\//_/g')) $(abspath ${@}).o -o $(abspath ${@}) 116 $(CFACCLINK) ${@}.o -o $(abspath ${@}) 117 rm $(abspath ${@}).o 113 118 114 119 # implicit rule for c++ test … … 129 134 $(CFACOMPILETEST) -CFA -XCFA -p -c -fsyntax-only -o $(abspath ${@}) 130 135 131 # Use for tests where the make command is expected to succeed but the expected.txt should be compared to stderr132 EXPECT_STDERR = builtins/sync warnings/self-assignment133 $(EXPECT_STDERR): % : %.cfa $(CFACCBIN)134 $(CFACOMPILETEST) -c -fsyntax-only 2> $(abspath ${@})135 136 136 #------------------------------------------------------------------------------ 137 137 # CUSTOM TARGET 138 138 #------------------------------------------------------------------------------ 139 # tests that just validate syntax and compiler output should be compared to stderr 140 CFACOMPILE_SYNTAX = $(CFACOMPILETEST) -Wno-unused-variable -Wno-unused-label -c -fsyntax-only -o $(abspath ${@}) 141 142 SYNTAX_ONLY_CODE = expression typedefRedef variableDeclarator switch numericConstants identFuncDeclarator forall \ 143 limits nested-types stdincludes cast labelledExit array builtins/sync warnings/self-assignment 144 $(SYNTAX_ONLY_CODE): % : %.cfa $(CFACCBIN) 145 $(CFACOMPILE_SYNTAX) 146 $(if $(test), cp $(test) $(abspath ${@}), ) 147 139 148 # expected failures 140 # use custom target since they require a custom define and custom dependencies149 # use custom target since they require a custom define *and* have a name that doesn't match the file 141 150 alloc-ERROR : alloc.cfa $(CFACCBIN) 142 $(CFACOMPILETEST) -DERR1 -c -fsyntax-only -o $(abspath ${@}) 151 $(CFACOMPILE_SYNTAX) -DERR1 152 -cp $(test) $(abspath ${@}) 143 153 144 154 typedefRedef-ERR1 : typedefRedef.cfa $(CFACCBIN) 145 $(CFACOMPILETEST) -DERR1 -c -fsyntax-only -o $(abspath ${@}) 155 $(CFACOMPILE_SYNTAX) -DERR1 156 -cp $(test) $(abspath ${@}) 146 157 147 158 nested-types-ERR1 : nested-types.cfa $(CFACCBIN) 148 $(CFACOMPILETEST) -DERR1 -c -fsyntax-only -o $(abspath ${@}) 159 $(CFACOMPILE_SYNTAX) -DERR1 160 -cp $(test) $(abspath ${@}) 149 161 150 162 nested-types-ERR2 : nested-types.cfa $(CFACCBIN) 151 $(CFACOMPILETEST) -DERR2 -c -fsyntax-only -o $(abspath ${@}) 163 $(CFACOMPILE_SYNTAX) -DERR2 164 -cp $(test) $(abspath ${@}) 152 165 153 166 raii/memberCtors-ERR1 : raii/memberCtors.cfa $(CFACCBIN) 154 $(CFACOMPILETEST) -DERR1 -c -fsyntax-only -o $(abspath ${@}) 167 $(CFACOMPILE_SYNTAX) -DERR1 168 -cp $(test) $(abspath ${@}) 155 169 156 170 raii/ctor-autogen-ERR1 : raii/ctor-autogen.cfa $(CFACCBIN) 157 $(CFACOMPILETEST) -DERR1 -c -fsyntax-only -o $(abspath ${@}) 171 $(CFACOMPILE_SYNTAX) -DERR1 172 -cp $(test) $(abspath ${@}) 158 173 159 174 raii/dtor-early-exit-ERR1 : raii/dtor-early-exit.cfa $(CFACCBIN) 160 $(CFACOMPILETEST) -DERR1 -c -fsyntax-only -o $(abspath ${@}) 175 $(CFACOMPILE_SYNTAX) -DERR1 176 -cp $(test) $(abspath ${@}) 161 177 162 178 raii/dtor-early-exit-ERR2 : raii/dtor-early-exit.cfa $(CFACCBIN) 163 $(CFACOMPILETEST) -DERR2 -c -fsyntax-only -o $(abspath ${@}) 179 $(CFACOMPILE_SYNTAX) -DERR2 180 -cp $(test) $(abspath ${@}) 164 181 165 182 # Exception Tests … … 170 187 $(CFACCLOCAL) $($(shell echo "${@}_FLAGSLD" | sed 's/-\|\//_/g')) $(abspath ${@}).o -o $(abspath ${@}) 171 188 189 # Linking tests 190 # Meta tests to make sure we see linking errors (can't compile with -O2 since it may multiply number of calls) 191 linking/linkerror : linking/linkerror.cfa $(CFACCBIN) 192 $(CFACOMPILETEST) -O0 -c -o $(abspath ${@}).o 193 $(CFACCLINK) -O0 ${@}.o -o $(abspath ${@}) 194 rm $(abspath ${@}).o 195 172 196 #------------------------------------------------------------------------------ 173 197 # Other targets -
tests/alloc2.cfa
rae2c27a rc76bd34 13 13 void test_base( void * ip, size_t size, size_t align) { 14 14 tests_total += 1; 15 // printf("DEBUG: starting test %d\n", tests_total); 15 16 bool passed = (malloc_size(ip) == size) && (malloc_usable_size(ip) >= size) && (malloc_alignment(ip) == align) && ((uintptr_t)ip % align == 0); 16 17 if (!passed) { … … 18 19 tests_failed += 1; 19 20 } 21 // printf("DEBUG: done test %d\n", tests_total); 20 22 } 21 23 22 24 void test_fill( void * ip_, size_t start, size_t end, char fill) { 23 25 tests_total += 1; 26 // printf("DEBUG: starting test %d\n", tests_total); 24 27 bool passed = true; 25 28 char * ip = (char *) ip_; … … 29 32 tests_failed += 1; 30 33 } 34 // printf("DEBUG: done test %d\n", tests_total); 31 35 } 32 36 33 37 void test_fill( void * ip_, size_t start, size_t end, int fill) { 34 38 tests_total += 1; 39 // printf("DEBUG: starting test %d\n", tests_total); 35 40 bool passed = true; 36 41 int * ip = (int *) ip_; … … 40 45 tests_failed += 1; 41 46 } 47 // printf("DEBUG: done test %d\n", tests_total); 42 48 } 43 49 44 50 void test_fill( void * ip_, size_t start, size_t end, int * fill) { 45 51 tests_total += 1; 52 // printf("DEBUG: starting test %d\n", tests_total); 46 53 bool passed = (memcmp((void*)((uintptr_t)ip_ + start), (void*)fill, end) == 0); 47 54 if (!passed) { … … 49 56 tests_failed += 1; 50 57 } 58 // printf("DEBUG: done test %d\n", tests_total); 51 59 } 52 60 53 61 void test_fill( void * ip_, size_t start, size_t end, T1 fill) { 54 62 tests_total += 1; 63 // printf("DEBUG: starting test %d\n", tests_total); 55 64 bool passed = true; 56 65 T1 * ip = (T1 *) ip_; … … 60 69 tests_failed += 1; 61 70 } 71 // printf("DEBUG: done test %d\n", tests_total); 62 72 } 63 73 64 74 void test_fill( void * ip_, size_t start, size_t end, T1 * fill) { 65 75 tests_total += 1; 76 // printf("DEBUG: starting test %d\n", tests_total); 66 77 bool passed = (memcmp((void*)((uintptr_t)ip_ + start), (void*)fill, end) == 0); 67 78 if (!passed) { … … 69 80 tests_failed += 1; 70 81 } 82 // printf("DEBUG: done test %d\n", tests_total); 71 83 } 72 84 73 85 void test_use( int * ip, size_t dim) { 74 86 tests_total += 1; 87 // printf("DEBUG: starting test %d\n", tests_total); 75 88 bool passed = true; 76 89 for (i; 0 ~ dim) ip[i] = 0xdeadbeef; … … 80 93 tests_failed += 1; 81 94 } 95 // printf("DEBUG: done test %d\n", tests_total); 82 96 } 83 97 84 98 void test_use( T1 * ip, size_t dim) { 85 99 tests_total += 1; 100 // printf("DEBUG: starting test %d\n", tests_total); 86 101 bool passed = true; 87 102 for (i; 0 ~ dim) ip[i].data = 0xdeadbeef; … … 91 106 tests_failed += 1; 92 107 } 108 // printf("DEBUG: done test %d\n", tests_total); 93 109 } 94 110 -
tests/array.cfa
rae2c27a rc76bd34 1 // -*- Mode: C -*- 2 // 1 // -*- Mode: C -*- 2 // 3 3 // Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo 4 4 // 5 5 // The contents of this file are covered under the licence agreement in the 6 6 // file "LICENCE" distributed with Cforall. 7 // 7 // 8 8 // array.cfa -- test array declarations 9 // 9 // 10 10 // Author : Peter A. Buhr 11 11 // Created On : Tue Feb 19 21:18:06 2019 12 12 // Last Modified By : Peter A. Buhr 13 // Last Modified On : Tue Feb 19 21:18:46 201914 // Update Count : 115 // 13 // Last Modified On : Sun Sep 27 09:05:40 2020 14 // Update Count : 4 15 // 16 16 17 int a1[ ];17 int a1[0]; 18 18 //int a2[*]; 19 19 //double a4[3.0]; 20 20 21 int m1[ ][3];21 int m1[0][3]; 22 22 //int m2[*][*]; 23 23 int m4[3][3]; … … 49 49 } 50 50 51 int main() {} 51 int main() { 52 #if !defined(NO_COMPILED_PRAGMA) 53 #pragma message( "Compiled" ) // force non-empty .expect file 54 #endif 55 } 52 56 53 57 // Local Variables: // -
tests/builtins/.expect/sync.txt
rae2c27a rc76bd34 1 builtins/sync.cfa: In function '_X4mainFi___1': 2 builtins/sync.cfa:358:9: note: #pragma message: Compiled -
tests/builtins/sync.cfa
rae2c27a rc76bd34 66 66 #if defined(__SIZEOF_INT128__) 67 67 { __int128 ret; ret = __sync_fetch_and_nand(vplll, vlll); } 68 { __int128 ret; ret = __sync_fetch_and_nand_16(vplll, vlll); }69 68 #endif 70 69 … … 355 354 356 355 int main() { 357 return 0;356 #pragma message( "Compiled" ) // force non-empty .expect file 358 357 } -
tests/cast.cfa
rae2c27a rc76bd34 13 13 14 14 //Dummy main 15 int main(int argc, char const *argv[]) 16 { 17 return 0; 15 int main( int argc, char const * argv[] ) { 16 #pragma message( "Compiled" ) // force non-empty .expect file 18 17 } -
tests/concurrent/.expect/cluster.txt
rae2c27a rc76bd34 1 done -
tests/concurrent/cluster.cfa
rae2c27a rc76bd34 32 32 } 33 33 } 34 return 0;34 printf( "done\n" ); // non-empty .expect file 35 35 } -
tests/concurrent/examples/.expect/datingService.txt
rae2c27a rc76bd34 1 done -
tests/concurrent/examples/datingService.cfa
rae2c27a rc76bd34 10 10 // Created On : Mon Oct 30 12:56:20 2017 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Jun 21 11:32:34 201913 // Update Count : 3812 // Last Modified On : Sun Sep 27 15:42:25 2020 13 // Update Count : 40 14 14 // 15 15 … … 108 108 if ( girlck[ boyck[i] ] != boyck[ girlck[i] ] ) abort(); 109 109 } // for 110 111 printf( "done\n" ); // non-empty .expect file 110 112 } // main 111 113 -
tests/concurrent/futures/.expect/basic.txt
rae2c27a rc76bd34 1 done -
tests/concurrent/futures/basic.cfa
rae2c27a rc76bd34 91 91 } 92 92 } 93 printf( "done\n" ); // non-empty .expect file 94 93 95 } -
tests/concurrent/park/.expect/force_preempt.txt
rae2c27a rc76bd34 1 done -
tests/concurrent/park/.expect/start_parked.txt
rae2c27a rc76bd34 1 done -
tests/concurrent/park/contention.cfa
rae2c27a rc76bd34 21 21 if(blocked[idx]) { 22 22 Thread * thrd = __atomic_exchange_n(&blocked[idx], 0p, __ATOMIC_SEQ_CST); 23 unpark( *thrd __cfaabi_dbg_ctx2);23 unpark( *thrd ); 24 24 } else { 25 25 Thread * thrd = __atomic_exchange_n(&blocked[idx], &this, __ATOMIC_SEQ_CST); 26 unpark( *thrd __cfaabi_dbg_ctx2);27 park( __cfaabi_dbg_ctx);26 unpark( *thrd ); 27 park(); 28 28 } 29 29 } … … 41 41 int idx = myrand() % blocked_size; 42 42 Thread * thrd = __atomic_exchange_n(&blocked[idx], 0p, __ATOMIC_SEQ_CST); 43 unpark( *thrd __cfaabi_dbg_ctx2);43 unpark( *thrd ); 44 44 yield( myrand() % 20 ); 45 45 } -
tests/concurrent/park/force_preempt.cfa
rae2c27a rc76bd34 30 30 31 31 // Unpark this thread, don't force a yield 32 unpark( this __cfaabi_dbg_ctx2);32 unpark( this ); 33 33 assert(mask == 0xCAFEBABA); 34 34 … … 43 43 // Park this thread, 44 44 assert(mask == (id_hash ^ 0xCAFEBABA)); 45 park( __cfaabi_dbg_ctx);45 park(); 46 46 assert(mask == (id_hash ^ 0xCAFEBABA)); 47 47 … … 57 57 Waiter waiters[5]; 58 58 } 59 printf( "done\n" ); // non-empty .expect file 59 60 } -
tests/concurrent/park/start_parked.cfa
rae2c27a rc76bd34 3 3 thread Parker {}; 4 4 void main( Parker & ) { 5 park( __cfaabi_dbg_ctx);5 park(); 6 6 } 7 7 8 8 int main() { 9 for(1000) { 10 Parker parker; 11 unpark( parker __cfaabi_dbg_ctx2 ); 12 } 9 for(1000) { 10 Parker parker; 11 unpark( parker ); 12 } 13 printf( "done\n" ); // non-empty .expect file 13 14 } -
tests/enum.cfa
rae2c27a rc76bd34 26 26 //Dummy main 27 27 int main(int argc, char const *argv[]) { 28 printf( "done\n" ); // non-empty .expect file 28 29 } -
tests/exceptions/.expect/virtual-cast.txt
rae2c27a rc76bd34 1 done -
tests/exceptions/.expect/virtual-poly.txt
rae2c27a rc76bd34 1 done -
tests/exceptions/virtual-cast.cfa
rae2c27a rc76bd34 74 74 free(tri); 75 75 free(top); 76 printf( "done\n" ); // non-empty .expect file 76 77 } -
tests/exceptions/virtual-poly.cfa
rae2c27a rc76bd34 77 77 mono_poly_test(); 78 78 poly_poly_test(); 79 printf( "done\n" ); // non-empty .expect file 79 80 } -
tests/expression.cfa
rae2c27a rc76bd34 8 8 9 9 int main() { 10 11 12 13 14 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; 15 15 16 16 // operators 17 17 18 19 20 21 22 23 24 25 26 18 !i; 19 ~i; 20 +i; 21 -i; 22 *ps; 23 ++ps; 24 --ps; 25 ps++; 26 ps--; 27 27 28 29 30 28 i + j; 29 i - j; 30 i * j; 31 31 32 33 34 35 36 37 38 39 32 i / j; 33 i % j; 34 i ^ j; 35 i & j; 36 i | j; 37 i < j; 38 i > j; 39 i = j; 40 40 41 42 43 44 45 46 47 48 49 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; 50 50 51 52 53 54 55 56 57 58 59 60 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; 61 61 62 62 i ? i : j; 63 63 64 64 // postfix function call 65 65 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 #if !defined(NO_COMPILED_PRAGMA) 87 #pragma message( "Compiled" ) // force non-empty .expect file 88 #endif 85 89 } // main -
tests/forall.cfa
rae2c27a rc76bd34 10 10 // Created On : Wed May 9 08:48:15 2018 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Mar 19 08:29:38 201913 // Update Count : 3 212 // Last Modified On : Sun Sep 27 08:43:20 2020 13 // Update Count : 35 14 14 // 15 15 … … 158 158 } 159 159 forall( otype T ) inline static { 160 int RT9( T ) { T t; }160 int RT9( T ) { T t; return 3; } 161 161 } 162 162 … … 213 213 // w3 g3; 214 214 215 int main( void ) {} 215 int main( void ) { 216 #pragma message( "Compiled" ) // force non-empty .expect file 217 } 216 218 217 219 // Local Variables: // -
tests/heap.cfa
rae2c27a rc76bd34 10 10 // Created On : Tue Nov 6 17:54:56 2018 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sun Aug 9 08:05:16202013 // Update Count : 5712 // Last Modified On : Fri Sep 25 15:21:52 2020 13 // Update Count : 73 14 14 // 15 15 … … 205 205 free( area ); 206 206 } // for 207 } // for 208 209 // check malloc/resize/free (sbrk) 210 211 for ( i; 2 ~ NoOfAllocs ~ 12 ) { 212 // initial N byte allocation 213 char * area = (char *)malloc( i ); 214 area[0] = '\345'; area[i - 1] = '\345'; // fill first/penultimate byte 215 216 // Do not start this loop index at 0 because resize of 0 bytes frees the storage. 217 int prev = i; 218 for ( s; i ~ 256 * 1024 ~ 26 ) { // start at initial memory request 219 if ( area[0] != '\345' || area[prev - 1] != '\345' ) abort( "malloc/resize/free corrupt storage" ); 220 area = (char *)resize( area, s ); // attempt to reuse storage 221 area[0] = area[s - 1] = '\345'; // fill last byte 222 prev = s; 223 } // for 224 free( area ); 225 } // for 226 227 // check malloc/resize/free (mmap) 228 229 for ( i; 2 ~ NoOfAllocs ~ 12 ) { 230 // initial N byte allocation 231 size_t s = i + default_mmap_start(); // cross over point 232 char * area = (char *)malloc( s ); 233 area[0] = '\345'; area[s - 1] = '\345'; // fill first/penultimate byte 234 235 // Do not start this loop index at 0 because resize of 0 bytes frees the storage. 236 int prev = s; 237 for ( r; s ~ 256 * 1024 ~ 26 ) { // start at initial memory request 238 if ( area[0] != '\345' || area[prev - 1] != '\345' ) abort( "malloc/resize/free corrupt storage" ); 239 area = (char *)resize( area, s ); // attempt to reuse storage 240 area[0] = area[r - 1] = '\345'; // fill last byte 241 prev = r; 242 } // for 243 free( area ); 244 } // for 245 246 // check malloc/realloc/free (sbrk) 247 248 for ( i; 2 ~ NoOfAllocs ~ 12 ) { 249 // initial N byte allocation 250 char * area = (char *)malloc( i ); 251 area[0] = '\345'; area[i - 1] = '\345'; // fill first/penultimate byte 252 253 // Do not start this loop index at 0 because realloc of 0 bytes frees the storage. 254 int prev = i; 255 for ( s; i ~ 256 * 1024 ~ 26 ) { // start at initial memory request 256 if ( area[0] != '\345' || area[prev - 1] != '\345' ) abort( "malloc/realloc/free corrupt storage" ); 257 area = (char *)realloc( area, s ); // attempt to reuse storage 258 area[s - 1] = '\345'; // fill last byte 259 prev = s; 260 } // for 261 free( area ); 262 } // for 263 264 // check malloc/realloc/free (mmap) 265 266 for ( i; 2 ~ NoOfAllocs ~ 12 ) { 267 // initial N byte allocation 268 size_t s = i + default_mmap_start(); // cross over point 269 char * area = (char *)malloc( s ); 270 area[0] = '\345'; area[s - 1] = '\345'; // fill first/penultimate byte 271 272 // Do not start this loop index at 0 because realloc of 0 bytes frees the storage. 273 int prev = s; 274 for ( r; s ~ 256 * 1024 ~ 26 ) { // start at initial memory request 275 if ( area[0] != '\345' || area[prev - 1] != '\345' ) abort( "malloc/realloc/free corrupt storage" ); 276 area = (char *)realloc( area, s ); // attempt to reuse storage 277 area[r - 1] = '\345'; // fill last byte 278 prev = r; 279 } // for 280 free( area ); 207 281 } // for 208 282 … … 320 394 } // for 321 395 396 // check memalign/resize with align/free 397 398 amount = 2; 399 for ( a; libAlign() ~= limit ~ a ) { // generate powers of 2 400 // initial N byte allocation 401 char * area = (char *)memalign( a, amount ); // aligned N-byte allocation 402 //sout | alignments[a] | area | endl; 403 if ( (size_t)area % a != 0 || malloc_alignment( area ) != a ) { // check for initial alignment 404 abort( "memalign/resize with align/free bad alignment : memalign(%d,%d) = %p", (int)a, (int)amount, area ); 405 } // if 406 area[0] = '\345'; area[amount - 2] = '\345'; // fill first/penultimate byte 407 408 // Do not start this loop index at 0 because resize of 0 bytes frees the storage. 409 for ( s; amount ~ 256 * 1024 ) { // start at initial memory request 410 area = (char *)resize( area, a * 2, s ); // attempt to reuse storage 411 //sout | i | area | endl; 412 if ( (size_t)area % a * 2 != 0 ) { // check for initial alignment 413 abort( "memalign/resize with align/free bad alignment %p", area ); 414 } // if 415 area[s - 1] = '\345'; // fill last byte 416 } // for 417 free( area ); 418 } // for 419 322 420 // check memalign/realloc with align/free 323 421 … … 387 485 // checkFreeOn(); 388 486 // malloc_stats(); 487 printf( "done\n" ); // non-empty .expect file 389 488 } 390 489 -
tests/identFuncDeclarator.cfa
rae2c27a rc76bd34 10 10 // Created On : Wed Aug 17 08:36:34 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Nov 6 17:56:33 201813 // Update Count : 312 // Last Modified On : Sun Sep 27 08:20:46 2020 13 // Update Count : 5 14 14 // 15 15 … … 111 111 int (* (* const f80)(int))(); 112 112 int (* const(* const f81)(int))(); 113 114 #pragma message( "Compiled" ) // force non-empty .expect file 113 115 } 114 116 -
tests/identParamDeclarator.cfa
rae2c27a rc76bd34 10 10 // Created On : Wed Aug 17 08:37:56 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Nov 6 17:56:44 201813 // Update Count : 312 // Last Modified On : Fri Sep 25 14:31:08 2020 13 // Update Count : 4 14 14 // 15 15 … … 158 158 159 159 int main( int argc, char const *argv[] ) { // dummy main 160 return 0;160 printf( "done\n" ); // non-empty .expect file 161 161 } 162 162 -
tests/labelledExit.cfa
rae2c27a rc76bd34 10 10 // Created On : Wed Aug 10 07:29:39 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Feb 5 16:49:48202013 // Update Count : 912 // Last Modified On : Sun Sep 27 09:01:34 2020 13 // Update Count : 12 14 14 // 15 15 … … 179 179 180 180 int main( int argc, char const *argv[] ) { 181 /* code */181 #pragma message( "Compiled" ) // force non-empty .expect file 182 182 } 183 183 -
tests/limits.cfa
rae2c27a rc76bd34 10 10 // Created On : Tue May 10 20:44:20 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Nov 6 17:57:55 201813 // Update Count : 812 // Last Modified On : Sun Sep 27 08:45:43 2020 13 // Update Count : 10 14 14 // 15 15 … … 147 147 148 148 int main(int argc, char const *argv[]) { 149 //DUMMY 150 return 0; 149 #pragma message( "Compiled" ) // force non-empty .expect file 151 150 } 152 151 -
tests/maybe.cfa
rae2c27a rc76bd34 10 10 // Created On : Thr May 25 16:02:00 2017 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Jul 20 15:24:07 201713 // Update Count : 112 // Last Modified On : Fri Sep 25 15:13:28 2020 13 // Update Count : 2 14 14 // 15 15 … … 65 65 //checkNamedConstructors(); 66 66 checkSetters(); 67 printf( "done\n" ); // non-empty .expect file 67 68 } -
tests/nested-types.cfa
rae2c27a rc76bd34 10 10 // Created On : Mon Jul 9 10:20:03 2018 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Feb 12 18:21:15202013 // Update Count : 312 // Last Modified On : Sun Sep 27 08:48:59 2020 13 // Update Count : 6 14 14 // 15 15 16 16 typedef int N; 17 17 struct A { 18 19 20 21 18 forall(otype T) 19 struct N { 20 T x; 21 }; 22 22 }; 23 23 24 24 struct S { 25 26 27 28 29 25 struct T { 26 int i; 27 typedef int Bar; 28 }; 29 T x; 30 30 31 32 33 31 // struct U; 32 typedef T Bar; 33 typedef int Baz; 34 34 }; 35 35 … … 65 65 66 66 int main() { 67 68 67 // access nested struct 68 S.T x; 69 69 70 71 72 73 74 75 76 70 { 71 struct S { 72 int i; 73 struct Z { 74 double d; 75 }; 76 }; 77 77 78 S.Z z;// gets local S79 .S.T y;// lookup at global scope only78 S.Z z; // gets local S 79 .S.T y; // lookup at global scope only 80 80 81 81 const volatile .S.T q; 82 82 #if ERR1 83 T err1;// error: no T in scope83 T err1; // error: no T in scope 84 84 #endif 85 85 #if ERR2 86 .Z err2;// error: no Z in global scope87 .S.Baz.Bar err3;// error: .S.Baz => int, int is not aggregate and should not appear left of the dot88 .S.Z err4;// error: no Z in global S86 .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 89 89 #endif 90 90 } 91 91 92 92 // U.S un; 93 93 94 95 96 94 S.Bar y; 95 S.Baz x; 96 S.T.Bar z; 97 97 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 99 101 } 100 102 -
tests/numericConstants.cfa
rae2c27a rc76bd34 10 10 // Created On : Wed May 24 22:10:36 2017 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Feb 5 08:58:16 201913 // Update Count : 512 // Last Modified On : Sun Sep 27 07:55:22 2020 13 // Update Count : 7 14 14 // 15 15 … … 63 63 0x_ff.ffp0; // hex real 64 64 0x_1.ffff_ffff_p_128_l; 65 66 #pragma message( "Compiled" ) // force non-empty .expect file 65 67 } // main 66 68 -
tests/operators.cfa
rae2c27a rc76bd34 31 31 int main(int argc, char const *argv[]) { 32 32 /* code */ 33 return 0;33 printf( "done\n" ); // non-empty .expect file 34 34 } 35 35 -
tests/poly-o-cycle.cfa
rae2c27a rc76bd34 1 // Check that a cycle of polymorphic datastructures can be instancated.1 // Check that a cycle of polymorphic otype structures can be instancated. 2 2 3 3 #include <stdio.h> -
tests/pybin/tools.py
rae2c27a rc76bd34 88 88 raise 89 89 90 def is_empty(fname): 91 if not os.path.isfile(fname): 92 return True 93 94 if os.stat(fname).st_size == 0: 95 return True 96 97 return False 98 90 99 def is_ascii(fname): 91 100 if settings.dry_run: 92 101 print("is_ascii: %s" % fname) 93 return True102 return (True, "") 94 103 95 104 if not os.path.isfile(fname): 96 return False97 98 code, out = sh("file %s" %fname, output_file=subprocess.PIPE)105 return (False, "No file") 106 107 code, out = sh("file", fname, output_file=subprocess.PIPE) 99 108 if code != 0: 100 return False109 return (False, "'file EXPECT' failed with code {}".format(code)) 101 110 102 111 match = re.search(".*: (.*)", out) 103 112 104 113 if not match: 105 return False 106 107 return match.group(1).startswith("ASCII text") 114 return (False, "Unreadable file type: '{}'".format(out)) 115 116 if "ASCII text" in match.group(1): 117 return (True, "") 118 119 return (False, "File type should be 'ASCII text', was '{}'".format(match.group(1))) 108 120 109 121 def is_exe(fname): … … 120 132 return None 121 133 122 file = open(file, mode )134 file = open(file, mode, encoding="latin-1") # use latin-1 so all chars mean something. 123 135 exitstack.push(file) 124 136 return file -
tests/raii/.expect/ctor-autogen.txt
rae2c27a rc76bd34 1 done -
tests/raii/.expect/init_once.txt
rae2c27a rc76bd34 1 done -
tests/raii/ctor-autogen.cfa
rae2c27a rc76bd34 151 151 identity(gcs); 152 152 identity(gcu); 153 printf( "done\n" ); // non-empty .expect file 153 154 } -
tests/raii/init_once.cfa
rae2c27a rc76bd34 10 10 // Created On : Tue Jun 14 15:43:35 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Mar 22 13:41:26 201913 // Update Count : 412 // Last Modified On : Fri Sep 25 15:36:39 2020 13 // Update Count : 5 14 14 // 15 15 … … 188 188 static_variable(); 189 189 } 190 printf( "done\n" ); // non-empty .expect file 190 191 } 191 192 -
tests/result.cfa
rae2c27a rc76bd34 10 10 // Created On : Thr May 25 16:50:00 2017 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Jul 20 15:24:12 201713 // Update Count : 112 // Last Modified On : Fri Sep 25 15:22:59 2020 13 // Update Count : 2 14 14 // 15 15 … … 66 66 checkGetters(); 67 67 checkSetters(); 68 printf( "done\n" ); // non-empty .expect file 68 69 } -
tests/stdincludes.cfa
rae2c27a rc76bd34 10 10 // Created On : Tue Aug 29 08:26:14 2017 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Nov 6 18:00:53 201813 // Update Count : 612 // Last Modified On : Sun Sep 27 08:51:38 2020 13 // Update Count : 8 14 14 // 15 15 … … 47 47 #include <wctype.h> 48 48 49 int main() {} 49 int main() { 50 #pragma message( "Compiled" ) // force non-empty .expect file 51 } 50 52 51 53 // Local Variables: // -
tests/switch.cfa
rae2c27a rc76bd34 10 10 // Created On : Tue Jul 12 06:50:22 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Nov 6 18:01:34 201813 // Update Count : 3712 // Last Modified On : Sun Sep 27 08:35:02 2020 13 // Update Count : 43 14 14 // 15 15 … … 100 100 j = 5; 101 101 } // choose 102 103 #pragma message( "Compiled" ) // force non-empty .expect file 102 104 } // main 103 105 -
tests/test.py
rae2c27a rc76bd34 173 173 test.prepare() 174 174 175 # ---------- 176 # MAKE 177 # ---------- 175 178 # build, skipping to next test on error 176 179 with Timed() as comp_dur: 177 180 make_ret, _ = make( test.target(), output_file=subprocess.DEVNULL, error=out_file, error_file = err_file ) 178 181 182 # ---------- 183 # RUN 184 # ---------- 185 # run everything in a temp directory to make sure core file are handled properly 179 186 run_dur = None 180 # run everything in a temp directory to make sure core file are handled properly181 187 with tempdir(): 182 188 # if the make command succeeds continue otherwise skip to diff … … 207 213 else: 208 214 if os.stat(out_file).st_size < 1048576: 209 with open (out_file, "r" ) as myfile:215 with open (out_file, "r", encoding='latin-1') as myfile: # use latin-1 so all chars mean something. 210 216 error = myfile.read() 211 217 else: … … 256 262 make('clean', output_file=subprocess.DEVNULL, error=subprocess.DEVNULL) 257 263 258 # since python prints stacks by default on a interrupt, redo the interrupt handling to be silent 259 def worker_init(): 260 def sig_int(signal_num, frame): 261 pass 262 263 signal.signal(signal.SIGINT, sig_int) 264 265 # create the executor for our jobs and handle the signal properly 266 pool = multiprocessing.Pool(jobs, worker_init) 264 # create the executor for our jobs 265 pool = multiprocessing.Pool(jobs) 267 266 268 267 failed = False 269 270 def stop(x, y):271 print("Tests interrupted by user", file=sys.stderr)272 sys.exit(1)273 signal.signal(signal.SIGINT, stop)274 268 275 269 # for each test to run … … 360 354 failed = 0 361 355 356 # check if the expected files aren't empty 357 if not options.regenerate_expected: 358 for t in tests: 359 if is_empty(t.expect()): 360 print('WARNING: test "{}" has empty .expect file'.format(t.target()), file=sys.stderr) 361 362 362 # for each build configurations, run the test 363 363 with Timed() as total_dur: -
tests/typedefRedef.cfa
rae2c27a rc76bd34 27 27 typedef int ARR[]; 28 28 typedef 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 32 31 typedef int ARR[2]; 33 //#endif32 #endif 34 33 35 34 typedef int X; … … 54 53 55 54 int main() { 56 55 typedef int ARR[sz]; 57 56 58 57 // can't redefine typedef which is VLA 59 58 #if ERR1 60 59 typedef int ARR[sz]; 61 60 #endif 62 61 63 Foo *x;62 Foo * x; 64 63 65 66 Foo *y;64 typedef struct Bar Foo; 65 Foo * y; 67 66 68 typedef int *** pt; 67 typedef int *** pt; 68 69 #pragma message( "Compiled" ) // force non-empty .expect file 69 70 } -
tests/typeof.cfa
rae2c27a rc76bd34 1 1 int 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 11 12 } -
tests/variableDeclarator.cfa
rae2c27a rc76bd34 10 10 // Created On : Wed Aug 17 08:41:42 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Nov 6 18:02:16 201813 // Update Count : 212 // Last Modified On : Sun Sep 27 07:46:17 2020 13 // Update Count : 13 14 14 // 15 15 … … 18 18 int (f2); 19 19 20 int * f3;21 int ** f4;22 int * const * f5;20 int * f3; 21 int ** f4; 22 int * const * f5; 23 23 int * const * const f6; 24 24 25 int * (f7);26 int ** (f8);27 int * const * (f9);25 int * (f7); 26 int ** (f8); 27 int * const * (f9); 28 28 int * const * const (f10); 29 29 30 int (* f11);31 int (** f12);32 int (* const * f13);30 int (* f11); 31 int (** f12); 32 int (* const * f13); 33 33 int (* const * const f14); 34 34 35 int f15[ ];35 int f15[0]; 36 36 int f16[10]; 37 int (f17[ ]);37 int (f17[0]); 38 38 int (f18[10]); 39 39 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[ ];40 int * f19[0]; 41 int * f20[10]; 42 int ** f21[0]; 43 int ** f22[10]; 44 int * const * f23[0]; 45 int * const * f24[10]; 46 int * const * const f25[0]; 47 47 int * const * const f26[10]; 48 48 49 int *(f27[ ]);49 int *(f27[0]); 50 50 int *(f28[10]); 51 int **(f29[ ]);51 int **(f29[0]); 52 52 int **(f30[10]); 53 int * const *(f31[ ]);53 int * const *(f31[0]); 54 54 int * const *(f32[10]); 55 int * const * const (f33[ ]);55 int * const * const (f33[0]); 56 56 int * const * const (f34[10]); 57 57 58 int (* f35)[];59 int (* f36)[10];60 int (** f37)[];61 int (** f38)[10];62 int (* const * f39)[];63 int (* const * f40)[10];58 int (* f35)[]; 59 int (* f36)[10]; 60 int (** f37)[]; 61 int (** f38)[10]; 62 int (* const * f39)[]; 63 int (* const * f40)[10]; 64 64 int (* const * const f41)[]; 65 65 int (* const * const f42)[10]; 66 66 67 int f43[ ][3];67 int f43[0][3]; 68 68 int f44[3][3]; 69 int (f45[ ])[3];69 int (f45[0])[3]; 70 70 int (f46[3])[3]; 71 int ((f47[ ]))[3];71 int ((f47[0]))[3]; 72 72 int ((f48[3]))[3]; 73 73 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];74 int * f49[0][3]; 75 int * f50[3][3]; 76 int ** f51[0][3]; 77 int ** f52[3][3]; 78 int * const * f53[0][3]; 79 int * const * f54[3][3]; 80 int * const * const f55[0][3]; 81 81 int * const * const f56[3][3]; 82 82 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]);83 int (* f57[0][3]); 84 int (* f58[3][3]); 85 int (** f59[0][3]); 86 int (** f60[3][3]); 87 int (* const * f61[0][3]); 88 int (* const * f62[3][3]); 89 int (* const * const f63[0][3]); 90 90 int (* const * const f64[3][3]); 91 91 … … 93 93 int (f66)(int); 94 94 95 int * f67(int);96 int ** f68(int);97 int * const * f69(int);95 int * f67(int); 96 int ** f68(int); 97 int * const * f69(int); 98 98 int * const * const f70(int); 99 99 … … 104 104 int * const * const (f74)(int); 105 105 106 int (* f75)(int);107 int (** f76)(int);108 int (* const * f77)(int);106 int (* f75)(int); 107 int (** f76)(int); 108 int (* const * f77)(int); 109 109 int (* const * const f78)(int); 110 110 111 int (*(* f79)(int))();111 int (*(* f79)(int))(); 112 112 int (*(* const f80)(int))(); 113 113 int (* const(* const f81)(int))(); … … 119 119 //int fe2()[]; // returning an array 120 120 //int fe3()(); // returning a function 121 //int (* fe4)()(); // returning a function122 //int ((* fe5())())[]; // returning an array121 //int (* fe4)()(); // returning a function 122 //int ((* fe5())())[]; // returning an array 123 123 124 #ifdef __CFA__ 124 125 // Cforall extensions 125 126 … … 129 130 const * const * int cf6; 130 131 131 [ ] int cf15;132 [0] int cf15; 132 133 [10] int cf16; 133 134 134 [ ] * int cf19;135 [0] * int cf19; 135 136 [10] * int cf20; 136 int ** cf21[];137 int ** cf21[0]; 137 138 [10] * * int cf22; 138 [ ] * const * int cf23;139 [0] * const * int cf23; 139 140 [10] * const * int cf24; 140 [ ] const * const * int cf25;141 [0] const * const * int cf25; 141 142 [10] const * const * int cf26; 142 143 … … 150 151 const * const * [10] int cf42; 151 152 152 [ ][3] int cf43;153 [0][3] int cf43; 153 154 [3][3] int cf44; 154 155 155 [ ][3] * int cf49;156 [0][3] * int cf49; 156 157 [3][3] * int cf50; 157 [ ][3] * * int cf51;158 [0][3] * * int cf51; 158 159 [3][3] * * int cf52; 159 [ ][3] const * int cf53;160 [0][3] const * int cf53; 160 161 [3][3] * const * int cf54; 161 [ ][3] const * const * int cf55;162 [0][3] const * const * int cf55; 162 163 [3][3] const * const * int cf56; 163 164 … … 173 174 174 175 *[]*[]* [ *[]*[] int ]( *[]*[] int, *[]*[] int ) v3; 176 #endif // __CFA__ 175 177 176 178 //Dummy main 177 int main(int argc, char const *argv[]) 178 { 179 return 0; 179 int main( int argc, char const * argv[] ) { 180 #pragma message( "Compiled" ) // force non-empty .expect file 180 181 } 181 182 -
tests/voidPtr.cfa
rae2c27a rc76bd34 13 13 if ( ! a ) { 14 14 abort(); 15 } 15 } 16 printf( "done\n" ); // non-empty .expect file 16 17 } 17 18 -
tests/warnings/.expect/self-assignment.txt
rae2c27a rc76bd34 24 24 ... to: 25 25 reference to signed int 26 warnings/self-assignment.cfa: In function '_X4mainFi___1': 27 warnings/self-assignment.cfa:36:9: note: #pragma message: Compiled -
tests/warnings/self-assignment.cfa
rae2c27a rc76bd34 10 10 // Created On : Thu Mar 1 13:53:57 2018 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Feb 20 07:56:17 201913 // Update Count : 312 // Last Modified On : Sun Sep 27 09:24:34 2020 13 // Update Count : 6 14 14 // 15 15 … … 31 31 s.i = s.i; 32 32 t.s.i = t.s.i; 33 34 #pragma message( "Compiled" ) // force non-empty .expect file 33 35 } 34 36 35 37 // Local Variables: // 36 38 // tab-width: 4 // 37 // compile-command: "cfa dtor-early-exit" //39 // compile-command: "cfa self-assignment.cfa" // 38 40 // End: // -
tests/zombies/Rank2.c
rae2c27a rc76bd34 1 int ?=?( int *, int );2 forall(dtype DT) DT * ?=?( DT * *, DT * );1 int ?=?( int &, int ); 2 forall(dtype DT) DT * ?=?( DT *&, DT * ); 3 3 4 4 void a() { … … 11 11 void h( int *null ); 12 12 forall( otype T ) T id( T ); 13 forall( dtype T ) T *0;14 int 0;13 // forall( dtype T ) T *0; 14 // int 0; 15 15 h( id( id( id( 0 ) ) ) ); 16 16 } -
tests/zombies/Tuple.c
rae2c27a rc76bd34 46 46 [ 3, 5 ]; 47 47 [ a, b ] = 3; 48 //[ a, b ] = [ 4.6 ];48 [ a, b ] = [ 4.6 ]; 49 49 [ a, b ] = 4.6; 50 50 [ a, b ] = [ c, d ] = [ 3, 5 ]; … … 59 59 [ a, b ] = t1 = [ c, d ]; 60 60 [ a, b ] = t1 = t2 = [ c, d ]; 61 //t1 = [ 3, 4 ] = [ 3, 4 ] = t1 = [ 3, 4 ];61 t1 = [ 3, 4 ] = [ 3, 4 ] = t1 = [ 3, 4 ]; 62 62 63 63 s.[ f1, i.[ f2, f3 ], f4 ] = [ 11, 12, 13, 3.14159 ]; … … 65 65 // [ a, , b, ] = h( 3, 3, 0, "abc" ); /* ignore some results */ 66 66 sp->[ f4, f1 ] = sp->[ f1, f4 ]; 67 printf( "expecting 3, 17, 23, 4; got % d, %d, %d, %d\n", s.[ f4, i.[ f3, f2 ], f1 ] );67 printf( "expecting 3, 17, 23, 4; got %g, %d, %d, %d\n", s.[ f4, i.[ f3, f2 ], f1 ] ); 68 68 rc = 0; 69 69 } -
tests/zombies/abstype.c
rae2c27a rc76bd34 10 10 // Created On : Wed May 27 17:56:53 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Jun 14 14:27:48 201613 // Update Count : 912 // Last Modified On : Wed Sep 30 13:55:47 2020 13 // Update Count : 10 14 14 // 15 15 … … 21 21 } 22 22 23 forall( otype T ) lvalueT *?( T * );23 forall( otype T ) T *?( T * ); 24 24 int ?++( int * ); 25 25 int ?=?( int *, int ); -
tests/zombies/includes.c
rae2c27a rc76bd34 10 10 // Created On : Wed May 27 17:56:53 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Nov 15 23:06:24 201713 // Update Count : 59 712 // Last Modified On : Wed Sep 30 13:59:18 2020 13 // Update Count : 598 14 14 // 15 15 … … 24 24 #if 1 25 25 #define _GNU_SOURCE 26 #include <a.out.h> 27 #include <aio.h> 28 #include <aliases.h> 29 #include <alloca.h> 30 #include <ansidecl.h> 31 #include <ar.h> 32 #include <argp.h> 33 #include <argz.h> 34 #include <assert.h> 35 //#include <bfd.h> 36 // #include <bfdlink.h> // keyword with 37 #include <byteswap.h> 38 #include <bzlib.h> 39 #include <cblas.h> 40 #include <cblas_f77.h> 41 #include <complex.h> 42 #include <com_err.h> 43 #include <cpio.h> 44 #include <crypt.h> 45 #include <ctype.h> 46 #include <curses.h> 47 #include <dialog.h> 48 #include <dirent.h> 49 #include <dis-asm.h> 50 #include <dlfcn.h> 51 #include <dlg_colors.h> 52 #include <dlg_config.h> 53 #include <dlg_keys.h> 54 #include <elf.h> 55 #include <endian.h> 56 #include <envz.h> 57 #include <err.h> 58 #include <errno.h> 59 #include <error.h> 60 #include <eti.h> 61 #include <evdns.h> 62 #include <event.h> 26 // #include <a.out.h> 27 // #include <aio.h> 28 // #include <aliases.h> 29 // #include <alloca.h> 30 // #include <ansidecl.h> 31 // #include <ar.h> 32 // #include <argp.h> 33 // #include <argz.h> 34 // #include <assert.h> 35 // #include <bfd.h> 36 // #include <bfdlink.h> // keyword with 37 // #include <byteswap.h> 38 // #include <bzlib.h> 39 // #include <cblas.h> 40 // #include <cblas_f77.h> 41 // #include <complex.h> 42 // #include <com_err.h> 43 // #include <cpio.h> 44 45 // #include <crypt.h> 46 // #include <ctype.h> 47 // #include <curses.h> 48 // #include <dialog.h> 49 // #include <dirent.h> 50 // #include <dis-asm.h> 51 // #include <dlfcn.h> 52 // #include <dlg_colors.h> 53 // #include <dlg_config.h> 54 // #include <dlg_keys.h> 55 // #include <elf.h> 56 // #include <endian.h> 57 // #include <envz.h> 58 // #include <err.h> 59 // #include <errno.h> 60 // #include <error.h> 61 // #include <eti.h> 62 // #include <evdns.h> 63 // #include <event.h> 63 64 64 65 // #include <evhttp.h> 65 66 // #include <sys/queue.h> 66 // #include <evrpc.h> // evrpc.h depends on sys/queue.h67 // #include <evrpc.h> // evrpc.h depends on sys/queue.h 67 68 // #include <evutil.h> 68 69 // #include <execinfo.h> … … 80 81 // #include <fts.h> 81 82 // #include <ftw.h> 83 82 84 // #include <gconv.h> 83 85 // #include <getopt.h> … … 89 91 // #include <gshadow.h> 90 92 // #include <gssapi.h> 91 // #include <hwloc.h>// keyword thread (setjmp)93 #include <hwloc.h> // keyword thread (setjmp) 92 94 // #include <iconv.h> 93 95 // #include <idna.h> -
tests/zombies/structMember.cfa
rae2c27a rc76bd34 53 53 // C useless declarations 54 54 55 #ifdef ERROR 55 56 int; 56 57 TD; … … 70 71 W(int); 71 72 W(int).X; 73 #endif // ERROR 72 74 }; 73 75
Note:
See TracChangeset
for help on using the changeset viewer.