- Timestamp:
- May 1, 2017, 1:40:13 PM (8 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- 5544465, ed8a0d2
- Parents:
- 12d3187 (diff), 13e2c54 (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:
- src/tests
- Files:
-
- 9 added
- 1 deleted
- 17 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified src/tests/.expect/32/attributes.txt ¶
r12d3187 r2055098 1 attributes.c:74 error: cannot redefine typedef: ptrdiff_t 2 attributes.c:75 error: cannot redefine typedef: size_t 3 make: *** [attributes] Error 1 1 __attribute__ ((__nothrow__,__leaf__,__malloc__)) extern void *malloc(unsigned int __size); 2 __attribute__ ((__nothrow__,__leaf__)) extern void free(void *__ptr); 3 __attribute__ ((__nothrow__,__leaf__,__noreturn__)) extern void abort(void); 4 __attribute__ ((__nothrow__,__leaf__,__nonnull__(1))) extern int atexit(void (*__func)(void)); 5 __attribute__ ((__nothrow__,__leaf__,__noreturn__)) extern void exit(int __status); 6 extern int printf(const char *__restrict __format, ...); 7 int __la__Fi___1(){ 8 int ___retval_la__i_1; 9 L: __attribute__ ((unused)) ((void)1); 10 } 11 __attribute__ ((unused)) struct __anonymous0 { 12 }; 13 static inline void ___constructor__F_P13s__anonymous0_autogen___1(struct __anonymous0 *___dst__P13s__anonymous0_1); 14 static inline void ___constructor__F_P13s__anonymous013s__anonymous0_autogen___1(struct __anonymous0 *___dst__P13s__anonymous0_1, struct __anonymous0 ___src__13s__anonymous0_1); 15 static inline void ___destructor__F_P13s__anonymous0_autogen___1(struct __anonymous0 *___dst__P13s__anonymous0_1); 16 static inline struct __anonymous0 ___operator_assign__F13s__anonymous0_P13s__anonymous013s__anonymous0_autogen___1(struct __anonymous0 *___dst__P13s__anonymous0_1, struct __anonymous0 ___src__13s__anonymous0_1); 17 static inline void ___constructor__F_P13s__anonymous0_autogen___1(struct __anonymous0 *___dst__P13s__anonymous0_1){ 18 } 19 static inline void ___constructor__F_P13s__anonymous013s__anonymous0_autogen___1(struct __anonymous0 *___dst__P13s__anonymous0_1, struct __anonymous0 ___src__13s__anonymous0_1){ 20 } 21 static inline void ___destructor__F_P13s__anonymous0_autogen___1(struct __anonymous0 *___dst__P13s__anonymous0_1){ 22 } 23 static inline struct __anonymous0 ___operator_assign__F13s__anonymous0_P13s__anonymous013s__anonymous0_autogen___1(struct __anonymous0 *___dst__P13s__anonymous0_1, struct __anonymous0 ___src__13s__anonymous0_1){ 24 return ((struct __anonymous0 )___src__13s__anonymous0_1); 25 } 26 __attribute__ ((unused)) struct Agn1; 27 __attribute__ ((unused)) struct Agn2 { 28 }; 29 static inline void ___constructor__F_P5sAgn2_autogen___1(struct Agn2 *___dst__P5sAgn2_1); 30 static inline void ___constructor__F_P5sAgn25sAgn2_autogen___1(struct Agn2 *___dst__P5sAgn2_1, struct Agn2 ___src__5sAgn2_1); 31 static inline void ___destructor__F_P5sAgn2_autogen___1(struct Agn2 *___dst__P5sAgn2_1); 32 static inline struct Agn2 ___operator_assign__F5sAgn2_P5sAgn25sAgn2_autogen___1(struct Agn2 *___dst__P5sAgn2_1, struct Agn2 ___src__5sAgn2_1); 33 static inline void ___constructor__F_P5sAgn2_autogen___1(struct Agn2 *___dst__P5sAgn2_1){ 34 } 35 static inline void ___constructor__F_P5sAgn25sAgn2_autogen___1(struct Agn2 *___dst__P5sAgn2_1, struct Agn2 ___src__5sAgn2_1){ 36 } 37 static inline void ___destructor__F_P5sAgn2_autogen___1(struct Agn2 *___dst__P5sAgn2_1){ 38 } 39 static inline struct Agn2 ___operator_assign__F5sAgn2_P5sAgn25sAgn2_autogen___1(struct Agn2 *___dst__P5sAgn2_1, struct Agn2 ___src__5sAgn2_1){ 40 return ((struct Agn2 )___src__5sAgn2_1); 41 } 42 enum __attribute__ ((unused)) __anonymous1 { 43 __E1__C13e__anonymous1_1, 44 }; 45 enum __attribute__ ((unused)) Agn3; 46 enum __attribute__ ((packed)) Agn3 { 47 __E2__C5eAgn3_1, 48 }; 49 __attribute__ ((unused)) struct __anonymous2; 50 __attribute__ ((unused)) struct __anonymous3; 51 struct Fdl { 52 __attribute__ ((unused)) int __f1__i_1; 53 __attribute__ ((unused)) int __f2__i_1; 54 __attribute__ ((unused,unused)) int __f3__i_1; 55 __attribute__ ((unused)) int __f4__i_1; 56 __attribute__ ((unused,unused)) int __f5__i_1; 57 __attribute__ ((used,packed)) int __f6__i_1; 58 __attribute__ ((used,unused,unused)) int __f7__i_1; 59 __attribute__ ((used,used,unused)) int __f8__i_1; 60 __attribute__ ((unused)) int __anonymous_object0; 61 __attribute__ ((unused,unused)) int *__f9__Pi_1; 62 }; 63 static inline void ___constructor__F_P4sFdl_autogen___1(struct Fdl *___dst__P4sFdl_1); 64 static inline void ___constructor__F_P4sFdl4sFdl_autogen___1(struct Fdl *___dst__P4sFdl_1, struct Fdl ___src__4sFdl_1); 65 static inline void ___destructor__F_P4sFdl_autogen___1(struct Fdl *___dst__P4sFdl_1); 66 static inline struct Fdl ___operator_assign__F4sFdl_P4sFdl4sFdl_autogen___1(struct Fdl *___dst__P4sFdl_1, struct Fdl ___src__4sFdl_1); 67 static inline void ___constructor__F_P4sFdl_autogen___1(struct Fdl *___dst__P4sFdl_1){ 68 ((void)((*((int *)(&(*___dst__P4sFdl_1).__f1__i_1)))) /* ?{} */); 69 ((void)((*((int *)(&(*___dst__P4sFdl_1).__f2__i_1)))) /* ?{} */); 70 ((void)((*((int *)(&(*___dst__P4sFdl_1).__f3__i_1)))) /* ?{} */); 71 ((void)((*((int *)(&(*___dst__P4sFdl_1).__f4__i_1)))) /* ?{} */); 72 ((void)((*((int *)(&(*___dst__P4sFdl_1).__f5__i_1)))) /* ?{} */); 73 ((void)((*((int *)(&(*___dst__P4sFdl_1).__f6__i_1)))) /* ?{} */); 74 ((void)((*((int *)(&(*___dst__P4sFdl_1).__f7__i_1)))) /* ?{} */); 75 ((void)((*((int *)(&(*___dst__P4sFdl_1).__f8__i_1)))) /* ?{} */); 76 ((void)((*((int **)(&(*___dst__P4sFdl_1).__f9__Pi_1)))) /* ?{} */); 77 } 78 static inline void ___constructor__F_P4sFdl4sFdl_autogen___1(struct Fdl *___dst__P4sFdl_1, struct Fdl ___src__4sFdl_1){ 79 ((void)((*((int *)(&(*___dst__P4sFdl_1).__f1__i_1)))=___src__4sFdl_1.__f1__i_1) /* ?{} */); 80 ((void)((*((int *)(&(*___dst__P4sFdl_1).__f2__i_1)))=___src__4sFdl_1.__f2__i_1) /* ?{} */); 81 ((void)((*((int *)(&(*___dst__P4sFdl_1).__f3__i_1)))=___src__4sFdl_1.__f3__i_1) /* ?{} */); 82 ((void)((*((int *)(&(*___dst__P4sFdl_1).__f4__i_1)))=___src__4sFdl_1.__f4__i_1) /* ?{} */); 83 ((void)((*((int *)(&(*___dst__P4sFdl_1).__f5__i_1)))=___src__4sFdl_1.__f5__i_1) /* ?{} */); 84 ((void)((*((int *)(&(*___dst__P4sFdl_1).__f6__i_1)))=___src__4sFdl_1.__f6__i_1) /* ?{} */); 85 ((void)((*((int *)(&(*___dst__P4sFdl_1).__f7__i_1)))=___src__4sFdl_1.__f7__i_1) /* ?{} */); 86 ((void)((*((int *)(&(*___dst__P4sFdl_1).__f8__i_1)))=___src__4sFdl_1.__f8__i_1) /* ?{} */); 87 ((void)((*((int **)(&(*___dst__P4sFdl_1).__f9__Pi_1)))=___src__4sFdl_1.__f9__Pi_1) /* ?{} */); 88 } 89 static inline void ___destructor__F_P4sFdl_autogen___1(struct Fdl *___dst__P4sFdl_1){ 90 ((void)((*((int **)(&(*___dst__P4sFdl_1).__f9__Pi_1)))) /* ^?{} */); 91 ((void)((*((int *)(&(*___dst__P4sFdl_1).__f8__i_1)))) /* ^?{} */); 92 ((void)((*((int *)(&(*___dst__P4sFdl_1).__f7__i_1)))) /* ^?{} */); 93 ((void)((*((int *)(&(*___dst__P4sFdl_1).__f6__i_1)))) /* ^?{} */); 94 ((void)((*((int *)(&(*___dst__P4sFdl_1).__f5__i_1)))) /* ^?{} */); 95 ((void)((*((int *)(&(*___dst__P4sFdl_1).__f4__i_1)))) /* ^?{} */); 96 ((void)((*((int *)(&(*___dst__P4sFdl_1).__f3__i_1)))) /* ^?{} */); 97 ((void)((*((int *)(&(*___dst__P4sFdl_1).__f2__i_1)))) /* ^?{} */); 98 ((void)((*((int *)(&(*___dst__P4sFdl_1).__f1__i_1)))) /* ^?{} */); 99 } 100 static inline struct Fdl ___operator_assign__F4sFdl_P4sFdl4sFdl_autogen___1(struct Fdl *___dst__P4sFdl_1, struct Fdl ___src__4sFdl_1){ 101 ((void)((*___dst__P4sFdl_1).__f1__i_1=___src__4sFdl_1.__f1__i_1)); 102 ((void)((*___dst__P4sFdl_1).__f2__i_1=___src__4sFdl_1.__f2__i_1)); 103 ((void)((*___dst__P4sFdl_1).__f3__i_1=___src__4sFdl_1.__f3__i_1)); 104 ((void)((*___dst__P4sFdl_1).__f4__i_1=___src__4sFdl_1.__f4__i_1)); 105 ((void)((*___dst__P4sFdl_1).__f5__i_1=___src__4sFdl_1.__f5__i_1)); 106 ((void)((*___dst__P4sFdl_1).__f6__i_1=___src__4sFdl_1.__f6__i_1)); 107 ((void)((*___dst__P4sFdl_1).__f7__i_1=___src__4sFdl_1.__f7__i_1)); 108 ((void)((*___dst__P4sFdl_1).__f8__i_1=___src__4sFdl_1.__f8__i_1)); 109 ((void)((*___dst__P4sFdl_1).__f9__Pi_1=___src__4sFdl_1.__f9__Pi_1)); 110 return ((struct Fdl )___src__4sFdl_1); 111 } 112 static inline void ___constructor__F_P4sFdli_autogen___1(struct Fdl *___dst__P4sFdl_1, int __f1__i_1){ 113 ((void)((*((int *)(&(*___dst__P4sFdl_1).__f1__i_1)))=__f1__i_1) /* ?{} */); 114 ((void)((*((int *)(&(*___dst__P4sFdl_1).__f2__i_1)))) /* ?{} */); 115 ((void)((*((int *)(&(*___dst__P4sFdl_1).__f3__i_1)))) /* ?{} */); 116 ((void)((*((int *)(&(*___dst__P4sFdl_1).__f4__i_1)))) /* ?{} */); 117 ((void)((*((int *)(&(*___dst__P4sFdl_1).__f5__i_1)))) /* ?{} */); 118 ((void)((*((int *)(&(*___dst__P4sFdl_1).__f6__i_1)))) /* ?{} */); 119 ((void)((*((int *)(&(*___dst__P4sFdl_1).__f7__i_1)))) /* ?{} */); 120 ((void)((*((int *)(&(*___dst__P4sFdl_1).__f8__i_1)))) /* ?{} */); 121 ((void)((*((int **)(&(*___dst__P4sFdl_1).__f9__Pi_1)))) /* ?{} */); 122 } 123 static inline void ___constructor__F_P4sFdlii_autogen___1(struct Fdl *___dst__P4sFdl_1, int __f1__i_1, int __f2__i_1){ 124 ((void)((*((int *)(&(*___dst__P4sFdl_1).__f1__i_1)))=__f1__i_1) /* ?{} */); 125 ((void)((*((int *)(&(*___dst__P4sFdl_1).__f2__i_1)))=__f2__i_1) /* ?{} */); 126 ((void)((*((int *)(&(*___dst__P4sFdl_1).__f3__i_1)))) /* ?{} */); 127 ((void)((*((int *)(&(*___dst__P4sFdl_1).__f4__i_1)))) /* ?{} */); 128 ((void)((*((int *)(&(*___dst__P4sFdl_1).__f5__i_1)))) /* ?{} */); 129 ((void)((*((int *)(&(*___dst__P4sFdl_1).__f6__i_1)))) /* ?{} */); 130 ((void)((*((int *)(&(*___dst__P4sFdl_1).__f7__i_1)))) /* ?{} */); 131 ((void)((*((int *)(&(*___dst__P4sFdl_1).__f8__i_1)))) /* ?{} */); 132 ((void)((*((int **)(&(*___dst__P4sFdl_1).__f9__Pi_1)))) /* ?{} */); 133 } 134 static inline void ___constructor__F_P4sFdliii_autogen___1(struct Fdl *___dst__P4sFdl_1, int __f1__i_1, int __f2__i_1, int __f3__i_1){ 135 ((void)((*((int *)(&(*___dst__P4sFdl_1).__f1__i_1)))=__f1__i_1) /* ?{} */); 136 ((void)((*((int *)(&(*___dst__P4sFdl_1).__f2__i_1)))=__f2__i_1) /* ?{} */); 137 ((void)((*((int *)(&(*___dst__P4sFdl_1).__f3__i_1)))=__f3__i_1) /* ?{} */); 138 ((void)((*((int *)(&(*___dst__P4sFdl_1).__f4__i_1)))) /* ?{} */); 139 ((void)((*((int *)(&(*___dst__P4sFdl_1).__f5__i_1)))) /* ?{} */); 140 ((void)((*((int *)(&(*___dst__P4sFdl_1).__f6__i_1)))) /* ?{} */); 141 ((void)((*((int *)(&(*___dst__P4sFdl_1).__f7__i_1)))) /* ?{} */); 142 ((void)((*((int *)(&(*___dst__P4sFdl_1).__f8__i_1)))) /* ?{} */); 143 ((void)((*((int **)(&(*___dst__P4sFdl_1).__f9__Pi_1)))) /* ?{} */); 144 } 145 static inline void ___constructor__F_P4sFdliiii_autogen___1(struct Fdl *___dst__P4sFdl_1, int __f1__i_1, int __f2__i_1, int __f3__i_1, int __f4__i_1){ 146 ((void)((*((int *)(&(*___dst__P4sFdl_1).__f1__i_1)))=__f1__i_1) /* ?{} */); 147 ((void)((*((int *)(&(*___dst__P4sFdl_1).__f2__i_1)))=__f2__i_1) /* ?{} */); 148 ((void)((*((int *)(&(*___dst__P4sFdl_1).__f3__i_1)))=__f3__i_1) /* ?{} */); 149 ((void)((*((int *)(&(*___dst__P4sFdl_1).__f4__i_1)))=__f4__i_1) /* ?{} */); 150 ((void)((*((int *)(&(*___dst__P4sFdl_1).__f5__i_1)))) /* ?{} */); 151 ((void)((*((int *)(&(*___dst__P4sFdl_1).__f6__i_1)))) /* ?{} */); 152 ((void)((*((int *)(&(*___dst__P4sFdl_1).__f7__i_1)))) /* ?{} */); 153 ((void)((*((int *)(&(*___dst__P4sFdl_1).__f8__i_1)))) /* ?{} */); 154 ((void)((*((int **)(&(*___dst__P4sFdl_1).__f9__Pi_1)))) /* ?{} */); 155 } 156 static inline void ___constructor__F_P4sFdliiiii_autogen___1(struct Fdl *___dst__P4sFdl_1, int __f1__i_1, int __f2__i_1, int __f3__i_1, int __f4__i_1, int __f5__i_1){ 157 ((void)((*((int *)(&(*___dst__P4sFdl_1).__f1__i_1)))=__f1__i_1) /* ?{} */); 158 ((void)((*((int *)(&(*___dst__P4sFdl_1).__f2__i_1)))=__f2__i_1) /* ?{} */); 159 ((void)((*((int *)(&(*___dst__P4sFdl_1).__f3__i_1)))=__f3__i_1) /* ?{} */); 160 ((void)((*((int *)(&(*___dst__P4sFdl_1).__f4__i_1)))=__f4__i_1) /* ?{} */); 161 ((void)((*((int *)(&(*___dst__P4sFdl_1).__f5__i_1)))=__f5__i_1) /* ?{} */); 162 ((void)((*((int *)(&(*___dst__P4sFdl_1).__f6__i_1)))) /* ?{} */); 163 ((void)((*((int *)(&(*___dst__P4sFdl_1).__f7__i_1)))) /* ?{} */); 164 ((void)((*((int *)(&(*___dst__P4sFdl_1).__f8__i_1)))) /* ?{} */); 165 ((void)((*((int **)(&(*___dst__P4sFdl_1).__f9__Pi_1)))) /* ?{} */); 166 } 167 static inline void ___constructor__F_P4sFdliiiiii_autogen___1(struct Fdl *___dst__P4sFdl_1, int __f1__i_1, int __f2__i_1, int __f3__i_1, int __f4__i_1, int __f5__i_1, int __f6__i_1){ 168 ((void)((*((int *)(&(*___dst__P4sFdl_1).__f1__i_1)))=__f1__i_1) /* ?{} */); 169 ((void)((*((int *)(&(*___dst__P4sFdl_1).__f2__i_1)))=__f2__i_1) /* ?{} */); 170 ((void)((*((int *)(&(*___dst__P4sFdl_1).__f3__i_1)))=__f3__i_1) /* ?{} */); 171 ((void)((*((int *)(&(*___dst__P4sFdl_1).__f4__i_1)))=__f4__i_1) /* ?{} */); 172 ((void)((*((int *)(&(*___dst__P4sFdl_1).__f5__i_1)))=__f5__i_1) /* ?{} */); 173 ((void)((*((int *)(&(*___dst__P4sFdl_1).__f6__i_1)))=__f6__i_1) /* ?{} */); 174 ((void)((*((int *)(&(*___dst__P4sFdl_1).__f7__i_1)))) /* ?{} */); 175 ((void)((*((int *)(&(*___dst__P4sFdl_1).__f8__i_1)))) /* ?{} */); 176 ((void)((*((int **)(&(*___dst__P4sFdl_1).__f9__Pi_1)))) /* ?{} */); 177 } 178 static inline void ___constructor__F_P4sFdliiiiiii_autogen___1(struct Fdl *___dst__P4sFdl_1, int __f1__i_1, int __f2__i_1, int __f3__i_1, int __f4__i_1, int __f5__i_1, int __f6__i_1, int __f7__i_1){ 179 ((void)((*((int *)(&(*___dst__P4sFdl_1).__f1__i_1)))=__f1__i_1) /* ?{} */); 180 ((void)((*((int *)(&(*___dst__P4sFdl_1).__f2__i_1)))=__f2__i_1) /* ?{} */); 181 ((void)((*((int *)(&(*___dst__P4sFdl_1).__f3__i_1)))=__f3__i_1) /* ?{} */); 182 ((void)((*((int *)(&(*___dst__P4sFdl_1).__f4__i_1)))=__f4__i_1) /* ?{} */); 183 ((void)((*((int *)(&(*___dst__P4sFdl_1).__f5__i_1)))=__f5__i_1) /* ?{} */); 184 ((void)((*((int *)(&(*___dst__P4sFdl_1).__f6__i_1)))=__f6__i_1) /* ?{} */); 185 ((void)((*((int *)(&(*___dst__P4sFdl_1).__f7__i_1)))=__f7__i_1) /* ?{} */); 186 ((void)((*((int *)(&(*___dst__P4sFdl_1).__f8__i_1)))) /* ?{} */); 187 ((void)((*((int **)(&(*___dst__P4sFdl_1).__f9__Pi_1)))) /* ?{} */); 188 } 189 static inline void ___constructor__F_P4sFdliiiiiiii_autogen___1(struct Fdl *___dst__P4sFdl_1, int __f1__i_1, int __f2__i_1, int __f3__i_1, int __f4__i_1, int __f5__i_1, int __f6__i_1, int __f7__i_1, int __f8__i_1){ 190 ((void)((*((int *)(&(*___dst__P4sFdl_1).__f1__i_1)))=__f1__i_1) /* ?{} */); 191 ((void)((*((int *)(&(*___dst__P4sFdl_1).__f2__i_1)))=__f2__i_1) /* ?{} */); 192 ((void)((*((int *)(&(*___dst__P4sFdl_1).__f3__i_1)))=__f3__i_1) /* ?{} */); 193 ((void)((*((int *)(&(*___dst__P4sFdl_1).__f4__i_1)))=__f4__i_1) /* ?{} */); 194 ((void)((*((int *)(&(*___dst__P4sFdl_1).__f5__i_1)))=__f5__i_1) /* ?{} */); 195 ((void)((*((int *)(&(*___dst__P4sFdl_1).__f6__i_1)))=__f6__i_1) /* ?{} */); 196 ((void)((*((int *)(&(*___dst__P4sFdl_1).__f7__i_1)))=__f7__i_1) /* ?{} */); 197 ((void)((*((int *)(&(*___dst__P4sFdl_1).__f8__i_1)))=__f8__i_1) /* ?{} */); 198 ((void)((*((int **)(&(*___dst__P4sFdl_1).__f9__Pi_1)))) /* ?{} */); 199 } 200 static inline void ___constructor__F_P4sFdliiiiiiiiPi_autogen___1(struct Fdl *___dst__P4sFdl_1, int __f1__i_1, int __f2__i_1, int __f3__i_1, int __f4__i_1, int __f5__i_1, int __f6__i_1, int __f7__i_1, int __f8__i_1, int *__f9__Pi_1){ 201 ((void)((*((int *)(&(*___dst__P4sFdl_1).__f1__i_1)))=__f1__i_1) /* ?{} */); 202 ((void)((*((int *)(&(*___dst__P4sFdl_1).__f2__i_1)))=__f2__i_1) /* ?{} */); 203 ((void)((*((int *)(&(*___dst__P4sFdl_1).__f3__i_1)))=__f3__i_1) /* ?{} */); 204 ((void)((*((int *)(&(*___dst__P4sFdl_1).__f4__i_1)))=__f4__i_1) /* ?{} */); 205 ((void)((*((int *)(&(*___dst__P4sFdl_1).__f5__i_1)))=__f5__i_1) /* ?{} */); 206 ((void)((*((int *)(&(*___dst__P4sFdl_1).__f6__i_1)))=__f6__i_1) /* ?{} */); 207 ((void)((*((int *)(&(*___dst__P4sFdl_1).__f7__i_1)))=__f7__i_1) /* ?{} */); 208 ((void)((*((int *)(&(*___dst__P4sFdl_1).__f8__i_1)))=__f8__i_1) /* ?{} */); 209 ((void)((*((int **)(&(*___dst__P4sFdl_1).__f9__Pi_1)))=__f9__Pi_1) /* ?{} */); 210 } 211 __attribute__ ((unused)) int __f__Fi___1() asm ( "xyz" ); 212 __attribute__ ((used,used)) const int __vd1__Ci_1; 213 __attribute__ ((used,unused)) const int __vd2__Ci_1; 214 __attribute__ ((used,used,used,used)) const int *__vd3__PCi_1; 215 __attribute__ ((used,used,unused,used,unused)) const int *__vd4__PCi_1; 216 __attribute__ ((used,used,used)) const int __vd5__A0Ci_1[((unsigned int )5)]; 217 __attribute__ ((used,used,unused,used)) const int __vd6__A0Ci_1[((unsigned int )5)]; 218 __attribute__ ((used,used,used,used)) const int (*__vd7__PFCi___1)(); 219 __attribute__ ((used,used,unused,used,used)) const int (*__vd8__PFCi___1)(); 220 __attribute__ ((unused,used)) int __f1__Fi___1(); 221 __attribute__ ((unused)) int __f1__Fi___1(){ 222 int ___retval_f1__i_1; 223 } 224 __attribute__ ((unused,unused,unused,used)) int **const __f2__FCPPi___1(); 225 __attribute__ ((unused,unused,unused)) int **const __f2__FCPPi___1(){ 226 int **const ___retval_f2__CPPi_1; 227 } 228 __attribute__ ((unused,used,unused)) int (*__f3__FPA0i_i__1(int __anonymous_object1))[]; 229 __attribute__ ((unused,unused)) int (*__f3__FPA0i_i__1(int __p__i_1))[]{ 230 int (*___retval_f3__PA0i_1)[]; 231 } 232 __attribute__ ((unused,used,unused)) int (*__f4__FPFi_i____1())(int __anonymous_object2); 233 __attribute__ ((unused,unused)) int (*__f4__FPFi_i____1())(int __anonymous_object3){ 234 int (*___retval_f4__PFi_i__1)(int __anonymous_object4); 235 } 236 int __vtr__Fi___1(){ 237 int ___retval_vtr__i_1; 238 __attribute__ ((unused,unused,used)) int __t1__i_2; 239 __attribute__ ((unused,unused,unused,unused,unused)) int **__t2__PPi_2; 240 __attribute__ ((unused,unused,unused)) int __t3__A0i_2[((unsigned int )5)]; 241 __attribute__ ((unused,unused,unused,unused,unused)) int **__t4__A0PPi_2[((unsigned int )5)]; 242 __attribute__ ((unused,unused,unused)) int __t5__Fi___2(); 243 __attribute__ ((unused,unused,unused,unused)) int *__t6__FPi___2(); 244 } 245 int __ipd1__Fi_ii__1(__attribute__ ((unused,unused,unused)) int __p__i_1, __attribute__ ((unused,unused,unused)) int __q__i_1); 246 int __ipd1__Fi_ii__1(__attribute__ ((unused,unused,unused)) int __p__i_1, __attribute__ ((unused,unused,unused)) int __q__i_1){ 247 int ___retval_ipd1__i_1; 248 } 249 int __ipd2__Fi_PiPi__1(__attribute__ ((unused,unused,unused,unused)) int *__p__Pi_1, __attribute__ ((unused,unused,unused)) int *__q__Pi_1); 250 int __ipd2__Fi_PiPi__1(__attribute__ ((unused,unused,unused,unused)) int *__p__Pi_1, __attribute__ ((unused,unused,unused)) int *__q__Pi_1){ 251 int ___retval_ipd2__i_1; 252 } 253 int __ipd3__Fi_PiPi__1(__attribute__ ((unused,unused,unused)) int *__p__Pi_1, __attribute__ ((unused,unused,unused)) int *__q__Pi_1); 254 int __ipd3__Fi_PiPi__1(__attribute__ ((unused,unused,unused)) int *__p__Pi_1, __attribute__ ((unused,unused,unused)) int *__q__Pi_1){ 255 int ___retval_ipd3__i_1; 256 } 257 int __ipd4__Fi_PFi__PFi____1(__attribute__ ((unused,unused,unused)) int (*__p__PFi___1)(), __attribute__ ((unused,unused,unused)) int (*__q__PFi___1)()); 258 int __ipd4__Fi_PFi__PFi____1(__attribute__ ((unused,unused,unused)) int (*__p__PFi___1)(), __attribute__ ((unused,unused,unused)) int (*__q__PFi___1)()){ 259 int ___retval_ipd4__i_1; 260 } 261 int __tpr1__Fi_i__1(__attribute__ ((unused,unused,unused)) int __Foo__i_1); 262 int __tpr2__Fi_PPi__1(__attribute__ ((unused,unused,unused,unused,unused,unused)) int **__Foo__PPi_1); 263 int __tpr3__Fi_Pi__1(__attribute__ ((unused,unused,unused)) int *__Foo__Pi_1); 264 int __tpr4__Fi_PFi_Pi___1(__attribute__ ((unused,unused)) int (*__anonymous_object5)(__attribute__ ((unused,unused)) int __anonymous_object6[((unsigned int )5)])); 265 int __tpr5__Fi_PFi____1(__attribute__ ((unused,unused,unused)) int (*__Foo__PFi___1)()); 266 int __tpr6__Fi_PFi____1(__attribute__ ((unused,unused,unused)) int (*__Foo__PFi___1)()); 267 int __tpr7__Fi_PFi_PFi_i____1(__attribute__ ((unused,unused)) int (*__anonymous_object7)(__attribute__ ((unused)) int (*__anonymous_object8)(__attribute__ ((unused,unused)) int __anonymous_object9))); 268 int __ad__Fi___1(){ 269 int ___retval_ad__i_1; 270 __attribute__ ((used,unused)) int __ad1__i_2; 271 __attribute__ ((unused,unused,unused)) int *__ad2__Pi_2; 272 __attribute__ ((unused,unused,unused)) int __ad3__A0i_2[((unsigned int )5)]; 273 __attribute__ ((unused,unused,unused,unused,unused)) int (*__ad4__PA0i_2)[((unsigned int )10)]; 274 __attribute__ ((unused,unused,unused,unused,used)) int __ad5__i_2; 275 __attribute__ ((unused,unused,unused,unused,unused)) int __ad6__Fi___2(); 276 ((void)sizeof(__attribute__ ((unused,unused)) int )); 277 ((void)sizeof(__attribute__ ((unused,unused,unused,unused)) int **)); 278 ((void)sizeof(__attribute__ ((unused,unused,unused)) int [5])); 279 ((void)sizeof(__attribute__ ((unused,unused,unused)) int (*)[10])); 280 ((void)sizeof(__attribute__ ((unused,unused,unused)) int ())); 281 __attribute__ ((unused)) struct __anonymous4 { 282 int __i__i_2; 283 }; 284 inline void ___constructor__F_P13s__anonymous4_autogen___2(struct __anonymous4 *___dst__P13s__anonymous4_2){ 285 ((void)((*((int *)(&(*___dst__P13s__anonymous4_2).__i__i_2)))) /* ?{} */); 286 } 287 inline void ___constructor__F_P13s__anonymous413s__anonymous4_autogen___2(struct __anonymous4 *___dst__P13s__anonymous4_2, struct __anonymous4 ___src__13s__anonymous4_2){ 288 ((void)((*((int *)(&(*___dst__P13s__anonymous4_2).__i__i_2)))=___src__13s__anonymous4_2.__i__i_2) /* ?{} */); 289 } 290 inline void ___destructor__F_P13s__anonymous4_autogen___2(struct __anonymous4 *___dst__P13s__anonymous4_2){ 291 ((void)((*((int *)(&(*___dst__P13s__anonymous4_2).__i__i_2)))) /* ^?{} */); 292 } 293 inline struct __anonymous4 ___operator_assign__F13s__anonymous4_P13s__anonymous413s__anonymous4_autogen___2(struct __anonymous4 *___dst__P13s__anonymous4_2, struct __anonymous4 ___src__13s__anonymous4_2){ 294 ((void)((*___dst__P13s__anonymous4_2).__i__i_2=___src__13s__anonymous4_2.__i__i_2)); 295 return ((struct __anonymous4 )___src__13s__anonymous4_2); 296 } 297 inline void ___constructor__F_P13s__anonymous4i_autogen___2(struct __anonymous4 *___dst__P13s__anonymous4_2, int __i__i_2){ 298 ((void)((*((int *)(&(*___dst__P13s__anonymous4_2).__i__i_2)))=__i__i_2) /* ?{} */); 299 } 300 ((void)sizeof(struct __anonymous4 )); 301 enum __attribute__ ((unused)) __anonymous5 { 302 __R__C13e__anonymous5_2, 303 }; 304 inline void ___constructor__F_P13e__anonymous5_intrinsic___2(enum __anonymous5 *___dst__P13e__anonymous5_2){ 305 } 306 inline void ___constructor__F_P13e__anonymous513e__anonymous5_intrinsic___2(enum __anonymous5 *___dst__P13e__anonymous5_2, enum __anonymous5 ___src__13e__anonymous5_2){ 307 ((void)((*___dst__P13e__anonymous5_2)=___src__13e__anonymous5_2)); 308 } 309 inline void ___destructor__F_P13e__anonymous5_intrinsic___2(enum __anonymous5 *___dst__P13e__anonymous5_2){ 310 } 311 inline enum __anonymous5 ___operator_assign__F13e__anonymous5_P13e__anonymous513e__anonymous5_intrinsic___2(enum __anonymous5 *___dst__P13e__anonymous5_2, enum __anonymous5 ___src__13e__anonymous5_2){ 312 return ((enum __anonymous5 )((*___dst__P13e__anonymous5_2)=___src__13e__anonymous5_2)); 313 } 314 ((void)sizeof(enum __anonymous5 )); 315 } 316 int __apd1__Fi_PiPi__1(__attribute__ ((unused,unused,unused)) int *__anonymous_object10, __attribute__ ((unused,unused,unused)) int *__anonymous_object11); 317 int __apd2__Fi_PPiPPi__1(__attribute__ ((unused,unused,unused,unused)) int **__anonymous_object12, __attribute__ ((unused,unused,unused,unused)) int **__anonymous_object13); 318 int __apd3__Fi_PiPi__1(__attribute__ ((unused,unused,unused)) int *__anonymous_object14, __attribute__ ((unused,unused,unused)) int *__anonymous_object15); 319 int __apd4__Fi_PFi__PFi____1(__attribute__ ((unused,unused,unused)) int (*__anonymous_object16)(), __attribute__ ((unused,unused,unused)) int (*__anonymous_object17)()); 320 int __apd5__Fi_PFi_i_PFi_i___1(__attribute__ ((unused,unused,unused)) int (*__anonymous_object18)(__attribute__ ((unused)) int __anonymous_object19), __attribute__ ((unused,unused,unused)) int (*__anonymous_object20)(__attribute__ ((unused)) int __anonymous_object21)); 321 int __apd6__Fi_PFi__PFi____1(__attribute__ ((unused,unused,unused)) int (*__anonymous_object22)(), __attribute__ ((unused,unused,unused)) int (*__anonymous_object23)()); 322 int __apd7__Fi_PFi_i_PFi_i___1(__attribute__ ((unused,unused,unused)) int (*__anonymous_object24)(__attribute__ ((unused)) int __anonymous_object25), __attribute__ ((unused,unused,unused)) int (*__anonymous_object26)(__attribute__ ((unused)) int __anonymous_object27)); 323 struct Vad { 324 __attribute__ ((unused)) int __anonymous_object28; 325 __attribute__ ((unused,unused)) int *__anonymous_object29; 326 __attribute__ ((unused,unused)) int __anonymous_object30[((unsigned int )10)]; 327 __attribute__ ((unused,unused)) int (*__anonymous_object31)(); 328 }; 329 static inline void ___constructor__F_P4sVad_autogen___1(struct Vad *___dst__P4sVad_1); 330 static inline void ___constructor__F_P4sVad4sVad_autogen___1(struct Vad *___dst__P4sVad_1, struct Vad ___src__4sVad_1); 331 static inline void ___destructor__F_P4sVad_autogen___1(struct Vad *___dst__P4sVad_1); 332 static inline struct Vad ___operator_assign__F4sVad_P4sVad4sVad_autogen___1(struct Vad *___dst__P4sVad_1, struct Vad ___src__4sVad_1); 333 static inline void ___constructor__F_P4sVad_autogen___1(struct Vad *___dst__P4sVad_1){ 334 } 335 static inline void ___constructor__F_P4sVad4sVad_autogen___1(struct Vad *___dst__P4sVad_1, struct Vad ___src__4sVad_1){ 336 } 337 static inline void ___destructor__F_P4sVad_autogen___1(struct Vad *___dst__P4sVad_1){ 338 } 339 static inline struct Vad ___operator_assign__F4sVad_P4sVad4sVad_autogen___1(struct Vad *___dst__P4sVad_1, struct Vad ___src__4sVad_1){ 340 return ((struct Vad )___src__4sVad_1); 341 } -
TabularUnified src/tests/.expect/64/attributes.txt ¶
r12d3187 r2055098 9 9 L: __attribute__ ((unused)) ((void)1); 10 10 } 11 struct __attribute__ ((unused))__anonymous0 {11 __attribute__ ((unused)) struct __anonymous0 { 12 12 }; 13 13 static inline void ___constructor__F_P13s__anonymous0_autogen___1(struct __anonymous0 *___dst__P13s__anonymous0_1); … … 24 24 return ((struct __anonymous0 )___src__13s__anonymous0_1); 25 25 } 26 struct __attribute__ ((unused))Agn1;27 struct __attribute__ ((unused))Agn2 {26 __attribute__ ((unused)) struct Agn1; 27 __attribute__ ((unused)) struct Agn2 { 28 28 }; 29 29 static inline void ___constructor__F_P5sAgn2_autogen___1(struct Agn2 *___dst__P5sAgn2_1); … … 47 47 __E2__C5eAgn3_1, 48 48 }; 49 struct __attribute__ ((unused))__anonymous2;50 struct __attribute__ ((unused))__anonymous3;49 __attribute__ ((unused)) struct __anonymous2; 50 __attribute__ ((unused)) struct __anonymous3; 51 51 struct Fdl { 52 52 __attribute__ ((unused)) int __f1__i_1; … … 234 234 int (*___retval_f4__PFi_i__1)(int __anonymous_object4); 235 235 } 236 __attribute__ ((__nothrow__,__leaf__,__malloc__)) extern void *malloc(long unsigned int __size);237 __attribute__ ((__nothrow__,__leaf__)) extern void free(void *__ptr);238 __attribute__ ((__nothrow__,__leaf__,__noreturn__)) extern void abort(void);239 __attribute__ ((__nothrow__,__leaf__,__nonnull__(1))) extern int atexit0(void (*__func)(void), void *__anonymous_object5, void *__anonymous_object6);240 __attribute__ ((__nothrow__,__leaf__,__noreturn__)) extern void exit(int __status);241 __attribute__ ((format(printf, 1, 2))) extern int printf(const char *__restrict __format, ...);242 236 int __vtr__Fi___1(){ 243 237 int ___retval_vtr__i_1; … … 268 262 int __tpr2__Fi_PPi__1(__attribute__ ((unused,unused,unused,unused,unused,unused)) int **__Foo__PPi_1); 269 263 int __tpr3__Fi_Pi__1(__attribute__ ((unused,unused,unused)) int *__Foo__Pi_1); 270 int __tpr4__Fi_PFi_Pi___1(__attribute__ ((unused,unused)) int (*__anonymous_object 7)(__attribute__ ((unused,unused)) int __anonymous_object8[((long unsigned int )5)]));264 int __tpr4__Fi_PFi_Pi___1(__attribute__ ((unused,unused)) int (*__anonymous_object5)(__attribute__ ((unused,unused)) int __anonymous_object6[((long unsigned int )5)])); 271 265 int __tpr5__Fi_PFi____1(__attribute__ ((unused,unused,unused)) int (*__Foo__PFi___1)()); 272 266 int __tpr6__Fi_PFi____1(__attribute__ ((unused,unused,unused)) int (*__Foo__PFi___1)()); 273 int __tpr7__Fi_PFi_PFi_i____1(__attribute__ ((unused,unused)) int (*__anonymous_object 9)(__attribute__ ((unused)) int (*__anonymous_object10)(__attribute__ ((unused,unused)) int __anonymous_object11)));267 int __tpr7__Fi_PFi_PFi_i____1(__attribute__ ((unused,unused)) int (*__anonymous_object7)(__attribute__ ((unused)) int (*__anonymous_object8)(__attribute__ ((unused,unused)) int __anonymous_object9))); 274 268 int __ad__Fi___1(){ 275 269 int ___retval_ad__i_1; … … 285 279 ((void)sizeof(__attribute__ ((unused,unused,unused)) int (*)[10])); 286 280 ((void)sizeof(__attribute__ ((unused,unused,unused)) int ())); 287 struct __attribute__ ((unused))__anonymous4 {281 __attribute__ ((unused)) struct __anonymous4 { 288 282 int __i__i_2; 289 283 }; … … 320 314 ((void)sizeof(enum __anonymous5 )); 321 315 } 322 int __apd1__Fi_PiPi__1(__attribute__ ((unused,unused,unused)) int *__anonymous_object1 2, __attribute__ ((unused,unused,unused)) int *__anonymous_object13);323 int __apd2__Fi_PPiPPi__1(__attribute__ ((unused,unused,unused,unused)) int **__anonymous_object1 4, __attribute__ ((unused,unused,unused,unused)) int **__anonymous_object15);324 int __apd3__Fi_PiPi__1(__attribute__ ((unused,unused,unused)) int *__anonymous_object1 6, __attribute__ ((unused,unused,unused)) int *__anonymous_object17);325 int __apd4__Fi_PFi__PFi____1(__attribute__ ((unused,unused,unused)) int (*__anonymous_object1 8)(), __attribute__ ((unused,unused,unused)) int (*__anonymous_object19)());326 int __apd5__Fi_PFi_i_PFi_i___1(__attribute__ ((unused,unused,unused)) int (*__anonymous_object 20)(__attribute__ ((unused)) int __anonymous_object21), __attribute__ ((unused,unused,unused)) int (*__anonymous_object22)(__attribute__ ((unused)) int __anonymous_object23));327 int __apd6__Fi_PFi__PFi____1(__attribute__ ((unused,unused,unused)) int (*__anonymous_object2 4)(), __attribute__ ((unused,unused,unused)) int (*__anonymous_object25)());328 int __apd7__Fi_PFi_i_PFi_i___1(__attribute__ ((unused,unused,unused)) int (*__anonymous_object2 6)(__attribute__ ((unused)) int __anonymous_object27), __attribute__ ((unused,unused,unused)) int (*__anonymous_object28)(__attribute__ ((unused)) int __anonymous_object29));316 int __apd1__Fi_PiPi__1(__attribute__ ((unused,unused,unused)) int *__anonymous_object10, __attribute__ ((unused,unused,unused)) int *__anonymous_object11); 317 int __apd2__Fi_PPiPPi__1(__attribute__ ((unused,unused,unused,unused)) int **__anonymous_object12, __attribute__ ((unused,unused,unused,unused)) int **__anonymous_object13); 318 int __apd3__Fi_PiPi__1(__attribute__ ((unused,unused,unused)) int *__anonymous_object14, __attribute__ ((unused,unused,unused)) int *__anonymous_object15); 319 int __apd4__Fi_PFi__PFi____1(__attribute__ ((unused,unused,unused)) int (*__anonymous_object16)(), __attribute__ ((unused,unused,unused)) int (*__anonymous_object17)()); 320 int __apd5__Fi_PFi_i_PFi_i___1(__attribute__ ((unused,unused,unused)) int (*__anonymous_object18)(__attribute__ ((unused)) int __anonymous_object19), __attribute__ ((unused,unused,unused)) int (*__anonymous_object20)(__attribute__ ((unused)) int __anonymous_object21)); 321 int __apd6__Fi_PFi__PFi____1(__attribute__ ((unused,unused,unused)) int (*__anonymous_object22)(), __attribute__ ((unused,unused,unused)) int (*__anonymous_object23)()); 322 int __apd7__Fi_PFi_i_PFi_i___1(__attribute__ ((unused,unused,unused)) int (*__anonymous_object24)(__attribute__ ((unused)) int __anonymous_object25), __attribute__ ((unused,unused,unused)) int (*__anonymous_object26)(__attribute__ ((unused)) int __anonymous_object27)); 329 323 struct Vad { 330 __attribute__ ((unused)) int __anonymous_object 30;331 __attribute__ ((unused,unused)) int *__anonymous_object 31;332 __attribute__ ((unused,unused)) int __anonymous_object3 2[((long unsigned int )10)];333 __attribute__ ((unused,unused)) int (*__anonymous_object3 3)();324 __attribute__ ((unused)) int __anonymous_object28; 325 __attribute__ ((unused,unused)) int *__anonymous_object29; 326 __attribute__ ((unused,unused)) int __anonymous_object30[((long unsigned int )10)]; 327 __attribute__ ((unused,unused)) int (*__anonymous_object31)(); 334 328 }; 335 329 static inline void ___constructor__F_P4sVad_autogen___1(struct Vad *___dst__P4sVad_1); -
TabularUnified src/tests/.expect/castError.txt ¶
r12d3187 r2055098 39 39 40 40 41 make: *** [castError] Error 1 -
TabularUnified src/tests/.expect/completeTypeError.txt ¶
r12d3187 r2055098 41 41 42 42 43 make: *** [completeTypeError] Error 1 -
TabularUnified src/tests/.expect/constant0-1DP.txt ¶
r12d3187 r2055098 31 31 constant0-1.c:50 error: duplicate object definition for x: const pointer to pointer to signed int 32 32 constant0-1.c:50 error: duplicate object definition for 0: pointer to pointer to signed int 33 make: *** [constant0-1DP] Error 1 -
TabularUnified src/tests/.expect/constant0-1NDDP.txt ¶
r12d3187 r2055098 15 15 constant0-1.c:67 error: duplicate object definition for x: const pointer to signed int 16 16 constant0-1.c:67 error: duplicate object definition for 0: const pointer to signed int 17 make: *** [constant0-1NDDP] Error 1 -
TabularUnified src/tests/.expect/declarationErrors.txt ¶
r12d3187 r2055098 67 67 68 68 69 make: *** [declarationErrors] Error 1 -
TabularUnified src/tests/.expect/dtor-early-exit-ERR1.txt ¶
r12d3187 r2055098 1 1 dtor-early-exit.c:142 error: jump to label 'L1' crosses initialization of y Branch (Goto) 2 3 make: *** [dtor-early-exit-ERR1] Error 1 -
TabularUnified src/tests/.expect/dtor-early-exit-ERR2.txt ¶
r12d3187 r2055098 1 1 dtor-early-exit.c:142 error: jump to label 'L2' crosses initialization of y Branch (Goto) 2 3 make: *** [dtor-early-exit-ERR2] Error 1 -
TabularUnified src/tests/.expect/memberCtors-ERR1.txt ¶
r12d3187 r2055098 1 1 memberCtors.c:62 error: in void ?{}(B *b), field a2 used before being constructed 2 make: *** [memberCtors-ERR1] Error 1 -
TabularUnified src/tests/.expect/scopeErrors.txt ¶
r12d3187 r2055098 7 7 with body 8 8 CompoundStmt 9 10 make: *** [scopeErrors] Error 1 -
TabularUnified src/tests/.gitignore ¶
r12d3187 r2055098 1 1 .out/ 2 .err/ -
TabularUnified src/tests/Makefile.am ¶
r12d3187 r2055098 22 22 concurrent=yes 23 23 quick_test+= coroutine thread monitor 24 concurrent_test=coroutine thread monitor multi-monitor sched-int sched-int-multi sched-int-multi2 sched-ext sched-ext-multi preempt 24 25 else 25 26 concurrent=no 27 concurrent_test= 26 28 endif 27 28 29 29 30 # applies to both programs 30 31 EXTRA_FLAGS = 31 CFLAGS = -g -Wall -Wno-unused-function @CFA_FLAGS@ ${EXTRA_FLAGS} 32 BUILD_FLAGS = -g -Wall -Wno-unused-function @CFA_FLAGS@ ${EXTRA_FLAGS} 33 TEST_FLAGS = $(if $(test), 2> .err/${@}.log, ) 34 CFLAGS = ${TEST_FLAGS} ${BUILD_FLAGS} 32 35 CC = @CFA_BINDIR@/@CFA_NAME@ 33 36 … … 51 54 @+python test.py --list --concurrent=${concurrent} 52 55 56 concurrency : 57 @+python test.py --debug=${debug} --concurrent=${concurrent} ${concurrent_test} 58 53 59 .dummy : .dummy.c 54 ${CC} ${ CFLAGS} -XCFA -n ${<} -o ${@}60 ${CC} ${BUILD_FLAGS} -XCFA -n ${<} -o ${@} #don't use CFLAGS, this rule is not a real test 55 61 56 62 constant0-1DP : constant0-1.c -
TabularUnified src/tests/Makefile.in ¶
r12d3187 r2055098 125 125 CFA_NAME = @CFA_NAME@ 126 126 CFA_PREFIX = @CFA_PREFIX@ 127 CFLAGS = -g -Wall -Wno-unused-function @CFA_FLAGS@ ${EXTRA_FLAGS}127 CFLAGS = ${TEST_FLAGS} ${BUILD_FLAGS} 128 128 CPP = @CPP@ 129 129 CPPFLAGS = @CPPFLAGS@ … … 229 229 @BUILD_CONCURRENCY_FALSE@concurrent = no 230 230 @BUILD_CONCURRENCY_TRUE@concurrent = yes 231 @BUILD_CONCURRENCY_FALSE@concurrent_test = 232 @BUILD_CONCURRENCY_TRUE@concurrent_test = coroutine thread monitor multi-monitor sched-int sched-int-multi sched-int-multi2 sched-ext sched-ext-multi preempt 231 233 232 234 # applies to both programs 233 235 EXTRA_FLAGS = 236 BUILD_FLAGS = -g -Wall -Wno-unused-function @CFA_FLAGS@ ${EXTRA_FLAGS} 237 TEST_FLAGS = $(if $(test), 2> .err/${@}.log, ) 234 238 fstream_test_SOURCES = fstream_test.c 235 239 vector_test_SOURCES = vector/vector_int.c vector/array.c vector/vector_test.c … … 669 673 @+python test.py --list --concurrent=${concurrent} 670 674 675 concurrency : 676 @+python test.py --debug=${debug} --concurrent=${concurrent} ${concurrent_test} 677 671 678 .dummy : .dummy.c 672 ${CC} ${ CFLAGS} -XCFA -n ${<} -o ${@}679 ${CC} ${BUILD_FLAGS} -XCFA -n ${<} -o ${@} #don't use CFLAGS, this rule is not a real test 673 680 674 681 constant0-1DP : constant0-1.c -
TabularUnified src/tests/attributes.c ¶
r12d3187 r2055098 68 68 __attribute__(( unused )) int (* __attribute__(( unused )) f4())(int) __attribute__(( used )); 69 69 __attribute__(( unused )) int (* __attribute__(( unused )) f4())(int) {} 70 71 #ifdef __CFA__72 extern "C" {73 #endif // __CFA__74 typedef long int ptrdiff_t;75 typedef long unsigned int size_t;76 extern void *malloc (size_t __size) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) ;77 extern void free (void *__ptr) __attribute__ ((__nothrow__ , __leaf__));78 extern void abort (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__));79 extern int atexit0 (void (*__func) (void), void *, void *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));80 extern void exit (int __status) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__));81 extern int printf (__const char *__restrict __format, ...) __attribute__ ((format (printf, 1, 2)));82 #ifdef __CFA__83 }84 #endif // __CFA__85 70 86 71 -
TabularUnified src/tests/rational.c ¶
r12d3187 r2055098 10 10 // Created On : Mon Mar 28 08:43:12 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : T ue Jul 5 18:29:37 201613 // Update Count : 2512 // Last Modified On : Thu Apr 27 17:05:19 2017 13 // Update Count : 40 14 14 // 15 15 … … 36 36 b = (Rational){ -3, 2 }; 37 37 sout | a | b | endl; 38 sout | a == 1 | endl; 38 // sout | a == 1 | endl; // FIX ME 39 39 sout | a != b | endl; 40 40 sout | a < b | endl; … … 61 61 sout | narrow( 3.14159265358979, 256 ) | endl; 62 62 63 sout | "decompose" | endl; 64 RationalImpl n, d; 65 [n, d] = a; 66 sout | a | n | d | endl; 67 68 sout | "more tests" | endl; 63 69 Rational x = { 1, 2 }, y = { 2 }; 64 70 sout | x - y | endl; -
TabularUnified src/tests/sched-int.c ¶
r12d3187 r2055098 1 #include <fstream> 1 2 #include <kernel> 2 3 #include <monitor> … … 15 16 16 17 void step1( global_t * mutex this ) { 18 sout | "Step 1" | endl; 17 19 this->value = 1; 18 20 wait( &cond ); … … 22 24 if( this->value != 1) abort(); 23 25 26 sout | "Step 2" | endl; 24 27 this->value = 2; 25 28 signal( &cond ); … … 29 32 if( this->value != 2) abort(); 30 33 31 this->value = 2; 34 sout | "Step 3" | endl; 35 this->value = 3; 32 36 signal( &cond ); 33 37 } -
TabularUnified src/tests/test.py ¶
r12d3187 r2055098 6 6 from os import listdir, environ 7 7 from os.path import isfile, join, splitext 8 from subprocess import Popen, PIPE, STDOUT8 from pybin.tools import * 9 9 10 10 import argparse 11 import multiprocessing 11 12 import os 12 13 import re 13 import s tat14 import signal 14 15 import sys 15 16 … … 26 27 def getMachineType(): 27 28 sh('echo "void ?{}(int*a,int b){}int main(){return 0;}" > .dummy.c') 28 sh("make .dummy", print2stdout=False) 29 ret, out = sh("make .dummy -s", print2stdout=True) 30 31 if ret != 0: 32 print("Failed to identify architecture:") 33 print(out) 34 print("Stopping") 35 rm( (".dummy.c",".dummy") ) 36 sys.exit(1) 37 29 38 _, out = sh("file .dummy", print2stdout=False) 30 sh("rm -f .dummy.c > /dev/null 2>&1")31 sh("rm -f .dummy > /dev/null 2>&1") 39 rm( (".dummy.c",".dummy") ) 40 32 41 return re.search("ELF\s([0-9]+)-bit", out).group(1) 33 42 … … 58 67 return generic_list + typed_list + concurrent_list; 59 68 60 # helper functions to run terminal commands 61 def sh(cmd, dry_run = False, print2stdout = True): 62 if dry_run : # if this is a dry_run, only print the commands that would be ran 63 print("cmd: %s" % cmd) 64 return 0, None 65 else : # otherwise create a pipe and run the desired command 66 proc = Popen(cmd, stdout=None if print2stdout else PIPE, stderr=STDOUT, shell=True) 67 out, err = proc.communicate() 68 return proc.returncode, out 69 70 # helper function to replace patterns in a file 71 def file_replace(fname, pat, s_after): 72 # first, see if the pattern is even in the file. 73 with open(fname) as f: 74 if not any(re.search(pat, line) for line in f): 75 return # pattern does not occur in file so we are done. 76 77 # pattern is in the file, so perform replace operation. 78 with open(fname) as f: 79 out_fname = fname + ".tmp" 80 out = open(out_fname, "w") 81 for line in f: 82 out.write(re.sub(pat, s_after, line)) 83 out.close() 84 os.rename(out_fname, fname) 85 86 # tests output may differ depending on the depth of the makefile 87 def fix_MakeLevel(file) : 88 if environ.get('MAKELEVEL') : 89 file_replace(file, "make\[%i\]" % int(environ.get('MAKELEVEL')), 'make' ) 90 91 # helper function to check if a files contains only a spacific string 92 def fileContainsOnly(file, text) : 93 with open(file) as f: 94 ff = f.read().strip() 95 result = ff == text.strip() 96 97 return result; 98 99 # check whether or not a file is executable 100 def fileIsExecutable(file) : 101 try : 102 fileinfo = os.stat(file) 103 return bool(fileinfo.st_mode & stat.S_IXUSR) 104 except Exception as inst: 105 print(type(inst)) # the exception instance 106 print(inst.args) # arguments stored in .args 107 print(inst) 108 return False 69 # from the found tests, filter all the valid tests/desired tests 70 def validTests( options ): 71 tests = [] 72 73 # if we are regenerating the tests we need to find the information of the 74 # already existing tests and create new info for the new tests 75 if options.regenerate_expected : 76 for testname in options.tests : 77 if testname.endswith( (".c", ".cc", ".cpp") ): 78 print('ERROR: "%s", tests are not allowed to end with a C/C++/CFA extension, ignoring it' % testname, file=sys.stderr) 79 else : 80 found = [test for test in allTests if test.name == testname] 81 tests.append( found[0] if len(found) == 1 else Test(testname, testname) ) 82 83 else : 84 # otherwise we only need to validate that all tests are present in the complete list 85 for testname in options.tests: 86 test = [t for t in allTests if t.name == testname] 87 88 if len(test) != 0 : 89 tests.append( test[0] ) 90 else : 91 print('ERROR: No expected file for test %s, ignoring it' % testname, file=sys.stderr) 92 93 # make sure we have at least some test to run 94 if len(tests) == 0 : 95 print('ERROR: No valid test to run', file=sys.stderr) 96 sys.exit(1) 97 98 return tests 99 100 # parses the option 101 def getOptions(): 102 # create a parser with the arguments for the tests script 103 parser = argparse.ArgumentParser(description='Script which runs cforall tests') 104 parser.add_argument('--debug', help='Run all tests in debug or release', type=yes_no, default='no') 105 parser.add_argument('--concurrent', help='Run concurrent tests', type=yes_no, default='yes') 106 parser.add_argument('--dry-run', help='Don\'t run the tests, only output the commands', action='store_true') 107 parser.add_argument('--list', help='List all test available', action='store_true') 108 parser.add_argument('--all', help='Run all test available', action='store_true') 109 parser.add_argument('--regenerate-expected', help='Regenerate the .expect by running the specified tets, can be used with --all option', action='store_true') 110 parser.add_argument('-j', '--jobs', help='Number of tests to run simultaneously', type=int, default='8') 111 parser.add_argument('--list-comp', help='List all valide arguments', action='store_true') 112 parser.add_argument('tests', metavar='test', type=str, nargs='*', help='a list of tests to run') 113 114 options = parser.parse_args() 115 116 # script must have at least some tests to run or be listing 117 listing = options.list or options.list_comp 118 all_tests = options.all 119 some_tests = len(options.tests) > 0 120 121 # check that exactly one of the booleans is set to true 122 if not sum( (listing, all_tests, some_tests) ) == 1 : 123 print('ERROR: must have option \'--all\', \'--list\' or non-empty test list', file=sys.stderr) 124 parser.print_help() 125 sys.exit(1) 126 127 return options 128 129 def jobCount( options ): 130 # check if the user already passed in a number of jobs for multi-threading 131 make_flags = environ.get('MAKEFLAGS') 132 make_jobs_fds = re.search("--jobserver-(auth|fds)=\s*([0-9]+),([0-9]+)", make_flags) if make_flags else None 133 if make_jobs_fds : 134 tokens = os.read(int(make_jobs_fds.group(2)), 1024) 135 options.jobs = len(tokens) 136 os.write(int(make_jobs_fds.group(3)), tokens) 137 else : 138 options.jobs = multiprocessing.cpu_count() 139 140 # make sure we have a valid number of jobs that corresponds to user input 141 if options.jobs <= 0 : 142 print('ERROR: Invalid number of jobs', file=sys.stderr) 143 sys.exit(1) 144 145 return min( options.jobs, len(tests) ), True if make_flags else False 109 146 110 147 ################################################################################ 111 148 # running test functions 112 149 ################################################################################ 150 # logic to run a single test and return the result (No handling of printing or other test framework logic) 113 151 def run_single_test(test, generate, dry_run, debug): 114 152 115 153 # find the output file based on the test name and options flag 116 154 out_file = (".out/%s.log" % test.name) if not generate else (".expect/%s.txt" % test.path) 155 err_file = ".err/%s.log" % test.name 117 156 118 157 # remove any outputs from the previous tests to prevent side effects 119 sh("rm -f %s" % out_file, dry_run) 120 sh("rm -f %s > /dev/null 2>&1" % test.name, dry_run) 121 122 options = "-debug" if debug else "-nodebug"; 158 rm( (out_file, test.name), dry_run ) 159 160 options = "-debug" if debug else "-nodebug" 123 161 124 162 # build, skipping to next test on error 125 make_ret, _ = sh("""%s EXTRA_FLAGS="-quiet %s" %s 2> %s 1> /dev/null""" % (make_cmd, options, test.name, out_file), dry_run)163 make_ret, _ = sh("""%s test=yes EXTRA_FLAGS="-quiet %s" %s 2> %s 1> /dev/null""" % (make_cmd, options, test.name, out_file), dry_run) 126 164 127 165 # if the make command succeds continue otherwise skip to diff … … 137 175 sh("cat %s > %s" % (test.name, out_file), dry_run) 138 176 177 else : 178 # command failed save the log to less temporary file 179 sh("mv %s %s" % (err_file, out_file), dry_run) 180 139 181 retcode = 0 140 182 error = None 141 142 # fix output to prevent make depth to cause issues143 fix_MakeLevel(out_file)144 183 145 184 if generate : … … 151 190 152 191 else : 153 # diff the output of the files154 diff_cmd = ("diff --old-group-format='\t\tmissing lines :\n"155 "%%<' \\\n"156 "--new-group-format='\t\tnew lines :\n"157 "%%>' \\\n"158 "--unchanged-group-format='%%=' \\"159 "--changed-group-format='\t\texpected :\n"160 "%%<\n"161 "\t\tgot :\n"162 "%%>' \\\n"163 "--new-line-format='\t\t%%dn\t%%L' \\\n"164 "--old-line-format='\t\t%%dn\t%%L' \\\n"165 "--unchanged-line-format='' \\\n"166 ".expect/%s.txt .out/%s.log")167 168 192 # fetch return code and error from the diff command 169 retcode, error = sh(diff_cmd % (test.path, test.name), dry_run, False)170 193 retcode, error = diff(".expect/%s.txt" % test.path, ".out/%s.log" % test.name, dry_run) 194 171 195 # clean the executable 172 196 sh("rm -f %s > /dev/null 2>&1" % test.name, dry_run) … … 174 198 return retcode, error 175 199 176 def run_test_instance(t, generate, dry_run, debug) : 177 try:178 # print formated name 179 name_txt = "%20s " % t.name180 181 #run the test instance and collect the result182 test_failed, error = run_single_test(t, generate, dry_run, debug) 183 184 # update output based on current action185 if generate : 186 failed_txt = "ERROR"187 success_txt = "Done"188 else :189 failed_txt = "FAILED"190 success_txt = "PASSED"191 192 #print result with error if needed193 text = name_txt + (failed_txt if test_failed else success_txt) 194 out = sys.stdout195 if error :196 text = text + "\n" + error197 out = sys.stderr198 199 print(text, file = out);200 sys.stdout.flush() 201 sys.stderr.flush()202 return test_failed203 204 except KeyboardInterrupt:205 test_failed = True 206 200 # run a single test and handle the errors, outputs, printing, exception handling, etc. 201 def run_test_worker(t, generate, dry_run, debug) : 202 203 signal.signal(signal.SIGINT, signal.SIG_DFL) 204 # print formated name 205 name_txt = "%20s " % t.name 206 207 #run the test instance and collect the result 208 test_failed, error = run_single_test(t, generate, dry_run, debug) 209 210 # update output based on current action 211 if generate : 212 failed_txt = "ERROR" 213 success_txt = "Done" 214 else : 215 failed_txt = "FAILED" 216 success_txt = "PASSED" 217 218 #print result with error if needed 219 text = name_txt + (failed_txt if test_failed else success_txt) 220 out = sys.stdout 221 if error : 222 text = text + "\n" + error 223 out = sys.stderr 224 225 print(text, file = out); 226 sys.stdout.flush() 227 sys.stderr.flush() 228 signal.signal(signal.SIGINT, signal.SIG_IGN) 229 230 return test_failed 207 231 208 232 # run the given list of tests with the given parameters … … 211 235 sh("%s clean > /dev/null 2>&1" % make_cmd, dry_run) 212 236 213 # make sure the required folder are present214 sh('mkdir -p .out .expect ', dry_run)237 # make sure the required folder are present 238 sh('mkdir -p .out .expect .err', dry_run) 215 239 216 240 if generate : 217 241 print( "Regenerate tests for: " ) 218 242 243 # create the executor for our jobs and handle the signal properly 244 original_sigint_handler = signal.signal(signal.SIGINT, signal.SIG_IGN) 245 pool = Pool(jobs) 246 signal.signal(signal.SIGINT, original_sigint_handler) 247 219 248 # for each test to run 220 pool = Pool(jobs)221 249 try : 222 results = pool.map_async(partial(run_test_ instance, generate=generate, dry_run=dry_run, debug=debug), tests ).get(9999)250 results = pool.map_async(partial(run_test_worker, generate=generate, dry_run=dry_run, debug=debug), tests ).get(3600) 223 251 except KeyboardInterrupt: 224 252 pool.terminate() … … 226 254 sys.exit(1) 227 255 228 # clean the workspace256 # clean the workspace 229 257 sh("%s clean > /dev/null 2>&1" % make_cmd, dry_run) 230 258 … … 235 263 return 0 236 264 237 def yes_no(string):238 if string == "yes" :239 return True240 if string == "no" :241 return False242 raise argparse.ArgumentTypeError(msg)243 return False244 245 265 246 266 ################################################################################ 247 267 # main loop 248 268 ################################################################################ 249 # create a parser with the arguments for the tests script 250 parser = argparse.ArgumentParser(description='Script which runs cforall tests') 251 parser.add_argument('--debug', help='Run all tests in debug or release', type=yes_no, default='no') 252 parser.add_argument('--concurrent', help='Run concurrent tests', type=yes_no, default='yes') 253 parser.add_argument('--dry-run', help='Don\'t run the tests, only output the commands', action='store_true') 254 parser.add_argument('--list', help='List all test available', action='store_true') 255 parser.add_argument('--all', help='Run all test available', action='store_true') 256 parser.add_argument('--regenerate-expected', help='Regenerate the .expect by running the specified tets, can be used with --all option', action='store_true') 257 parser.add_argument('-j', '--jobs', help='Number of tests to run simultaneously', type=int, default='8') 258 parser.add_argument('tests', metavar='test', type=str, nargs='*', help='a list of tests to run') 259 260 # parse the command line arguments 261 options = parser.parse_args() 262 263 # script must have at least some tests to run 264 if (len(options.tests) > 0 and options.all and not options.list) \ 265 or (len(options.tests) == 0 and not options.all and not options.list) : 266 print('ERROR: must have option \'--all\' or non-empty test list', file=sys.stderr) 267 parser.print_help() 268 sys.exit(1) 269 270 # fetch the liest of all valid tests 271 allTests = listTests( options.concurrent ) 272 273 # if user wants all tests than no other treatement of the test list is required 274 if options.all or options.list : 275 tests = allTests 276 277 else : 278 #otherwise we need to validate that the test list that was entered is valid 279 tests = [] 280 281 # if we are regenerating the tests we need to find the information of the 282 # already existing tests and create new info for the new tests 283 if options.regenerate_expected : 284 for testname in options.tests : 285 if testname.endswith(".c") or testname.endswith(".cc") or testname.endswith(".cpp") : 286 print('ERROR: "%s", tests are not allowed to end with a C/C++/CFA extension, ignoring it' % testname, file=sys.stderr) 287 else : 288 found = [test for test in allTests if test.name == testname] 289 tests.append( found[0] if len(found) == 1 else Test(testname, testname) ) 290 291 else : 292 # otherwise we only need to validate that all tests are present in the complete list 293 for testname in options.tests: 294 test = [t for t in allTests if t.name == testname] 295 296 if len(test) != 0 : 297 tests.append( test[0] ) 298 else : 299 print('ERROR: No expected file for test %s, ignoring it' % testname, file=sys.stderr) 300 301 # make sure we have at least some test to run 302 if len(tests) == 0 : 303 print('ERROR: No valid test to run', file=sys.stderr) 304 sys.exit(1) 305 306 # sort the test alphabetically for convenience 307 tests.sort(key=lambda t: t.name) 308 309 # check if the user already passed in a number of jobs for multi-threading 310 make_flags = environ.get('MAKEFLAGS') 311 make_jobs_fds = re.search("--jobserver-fds=\s*([0-9]+),([0-9]+)", make_flags) if make_flags else None 312 if make_jobs_fds : 313 tokens = os.read(int(make_jobs_fds.group(1)), 1024) 314 options.jobs = len(tokens) 315 os.write(int(make_jobs_fds.group(2)), tokens) 316 317 # make sure we have a valid number of jobs that corresponds to user input 318 if options.jobs <= 0 : 319 print('ERROR: Invalid number of jobs', file=sys.stderr) 320 sys.exit(1) 321 322 print('Running (%s) on %i cores' % ("debug" if options.debug else "no debug", options.jobs)) 323 make_cmd = "make" if make_flags else ("make -j%i" % options.jobs) 324 325 # users may want to simply list the tests 326 if options.list : 327 print("\n".join(map(lambda t: "%s (%s)" % (t.name, t.path), tests))) 328 329 else : 330 # otherwise run all tests and make sure to return the correct error code 331 sys.exit( run_tests(tests, options.regenerate_expected, options.dry_run, options.jobs, options.debug) ) 269 if __name__ == "__main__": 270 #always run from same folder 271 chdir() 272 273 # parse the command line arguments 274 options = getOptions() 275 276 # fetch the liest of all valid tests 277 allTests = listTests( options.concurrent ) 278 279 # if user wants all tests than no other treatement of the test list is required 280 if options.all or options.list or options.list_comp : 281 tests = allTests 282 283 else : 284 #otherwise we need to validate that the test list that was entered is valid 285 tests = validTests( options ) 286 287 # sort the test alphabetically for convenience 288 tests.sort(key=lambda t: t.name) 289 290 # users may want to simply list the tests 291 if options.list_comp : 292 print("-h --help --debug --concurrent --dry-run --list --all --regenerate-expected -j --jobs ", end='') 293 print(" ".join(map(lambda t: "%s" % (t.name), tests))) 294 295 elif options.list : 296 print("\n".join(map(lambda t: "%s (%s)" % (t.name, t.path), tests))) 297 298 else : 299 options.jobs, forceJobs = jobCount( options ) 300 301 print('Running (%s) on %i cores' % ("debug" if options.debug else "no debug", options.jobs)) 302 make_cmd = "make" if forceJobs else ("make -j%i" % options.jobs) 303 304 # otherwise run all tests and make sure to return the correct error code 305 sys.exit( run_tests(tests, options.regenerate_expected, options.dry_run, options.jobs, options.debug) )
Note: See TracChangeset
for help on using the changeset viewer.