| 208 | } |
| 209 | |
| 210 | void |
| 211 | StatementArrayOp::output_header(std::ostream& out, int& indent) const |
| 212 | { |
| 213 | size_t i; |
| 214 | for (i=0; i<array_var->get_dimension(); i++) { |
| 215 | if (i > 0) { |
| 216 | output_tab(out, indent); |
| 217 | out << "{"; |
| 218 | outputln(out); |
| 219 | indent++; |
| 220 | } |
| 221 | output_tab(out, indent); |
| 222 | out << "for ("; |
| 223 | ctrl_vars[i]->Output(out); |
| 224 | out << " = " << inits[i] << "; "; |
| 225 | ctrl_vars[i]->Output(out); |
| 226 | (incrs[i] > 0) ? out << " < " << array_var->get_sizes()[i] : out << " >= 0"; |
| 227 | out << "; "; |
| 228 | ctrl_vars[i]->Output(out); |
| 229 | if (CGOptions::ccomp()) { |
| 230 | // ccomp disable something like g += 1, where g is volatile |
| 231 | out << " = "; |
| 232 | ctrl_vars[i]->Output(out); |
| 233 | out << " + " << incrs[i] << ")"; |
| 234 | } |
| 235 | else { |
| 236 | out << " += " << incrs[i] << ")"; |
| 237 | } |
| 238 | outputln(out); |
| 239 | } |
| 240 | } |
| 241 | |
| 242 | /* |
| 243 | * |
nothing calls this directly
no test coverage detected