00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033 #include "proj.h"
00034 #include "rtl.h"
00035 #include "toplev.h"
00036 #include "ggc.h"
00037 #include "ste.h"
00038 #include "bld.h"
00039 #include "com.h"
00040 #include "expr.h"
00041 #include "lab.h"
00042 #include "lex.h"
00043 #include "sta.h"
00044 #include "stp.h"
00045 #include "str.h"
00046 #include "sts.h"
00047 #include "stt.h"
00048 #include "stv.h"
00049 #include "stw.h"
00050 #include "symbol.h"
00051
00052
00053
00054
00055
00056
00057 typedef enum
00058 {
00059 FFESTE_stateletSIMPLE_,
00060 FFESTE_stateletATTRIB_,
00061 FFESTE_stateletITEM_,
00062 FFESTE_stateletITEMVALS_,
00063 FFESTE_
00064 } ffesteStatelet_;
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077 static ffesteStatelet_ ffeste_statelet_ = FFESTE_stateletSIMPLE_;
00078 static ffelab ffeste_label_formatdef_ = NULL;
00079 static tree (*ffeste_io_driver_) (ffebld expr);
00080 static ffecomGfrt ffeste_io_endgfrt_;
00081 static tree ffeste_io_abort_;
00082 static bool ffeste_io_abort_is_temp_;
00083 static tree ffeste_io_end_;
00084 static tree ffeste_io_err_;
00085 static tree ffeste_io_iostat_;
00086 static bool ffeste_io_iostat_is_temp_;
00087
00088
00089
00090 static void ffeste_begin_iterdo_ (ffestw block, tree *tvar, tree *tincr,
00091 tree *xitersvar, ffebld var,
00092 ffebld start, ffelexToken start_token,
00093 ffebld end, ffelexToken end_token,
00094 ffebld incr, ffelexToken incr_token,
00095 const char *msg);
00096 static void ffeste_end_iterdo_ (ffestw block, tree tvar, tree tincr,
00097 tree itersvar);
00098 static void ffeste_io_call_ (tree call, bool do_check);
00099 static void ffeste_io_impdo_ (ffebld impdo, ffelexToken impdo_token);
00100 static tree ffeste_io_dofio_ (ffebld expr);
00101 static tree ffeste_io_dolio_ (ffebld expr);
00102 static tree ffeste_io_douio_ (ffebld expr);
00103 static tree ffeste_io_ialist_ (bool have_err, ffestvUnit unit,
00104 ffebld unit_expr, int unit_dflt);
00105 static tree ffeste_io_cilist_ (bool have_err, ffestvUnit unit,
00106 ffebld unit_expr, int unit_dflt,
00107 bool have_end, ffestvFormat format,
00108 ffestpFile *format_spec, bool rec,
00109 ffebld rec_expr);
00110 static tree ffeste_io_cllist_ (bool have_err, ffebld unit_expr,
00111 ffestpFile *stat_spec);
00112 static tree ffeste_io_icilist_ (bool have_err, ffebld unit_expr,
00113 bool have_end, ffestvFormat format,
00114 ffestpFile *format_spec);
00115 static tree ffeste_io_inlist_ (bool have_err,
00116 ffestpFile *unit_spec,
00117 ffestpFile *file_spec,
00118 ffestpFile *exist_spec,
00119 ffestpFile *open_spec,
00120 ffestpFile *number_spec,
00121 ffestpFile *named_spec,
00122 ffestpFile *name_spec,
00123 ffestpFile *access_spec,
00124 ffestpFile *sequential_spec,
00125 ffestpFile *direct_spec,
00126 ffestpFile *form_spec,
00127 ffestpFile *formatted_spec,
00128 ffestpFile *unformatted_spec,
00129 ffestpFile *recl_spec,
00130 ffestpFile *nextrec_spec,
00131 ffestpFile *blank_spec);
00132 static tree ffeste_io_olist_ (bool have_err, ffebld unit_expr,
00133 ffestpFile *file_spec,
00134 ffestpFile *stat_spec,
00135 ffestpFile *access_spec,
00136 ffestpFile *form_spec,
00137 ffestpFile *recl_spec,
00138 ffestpFile *blank_spec);
00139 static void ffeste_subr_beru_ (ffestpBeruStmt *info, ffecomGfrt rt);
00140
00141
00142
00143 #define ffeste_emit_line_note_() \
00144 emit_line_note (input_filename, lineno)
00145 #define ffeste_check_simple_() \
00146 assert(ffeste_statelet_ == FFESTE_stateletSIMPLE_)
00147 #define ffeste_check_start_() \
00148 assert(ffeste_statelet_ == FFESTE_stateletSIMPLE_); \
00149 ffeste_statelet_ = FFESTE_stateletATTRIB_
00150 #define ffeste_check_attrib_() \
00151 assert(ffeste_statelet_ == FFESTE_stateletATTRIB_)
00152 #define ffeste_check_item_() \
00153 assert(ffeste_statelet_ == FFESTE_stateletATTRIB_ \
00154 || ffeste_statelet_ == FFESTE_stateletITEM_); \
00155 ffeste_statelet_ = FFESTE_stateletITEM_
00156 #define ffeste_check_item_startvals_() \
00157 assert(ffeste_statelet_ == FFESTE_stateletATTRIB_ \
00158 || ffeste_statelet_ == FFESTE_stateletITEM_); \
00159 ffeste_statelet_ = FFESTE_stateletITEMVALS_
00160 #define ffeste_check_item_value_() \
00161 assert(ffeste_statelet_ == FFESTE_stateletITEMVALS_)
00162 #define ffeste_check_item_endvals_() \
00163 assert(ffeste_statelet_ == FFESTE_stateletITEMVALS_); \
00164 ffeste_statelet_ = FFESTE_stateletITEM_
00165 #define ffeste_check_finish_() \
00166 assert(ffeste_statelet_ == FFESTE_stateletATTRIB_ \
00167 || ffeste_statelet_ == FFESTE_stateletITEM_); \
00168 ffeste_statelet_ = FFESTE_stateletSIMPLE_
00169
00170 #define ffeste_f2c_init_charnolen_(Exp,Init,Spec) \
00171 do \
00172 { \
00173 if ((Spec)->kw_or_val_present) \
00174 Exp = ffecom_arg_ptr_to_const_expr ((Spec)->u.expr, &ignore); \
00175 else \
00176 Exp = null_pointer_node; \
00177 if (Exp) \
00178 Init = Exp; \
00179 else \
00180 { \
00181 Init = null_pointer_node; \
00182 constantp = FALSE; \
00183 } \
00184 } while(0)
00185
00186 #define ffeste_f2c_init_char_(Exp,Init,Lenexp,Leninit,Spec) \
00187 do \
00188 { \
00189 if ((Spec)->kw_or_val_present) \
00190 Exp = ffecom_arg_ptr_to_const_expr ((Spec)->u.expr, &Lenexp); \
00191 else \
00192 { \
00193 Exp = null_pointer_node; \
00194 Lenexp = ffecom_f2c_ftnlen_zero_node; \
00195 } \
00196 if (Exp) \
00197 Init = Exp; \
00198 else \
00199 { \
00200 Init = null_pointer_node; \
00201 constantp = FALSE; \
00202 } \
00203 if (Lenexp) \
00204 Leninit = Lenexp; \
00205 else \
00206 { \
00207 Leninit = ffecom_f2c_ftnlen_zero_node; \
00208 constantp = FALSE; \
00209 } \
00210 } while(0)
00211
00212 #define ffeste_f2c_init_flag_(Flag,Init) \
00213 do \
00214 { \
00215 Init = convert (ffecom_f2c_flag_type_node, \
00216 (Flag) ? integer_one_node : integer_zero_node); \
00217 } while(0)
00218
00219 #define ffeste_f2c_init_format_(Exp,Init,Spec) \
00220 do \
00221 { \
00222 Exp = ffecom_arg_ptr_to_const_expr ((Spec)->u.expr, NULL); \
00223 if (Exp) \
00224 Init = Exp; \
00225 else \
00226 { \
00227 Init = null_pointer_node; \
00228 constantp = FALSE; \
00229 } \
00230 } while(0)
00231
00232 #define ffeste_f2c_init_int_(Exp,Init,Spec) \
00233 do \
00234 { \
00235 if ((Spec)->kw_or_val_present) \
00236 Exp = ffecom_const_expr ((Spec)->u.expr); \
00237 else \
00238 Exp = ffecom_integer_zero_node; \
00239 if (Exp) \
00240 Init = Exp; \
00241 else \
00242 { \
00243 Init = ffecom_integer_zero_node; \
00244 constantp = FALSE; \
00245 } \
00246 } while(0)
00247
00248 #define ffeste_f2c_init_ptrtoint_(Exp,Init,Spec) \
00249 do \
00250 { \
00251 if ((Spec)->kw_or_val_present) \
00252 Exp = ffecom_ptr_to_const_expr ((Spec)->u.expr); \
00253 else \
00254 Exp = null_pointer_node; \
00255 if (Exp) \
00256 Init = Exp; \
00257 else \
00258 { \
00259 Init = null_pointer_node; \
00260 constantp = FALSE; \
00261 } \
00262 } while(0)
00263
00264 #define ffeste_f2c_init_next_(Init) \
00265 do \
00266 { \
00267 TREE_CHAIN (initn) = build_tree_list ((field = TREE_CHAIN (field)), \
00268 (Init)); \
00269 initn = TREE_CHAIN(initn); \
00270 } while(0)
00271
00272 #define ffeste_f2c_prepare_charnolen_(Spec,Exp) \
00273 do \
00274 { \
00275 if (! (Exp)) \
00276 ffecom_prepare_arg_ptr_to_expr ((Spec)->u.expr); \
00277 } while(0)
00278
00279 #define ffeste_f2c_prepare_char_(Spec,Exp) \
00280 do \
00281 { \
00282 if (! (Exp)) \
00283 ffecom_prepare_arg_ptr_to_expr ((Spec)->u.expr); \
00284 } while(0)
00285
00286 #define ffeste_f2c_prepare_format_(Spec,Exp) \
00287 do \
00288 { \
00289 if (! (Exp)) \
00290 ffecom_prepare_arg_ptr_to_expr ((Spec)->u.expr); \
00291 } while(0)
00292
00293 #define ffeste_f2c_prepare_int_(Spec,Exp) \
00294 do \
00295 { \
00296 if (! (Exp)) \
00297 ffecom_prepare_expr ((Spec)->u.expr); \
00298 } while(0)
00299
00300 #define ffeste_f2c_prepare_ptrtoint_(Spec,Exp) \
00301 do \
00302 { \
00303 if (! (Exp)) \
00304 ffecom_prepare_ptr_to_expr ((Spec)->u.expr); \
00305 } while(0)
00306
00307 #define ffeste_f2c_compile_(Field,Exp) \
00308 do \
00309 { \
00310 tree exz; \
00311 if ((Exp)) \
00312 { \
00313 exz = ffecom_modify (void_type_node, \
00314 ffecom_2 (COMPONENT_REF, TREE_TYPE (Field), \
00315 t, (Field)), \
00316 (Exp)); \
00317 expand_expr_stmt (exz); \
00318 } \
00319 } while(0)
00320
00321 #define ffeste_f2c_compile_charnolen_(Field,Spec,Exp) \
00322 do \
00323 { \
00324 tree exq; \
00325 if (! (Exp)) \
00326 { \
00327 exq = ffecom_arg_ptr_to_expr ((Spec)->u.expr, &ignore); \
00328 ffeste_f2c_compile_ ((Field), exq); \
00329 } \
00330 } while(0)
00331
00332 #define ffeste_f2c_compile_char_(Field,Lenfield,Spec,Exp,Lenexp) \
00333 do \
00334 { \
00335 tree exq = (Exp); \
00336 tree lenexq = (Lenexp); \
00337 int need_exq = (! exq); \
00338 int need_lenexq = (! lenexq); \
00339 if (need_exq || need_lenexq) \
00340 { \
00341 exq = ffecom_arg_ptr_to_expr ((Spec)->u.expr, &lenexq); \
00342 if (need_exq) \
00343 ffeste_f2c_compile_ ((Field), exq); \
00344 if (need_lenexq) \
00345 ffeste_f2c_compile_ ((Lenfield), lenexq); \
00346 } \
00347 } while(0)
00348
00349 #define ffeste_f2c_compile_format_(Field,Spec,Exp) \
00350 do \
00351 { \
00352 tree exq; \
00353 if (! (Exp)) \
00354 { \
00355 exq = ffecom_arg_ptr_to_expr ((Spec)->u.expr, NULL); \
00356 ffeste_f2c_compile_ ((Field), exq); \
00357 } \
00358 } while(0)
00359
00360 #define ffeste_f2c_compile_int_(Field,Spec,Exp) \
00361 do \
00362 { \
00363 tree exq; \
00364 if (! (Exp)) \
00365 { \
00366 exq = ffecom_expr ((Spec)->u.expr); \
00367 ffeste_f2c_compile_ ((Field), exq); \
00368 } \
00369 } while(0)
00370
00371 #define ffeste_f2c_compile_ptrtoint_(Field,Spec,Exp) \
00372 do \
00373 { \
00374 tree exq; \
00375 if (! (Exp)) \
00376 { \
00377 exq = ffecom_ptr_to_expr ((Spec)->u.expr); \
00378 ffeste_f2c_compile_ ((Field), exq); \
00379 } \
00380 } while(0)
00381
00382
00383
00384 #ifdef ENABLE_CHECKING
00385
00386 typedef struct gbe_block
00387 {
00388 struct gbe_block *outer;
00389 ffestw block;
00390 int lineno;
00391 const char *input_filename;
00392 bool is_stmt;
00393 } *gbe_block;
00394
00395 gbe_block ffeste_top_block_ = NULL;
00396
00397 static void
00398 ffeste_start_block_ (ffestw block)
00399 {
00400 gbe_block b = xmalloc (sizeof (*b));
00401
00402 b->outer = ffeste_top_block_;
00403 b->block = block;
00404 b->lineno = lineno;
00405 b->input_filename = input_filename;
00406 b->is_stmt = FALSE;
00407
00408 ffeste_top_block_ = b;
00409
00410 ffecom_start_compstmt ();
00411 }
00412
00413
00414
00415 static void
00416 ffeste_end_block_ (ffestw block)
00417 {
00418 gbe_block b = ffeste_top_block_;
00419
00420 assert (b);
00421 assert (! b->is_stmt);
00422 assert (b->block == block);
00423 assert (! b->is_stmt);
00424
00425 ffeste_top_block_ = b->outer;
00426
00427 free (b);
00428
00429 ffecom_end_compstmt ();
00430 }
00431
00432
00433
00434
00435
00436
00437
00438
00439 static void
00440 ffeste_start_stmt_(void)
00441 {
00442 gbe_block b = xmalloc (sizeof (*b));
00443
00444 b->outer = ffeste_top_block_;
00445 b->block = NULL;
00446 b->lineno = lineno;
00447 b->input_filename = input_filename;
00448 b->is_stmt = TRUE;
00449
00450 ffeste_top_block_ = b;
00451
00452 ffecom_start_compstmt ();
00453 }
00454
00455
00456
00457 static void
00458 ffeste_end_stmt_(void)
00459 {
00460 gbe_block b = ffeste_top_block_;
00461
00462 assert (b);
00463 assert (b->is_stmt);
00464
00465 ffeste_top_block_ = b->outer;
00466
00467 free (b);
00468
00469 ffecom_end_compstmt ();
00470 }
00471
00472 #else
00473
00474 #define ffeste_start_block_(b) ffecom_start_compstmt ()
00475 #define ffeste_end_block_(b) \
00476 do \
00477 { \
00478 ffecom_end_compstmt (); \
00479 } while(0)
00480 #define ffeste_start_stmt_() ffeste_start_block_(NULL)
00481 #define ffeste_end_stmt_() ffeste_end_block_(NULL)
00482
00483 #endif
00484
00485
00486
00487
00488 static void
00489 ffeste_begin_iterdo_ (ffestw block, tree *xtvar, tree *xtincr,
00490 tree *xitersvar, ffebld var,
00491 ffebld start, ffelexToken start_token,
00492 ffebld end, ffelexToken end_token,
00493 ffebld incr, ffelexToken incr_token,
00494 const char *msg)
00495 {
00496 tree tvar;
00497 tree expr;
00498 tree tstart;
00499 tree tend;
00500 tree tincr;
00501 tree tincr_saved;
00502 tree niters;
00503 struct nesting *expanded_loop;
00504
00505
00506
00507 if (block)
00508 ffeste_start_block_ (block);
00509 else
00510 ffeste_start_stmt_ ();
00511
00512 niters = ffecom_make_tempvar (block ? "do" : "impdo",
00513 ffecom_integer_type_node,
00514 FFETARGET_charactersizeNONE, -1);
00515
00516 ffecom_prepare_expr (incr);
00517 ffecom_prepare_expr_rw (NULL_TREE, var);
00518
00519 ffecom_prepare_end ();
00520
00521 tvar = ffecom_expr_rw (NULL_TREE, var);
00522 tincr = ffecom_expr (incr);
00523
00524 if (TREE_CODE (tvar) == ERROR_MARK
00525 || TREE_CODE (tincr) == ERROR_MARK)
00526 {
00527 if (block)
00528 {
00529 ffeste_end_block_ (block);
00530 ffestw_set_do_tvar (block, error_mark_node);
00531 }
00532 else
00533 {
00534 ffeste_end_stmt_ ();
00535 *xtvar = error_mark_node;
00536 }
00537 return;
00538 }
00539
00540
00541
00542 if (integer_zerop (tincr) || real_zerop (tincr))
00543 {
00544 ffebad_start (FFEBAD_DO_STEP_ZERO);
00545 ffebad_here (0, ffelex_token_where_line (incr_token),
00546 ffelex_token_where_column (incr_token));
00547 ffebad_string (msg);
00548 ffebad_finish ();
00549 tincr = convert (TREE_TYPE (tvar), integer_one_node);
00550 }
00551
00552 tincr_saved = ffecom_save_tree (tincr);
00553
00554
00555
00556 ffeste_start_stmt_ ();
00557
00558 ffecom_prepare_expr (start);
00559 ffecom_prepare_expr (end);
00560
00561 ffecom_prepare_end ();
00562
00563 tstart = ffecom_expr (start);
00564 tend = ffecom_expr (end);
00565
00566 if (TREE_CODE (tstart) == ERROR_MARK
00567 || TREE_CODE (tend) == ERROR_MARK)
00568 {
00569 ffeste_end_stmt_ ();
00570
00571 if (block)
00572 {
00573 ffeste_end_block_ (block);
00574 ffestw_set_do_tvar (block, error_mark_node);
00575 }
00576 else
00577 {
00578 ffeste_end_stmt_ ();
00579 *xtvar = error_mark_node;
00580 }
00581 return;
00582 }
00583
00584
00585 {
00586 tree try;
00587
00588 if (! ffe_is_onetrip ())
00589 {
00590 try = ffecom_2 (MINUS_EXPR, TREE_TYPE (tvar),
00591 tend,
00592 tstart);
00593
00594 try = ffecom_2 (PLUS_EXPR, TREE_TYPE (tvar),
00595 try,
00596 tincr);
00597
00598 if (TREE_CODE (TREE_TYPE (tvar)) != REAL_TYPE)
00599 try = ffecom_2 (TRUNC_DIV_EXPR, integer_type_node, try,
00600 tincr);
00601 else
00602 try = convert (integer_type_node,
00603 ffecom_2 (RDIV_EXPR, TREE_TYPE (tvar),
00604 try,
00605 tincr));
00606
00607
00608
00609
00610 try = ffecom_truth_value (ffecom_2 (LE_EXPR, integer_type_node,
00611 try,
00612 convert (TREE_TYPE (tvar),
00613 integer_zero_node)));
00614
00615 if (integer_onep (try))
00616 {
00617 ffebad_start (FFEBAD_DO_NULL);
00618 ffebad_here (0, ffelex_token_where_line (start_token),
00619 ffelex_token_where_column (start_token));
00620 ffebad_string (msg);
00621 ffebad_finish ();
00622 }
00623 }
00624
00625
00626
00627 try = ffecom_2 (PLUS_EXPR, TREE_TYPE (tvar),
00628 tend,
00629 tincr);
00630
00631 if ((TREE_CODE_CLASS (TREE_CODE (try)) == 'c')
00632 && TREE_CONSTANT_OVERFLOW (try))
00633 {
00634 ffebad_start (FFEBAD_DO_END_OVERFLOW);
00635 ffebad_here (0, ffelex_token_where_line (end_token),
00636 ffelex_token_where_column (end_token));
00637 ffebad_string (msg);
00638 ffebad_finish ();
00639 }
00640 }
00641
00642
00643
00644 tstart = ffecom_save_tree (tstart);
00645
00646 expr = ffecom_2 (MINUS_EXPR, TREE_TYPE (tvar),
00647 tend,
00648 tstart);
00649
00650 if (! ffe_is_onetrip ())
00651 {
00652 expr = ffecom_2 (PLUS_EXPR, TREE_TYPE (expr),
00653 expr,
00654 convert (TREE_TYPE (expr), tincr_saved));
00655 }
00656
00657 if (TREE_CODE (TREE_TYPE (tvar)) != REAL_TYPE)
00658 expr = ffecom_2 (TRUNC_DIV_EXPR, TREE_TYPE (expr),
00659 expr,
00660 tincr_saved);
00661 else
00662 expr = ffecom_2 (RDIV_EXPR, TREE_TYPE (expr),
00663 expr,
00664 tincr_saved);
00665
00666 #if 1
00667 if (TREE_TYPE (tvar) != error_mark_node)
00668 expr = convert (ffecom_integer_type_node, expr);
00669 #else
00670 if ((TREE_TYPE (tvar) != error_mark_node)
00671 && ((TREE_CODE (TREE_TYPE (tvar)) != INTEGER_TYPE)
00672 || ((TYPE_SIZE (TREE_TYPE (tvar)) != NULL_TREE)
00673 && ((TREE_CODE (TYPE_SIZE (TREE_TYPE (tvar)))
00674 != INTEGER_CST)
00675 || (TREE_INT_CST_LOW (TYPE_SIZE (TREE_TYPE (tvar)))
00676 <= TREE_INT_CST_LOW (TYPE_SIZE (ffecom_integer_type_node)))))))
00677
00678
00679 expr = convert (ffecom_integer_type_node, expr);
00680 #endif
00681
00682 assert (TYPE_MAIN_VARIANT (TREE_TYPE (niters))
00683 == TYPE_MAIN_VARIANT (TREE_TYPE (expr)));
00684
00685 expr = ffecom_modify (void_type_node, niters, expr);
00686 expand_expr_stmt (expr);
00687
00688 expr = ffecom_modify (void_type_node, tvar, tstart);
00689 expand_expr_stmt (expr);
00690
00691 ffeste_end_stmt_ ();
00692
00693 expanded_loop = expand_start_loop_continue_elsewhere (!! block);
00694 if (block)
00695 ffestw_set_do_hook (block, expanded_loop);
00696
00697 if (! ffe_is_onetrip ())
00698 {
00699 expr = ffecom_truth_value
00700 (ffecom_2 (GE_EXPR, integer_type_node,
00701 ffecom_2 (PREDECREMENT_EXPR,
00702 TREE_TYPE (niters),
00703 niters,
00704 convert (TREE_TYPE (niters),
00705 ffecom_integer_one_node)),
00706 convert (TREE_TYPE (niters),
00707 ffecom_integer_zero_node)));
00708
00709 expand_exit_loop_top_cond (0, expr);
00710 }
00711
00712 if (block)
00713 {
00714 ffestw_set_do_tvar (block, tvar);
00715 ffestw_set_do_incr_saved (block, tincr_saved);
00716 ffestw_set_do_count_var (block, niters);
00717 }
00718 else
00719 {
00720 *xtvar = tvar;
00721 *xtincr = tincr_saved;
00722 *xitersvar = niters;
00723 }
00724 }
00725
00726
00727
00728
00729 static void
00730 ffeste_end_iterdo_ (ffestw block, tree tvar, tree tincr, tree itersvar)
00731 {
00732 tree expr;
00733 tree niters = itersvar;
00734
00735 if (tvar == error_mark_node)
00736 return;
00737
00738 expand_loop_continue_here ();
00739
00740 ffeste_start_stmt_ ();
00741
00742 if (ffe_is_onetrip ())
00743 {
00744 expr = ffecom_truth_value
00745 (ffecom_2 (GE_EXPR, integer_type_node,
00746 ffecom_2 (PREDECREMENT_EXPR,
00747 TREE_TYPE (niters),
00748 niters,
00749 convert (TREE_TYPE (niters),
00750 ffecom_integer_one_node)),
00751 convert (TREE_TYPE (niters),
00752 ffecom_integer_zero_node)));
00753
00754 expand_exit_loop_if_false (0, expr);
00755 }
00756
00757 expr = ffecom_modify (void_type_node, tvar,
00758 ffecom_2 (PLUS_EXPR, TREE_TYPE (tvar),
00759 tvar,
00760 tincr));
00761 expand_expr_stmt (expr);
00762
00763
00764 ffeste_end_stmt_ ();
00765
00766 expand_end_loop ();
00767
00768
00769 if (block)
00770 ffeste_end_block_ (block);
00771 else
00772 ffeste_end_stmt_ ();
00773 }
00774
00775
00776
00777 static void
00778 ffeste_io_call_ (tree call, bool do_check)
00779 {
00780
00781
00782 TREE_SIDE_EFFECTS (call) = 1;
00783 if (ffeste_io_iostat_ != NULL_TREE)
00784 call = ffecom_modify (do_check ? NULL_TREE : void_type_node,
00785 ffeste_io_iostat_, call);
00786 expand_expr_stmt (call);
00787
00788 if (! do_check
00789 || ffeste_io_abort_ == NULL_TREE
00790 || TREE_CODE (ffeste_io_abort_) == ERROR_MARK)
00791 return;
00792
00793
00794
00795 expand_start_cond (ffecom_truth_value (ffeste_io_iostat_), 0);
00796 expand_goto (ffeste_io_abort_);
00797 expand_end_cond ();
00798 }
00799
00800
00801
00802
00803
00804
00805
00806 static void
00807 ffeste_io_impdo_ (ffebld impdo, ffelexToken impdo_token)
00808 {
00809 ffebld var = ffebld_head (ffebld_right (impdo));
00810 ffebld start = ffebld_head (ffebld_trail (ffebld_right (impdo)));
00811 ffebld end = ffebld_head (ffebld_trail (ffebld_trail
00812 (ffebld_right (impdo))));
00813 ffebld incr = ffebld_head (ffebld_trail (ffebld_trail
00814 (ffebld_trail (ffebld_right (impdo)))));
00815 ffebld list;
00816 ffebld item;
00817 tree tvar;
00818 tree tincr;
00819 tree titervar;
00820
00821 if (incr == NULL)
00822 {
00823 incr = ffebld_new_conter (ffebld_constant_new_integerdefault_val (1));
00824 ffebld_set_info (incr, ffeinfo_new
00825 (FFEINFO_basictypeINTEGER,
00826 FFEINFO_kindtypeINTEGERDEFAULT,
00827 0,
00828 FFEINFO_kindENTITY,
00829 FFEINFO_whereCONSTANT,
00830 FFETARGET_charactersizeNONE));
00831 }
00832
00833
00834
00835 start = ffeexpr_convert_expr (start, impdo_token, var, impdo_token,
00836 FFEEXPR_contextLET);
00837 end = ffeexpr_convert_expr (end, impdo_token, var, impdo_token,
00838 FFEEXPR_contextLET);
00839 incr = ffeexpr_convert_expr (incr, impdo_token, var, impdo_token,
00840 FFEEXPR_contextLET);
00841
00842 ffeste_begin_iterdo_ (NULL, &tvar, &tincr, &titervar, var,
00843 start, impdo_token,
00844 end, impdo_token,
00845 incr, impdo_token,
00846 "Implied DO loop");
00847
00848
00849
00850 for (list = ffebld_left (impdo); list != NULL; list = ffebld_trail (list))
00851 {
00852 item = ffebld_head (list);
00853 if (item == NULL)
00854 continue;
00855
00856
00857
00858 while (ffebld_op (item) == FFEBLD_opPAREN)
00859 item = ffebld_left (item);
00860
00861 if (ffebld_op (item) == FFEBLD_opANY)
00862 continue;
00863
00864 if (ffebld_op (item) == FFEBLD_opIMPDO)
00865 ffeste_io_impdo_ (item, impdo_token);
00866 else
00867 {
00868 ffeste_start_stmt_ ();
00869
00870 ffecom_prepare_arg_ptr_to_expr (item);
00871
00872 ffecom_prepare_end ();
00873
00874 ffeste_io_call_ ((*ffeste_io_driver_) (item), TRUE);
00875
00876 ffeste_end_stmt_ ();
00877 }
00878 }
00879
00880
00881
00882 ffeste_end_iterdo_ (NULL, tvar, tincr, titervar);
00883 }
00884
00885
00886
00887
00888
00889
00890
00891
00892
00893
00894 static tree
00895 ffeste_io_dofio_ (ffebld expr)
00896 {
00897 tree num_elements;
00898 tree variable;
00899 tree size;
00900 tree arglist;
00901 ffeinfoBasictype bt;
00902 ffeinfoKindtype kt;
00903 bool is_complex;
00904
00905 bt = ffeinfo_basictype (ffebld_info (expr));
00906 kt = ffeinfo_kindtype (ffebld_info (expr));
00907
00908 if ((bt == FFEINFO_basictypeANY)
00909 || (kt == FFEINFO_kindtypeANY))
00910 return error_mark_node;
00911
00912 if (bt == FFEINFO_basictypeCOMPLEX)
00913 {
00914 is_complex = TRUE;
00915 bt = FFEINFO_basictypeREAL;
00916 }
00917 else
00918 is_complex = FALSE;
00919
00920 variable = ffecom_arg_ptr_to_expr (expr, &size);
00921
00922 if ((variable == error_mark_node)
00923 || (size == error_mark_node))
00924 return error_mark_node;
00925
00926 if (size == NULL_TREE)
00927 {
00928 size = size_binop (CEIL_DIV_EXPR,
00929 TYPE_SIZE_UNIT (ffecom_tree_type[bt][kt]),
00930 size_int (TYPE_PRECISION (char_type_node)
00931 / BITS_PER_UNIT));
00932 #if 0
00933
00934
00935
00936 assert (TYPE_PRECISION (ffecom_f2c_ftnlen_type_node)
00937 >= TYPE_PRECISION (TREE_TYPE (size)));
00938 #endif
00939 size = convert (ffecom_f2c_ftnlen_type_node, size);
00940 }
00941
00942 if (ffeinfo_rank (ffebld_info (expr)) == 0
00943 || TREE_CODE (TREE_TYPE (TREE_TYPE (variable))) != ARRAY_TYPE)
00944 num_elements
00945 = is_complex ? ffecom_f2c_ftnlen_two_node : ffecom_f2c_ftnlen_one_node;
00946 else
00947 {
00948 num_elements
00949 = size_binop (CEIL_DIV_EXPR,
00950 TYPE_SIZE_UNIT (TREE_TYPE (TREE_TYPE (variable))),
00951 convert (sizetype, size));
00952 num_elements = size_binop (CEIL_DIV_EXPR, num_elements,
00953 size_int (TYPE_PRECISION (char_type_node)
00954 / BITS_PER_UNIT));
00955 num_elements = convert (ffecom_f2c_ftnlen_type_node,
00956 num_elements);
00957 }
00958
00959 num_elements
00960 = ffecom_1 (ADDR_EXPR, ffecom_f2c_ptr_to_ftnlen_type_node,
00961 num_elements);
00962
00963 variable = convert (string_type_node, variable);
00964
00965 arglist = build_tree_list (NULL_TREE, num_elements);
00966 TREE_CHAIN (arglist) = build_tree_list (NULL_TREE, variable);
00967 TREE_CHAIN (TREE_CHAIN (arglist)) = build_tree_list (NULL_TREE, size);
00968
00969 return ffecom_call_gfrt (FFECOM_gfrtDOFIO, arglist, NULL_TREE);
00970 }
00971
00972
00973
00974
00975
00976
00977
00978
00979
00980
00981 static tree
00982 ffeste_io_dolio_ (ffebld expr)
00983 {
00984 tree type_id;
00985 tree num_elements;
00986 tree variable;
00987 tree size;
00988 tree arglist;
00989 ffeinfoBasictype bt;
00990 ffeinfoKindtype kt;
00991 int tc;
00992
00993 bt = ffeinfo_basictype (ffebld_info (expr));
00994 kt = ffeinfo_kindtype (ffebld_info (expr));
00995
00996 if ((bt == FFEINFO_basictypeANY)
00997 || (kt == FFEINFO_kindtypeANY))
00998 return error_mark_node;
00999
01000 tc = ffecom_f2c_typecode (bt, kt);
01001 assert (tc != -1);
01002 type_id = build_int_2 (tc, 0);
01003
01004 type_id
01005 = ffecom_1 (ADDR_EXPR, ffecom_f2c_ptr_to_ftnint_type_node,
01006 convert (ffecom_f2c_ftnint_type_node,
01007 type_id));
01008
01009 variable = ffecom_arg_ptr_to_expr (expr, &size);
01010
01011 if ((type_id == error_mark_node)
01012 || (variable == error_mark_node)
01013 || (size == error_mark_node))
01014 return error_mark_node;
01015
01016 if (size == NULL_TREE)
01017 {
01018 size = size_binop (CEIL_DIV_EXPR,
01019 TYPE_SIZE_UNIT (ffecom_tree_type[bt][kt]),
01020 size_int (TYPE_PRECISION (char_type_node)
01021 / BITS_PER_UNIT));
01022 #if 0
01023
01024
01025
01026 assert (TYPE_PRECISION (ffecom_f2c_ftnlen_type_node)
01027 >= TYPE_PRECISION (TREE_TYPE (size)));
01028 #endif
01029 size = convert (ffecom_f2c_ftnlen_type_node, size);
01030 }
01031
01032 if (ffeinfo_rank (ffebld_info (expr)) == 0
01033 || TREE_CODE (TREE_TYPE (TREE_TYPE (variable))) != ARRAY_TYPE)
01034 num_elements = ffecom_integer_one_node;
01035 else
01036 {
01037 num_elements
01038 = size_binop (CEIL_DIV_EXPR,
01039 TYPE_SIZE_UNIT (TREE_TYPE (TREE_TYPE (variable))),
01040 convert (sizetype, size));
01041 num_elements = size_binop (CEIL_DIV_EXPR, num_elements,
01042 size_int (TYPE_PRECISION (char_type_node)
01043 / BITS_PER_UNIT));
01044 num_elements = convert (ffecom_f2c_ftnlen_type_node,
01045 num_elements);
01046 }
01047
01048 num_elements
01049 = ffecom_1 (ADDR_EXPR, ffecom_f2c_ptr_to_ftnlen_type_node,
01050 num_elements);
01051
01052 variable = convert (string_type_node, variable);
01053
01054 arglist = build_tree_list (NULL_TREE, type_id);
01055 TREE_CHAIN (arglist) = build_tree_list (NULL_TREE, num_elements);
01056 TREE_CHAIN (TREE_CHAIN (arglist)) = build_tree_list (NULL_TREE, variable);
01057 TREE_CHAIN (TREE_CHAIN (TREE_CHAIN (arglist)))
01058 = build_tree_list (NULL_TREE, size);
01059
01060 return ffecom_call_gfrt (FFECOM_gfrtDOLIO, arglist, NULL_TREE);
01061 }
01062
01063
01064
01065
01066
01067
01068
01069
01070
01071
01072 static tree
01073 ffeste_io_douio_ (ffebld expr)
01074 {
01075 tree num_elements;
01076 tree variable;
01077 tree size;
01078 tree arglist;
01079 ffeinfoBasictype bt;
01080 ffeinfoKindtype kt;
01081 bool is_complex;
01082
01083 bt = ffeinfo_basictype (ffebld_info (expr));
01084 kt = ffeinfo_kindtype (ffebld_info (expr));
01085
01086 if ((bt == FFEINFO_basictypeANY)
01087 || (kt == FFEINFO_kindtypeANY))
01088 return error_mark_node;
01089
01090 if (bt == FFEINFO_basictypeCOMPLEX)
01091 {
01092 is_complex = TRUE;
01093 bt = FFEINFO_basictypeREAL;
01094 }
01095 else
01096 is_complex = FALSE;
01097
01098 variable = ffecom_arg_ptr_to_expr (expr, &size);
01099
01100 if ((variable == error_mark_node)
01101 || (size == error_mark_node))
01102 return error_mark_node;
01103
01104 if (size == NULL_TREE)
01105 {
01106 size = size_binop (CEIL_DIV_EXPR,
01107 TYPE_SIZE_UNIT (ffecom_tree_type[bt][kt]),
01108 size_int (TYPE_PRECISION (char_type_node)
01109 / BITS_PER_UNIT));
01110 #if 0
01111
01112
01113
01114 assert (TYPE_PRECISION (ffecom_f2c_ftnlen_type_node)
01115 >= TYPE_PRECISION (TREE_TYPE (size)));
01116 #endif
01117 size = convert (ffecom_f2c_ftnlen_type_node, size);
01118 }
01119
01120 if (ffeinfo_rank (ffebld_info (expr)) == 0
01121 || TREE_CODE (TREE_TYPE (TREE_TYPE (variable))) != ARRAY_TYPE)
01122 num_elements
01123 = is_complex ? ffecom_f2c_ftnlen_two_node : ffecom_f2c_ftnlen_one_node;
01124 else
01125 {
01126 num_elements
01127 = size_binop (CEIL_DIV_EXPR,
01128 TYPE_SIZE_UNIT (TREE_TYPE (TREE_TYPE (variable))),
01129 convert (sizetype, size));
01130 num_elements = size_binop (CEIL_DIV_EXPR, num_elements,
01131 size_int (TYPE_PRECISION (char_type_node)
01132 / BITS_PER_UNIT));
01133 num_elements = convert (ffecom_f2c_ftnlen_type_node,
01134 num_elements);
01135 }
01136
01137 num_elements
01138 = ffecom_1 (ADDR_EXPR, ffecom_f2c_ptr_to_ftnlen_type_node,
01139 num_elements);
01140
01141 variable = convert (string_type_node, variable);
01142
01143 arglist = build_tree_list (NULL_TREE, num_elements);
01144 TREE_CHAIN (arglist) = build_tree_list (NULL_TREE, variable);
01145 TREE_CHAIN (TREE_CHAIN (arglist)) = build_tree_list (NULL_TREE, size);
01146
01147 return ffecom_call_gfrt (FFECOM_gfrtDOUIO, arglist, NULL_TREE);
01148 }
01149
01150
01151
01152
01153
01154
01155
01156
01157
01158
01159
01160
01161
01162
01163
01164
01165 static tree
01166 ffeste_io_ialist_ (bool have_err,
01167 ffestvUnit unit,
01168 ffebld unit_expr,
01169 int unit_dflt)
01170 {
01171 static tree f2c_alist_struct = NULL_TREE;
01172 tree t;
01173 tree ttype;
01174 tree field;
01175 tree inits, initn;
01176 bool constantp = TRUE;
01177 static tree errfield, unitfield;
01178 tree errinit, unitinit;
01179 tree unitexp;
01180 static int mynumber = 0;
01181
01182 if (f2c_alist_struct == NULL_TREE)
01183 {
01184 tree ref;
01185
01186 ref = make_node (RECORD_TYPE);
01187
01188 errfield = ffecom_decl_field (ref, NULL_TREE, "err",
01189 ffecom_f2c_flag_type_node);
01190 unitfield = ffecom_decl_field (ref, errfield, "unit",
01191 ffecom_f2c_ftnint_type_node);
01192
01193 TYPE_FIELDS (ref) = errfield;
01194 layout_type (ref);
01195
01196 ggc_add_tree_root (&f2c_alist_struct, 1);
01197
01198 f2c_alist_struct = ref;
01199 }
01200
01201
01202
01203
01204 ffeste_f2c_init_flag_ (have_err, errinit);
01205
01206 switch (unit)
01207 {
01208 case FFESTV_unitNONE:
01209 case FFESTV_unitASTERISK:
01210 unitinit = build_int_2 (unit_dflt, 0);
01211 unitexp = unitinit;
01212 break;
01213
01214 case FFESTV_unitINTEXPR:
01215 unitexp = ffecom_const_expr (unit_expr);
01216 if (unitexp)
01217 unitinit = unitexp;
01218 else
01219 {
01220 unitinit = ffecom_integer_zero_node;
01221 constantp = FALSE;
01222 }
01223 break;
01224
01225 default:
01226 assert ("bad unit spec" == NULL);
01227 unitinit = ffecom_integer_zero_node;
01228 unitexp = unitinit;
01229 break;
01230 }
01231
01232 inits = build_tree_list ((field = TYPE_FIELDS (f2c_alist_struct)), errinit);
01233 initn = inits;
01234 ffeste_f2c_init_next_ (unitinit);
01235
01236 inits = build (CONSTRUCTOR, f2c_alist_struct, NULL_TREE, inits);
01237 TREE_CONSTANT (inits) = constantp ? 1 : 0;
01238 TREE_STATIC (inits) = 1;
01239
01240 t = build_decl (VAR_DECL,
01241 ffecom_get_invented_identifier ("__g77_alist_%d",
01242 mynumber++),
01243 f2c_alist_struct);
01244 TREE_STATIC (t) = 1;
01245 t = ffecom_start_decl (t, 1);
01246 ffecom_finish_decl (t, inits, 0);
01247
01248
01249
01250 if (! unitexp)
01251 ffecom_prepare_expr (unit_expr);
01252
01253 ffecom_prepare_end ();
01254
01255
01256
01257 if (! unitexp)
01258 {
01259 unitexp = ffecom_expr (unit_expr);
01260 ffeste_f2c_compile_ (unitfield, unitexp);
01261 }
01262
01263 ttype = build_pointer_type (TREE_TYPE (t));
01264 t = ffecom_1 (ADDR_EXPR, ttype, t);
01265
01266 t = build_tree_list (NULL_TREE, t);
01267
01268 return t;
01269 }
01270
01271
01272
01273
01274
01275
01276
01277
01278
01279
01280
01281
01282
01283
01284
01285
01286 static tree
01287 ffeste_io_cilist_ (bool have_err,
01288 ffestvUnit unit,
01289 ffebld unit_expr,
01290 int unit_dflt,
01291 bool have_end,
01292 ffestvFormat format,
01293 ffestpFile *format_spec,
01294 bool rec,
01295 ffebld rec_expr)
01296 {
01297 static tree f2c_cilist_struct = NULL_TREE;
01298 tree t;
01299 tree ttype;
01300 tree field;
01301 tree inits, initn;
01302 bool constantp = TRUE;
01303 static tree errfield, unitfield, endfield, formatfield, recfield;
01304 tree errinit, unitinit, endinit, formatinit, recinit;
01305 tree unitexp, formatexp, recexp;
01306 static int mynumber = 0;
01307
01308 if (f2c_cilist_struct == NULL_TREE)
01309 {
01310 tree ref;
01311
01312 ref = make_node (RECORD_TYPE);
01313
01314 errfield = ffecom_decl_field (ref, NULL_TREE, "err",
01315 ffecom_f2c_flag_type_node);
01316 unitfield = ffecom_decl_field (ref, errfield, "unit",
01317 ffecom_f2c_ftnint_type_node);
01318 endfield = ffecom_decl_field (ref, unitfield, "end",
01319 ffecom_f2c_flag_type_node);
01320 formatfield = ffecom_decl_field (ref, endfield, "format",
01321 string_type_node);
01322 recfield = ffecom_decl_field (ref, formatfield, "rec",
01323 ffecom_f2c_ftnint_type_node);
01324
01325 TYPE_FIELDS (ref) = errfield;
01326 layout_type (ref);
01327
01328 ggc_add_tree_root (&f2c_cilist_struct, 1);
01329
01330 f2c_cilist_struct = ref;
01331 }
01332
01333
01334
01335
01336 ffeste_f2c_init_flag_ (have_err, errinit);
01337
01338 switch (unit)
01339 {
01340 case FFESTV_unitNONE:
01341 case FFESTV_unitASTERISK:
01342 unitinit = build_int_2 (unit_dflt, 0);
01343 unitexp = unitinit;
01344 break;
01345
01346 case FFESTV_unitINTEXPR:
01347 unitexp = ffecom_const_expr (unit_expr);
01348 if (unitexp)
01349 unitinit = unitexp;
01350 else
01351 {
01352 unitinit = ffecom_integer_zero_node;
01353 constantp = FALSE;
01354 }
01355 break;
01356
01357 default:
01358 assert ("bad unit spec" == NULL);
01359 unitinit = ffecom_integer_zero_node;
01360 unitexp = unitinit;
01361 break;
01362 }
01363
01364 switch (format)
01365 {
01366 case FFESTV_formatNONE:
01367 formatinit = null_pointer_node;
01368 formatexp = formatinit;
01369 break;
01370
01371 case FFESTV_formatLABEL:
01372 formatexp = error_mark_node;
01373 formatinit = ffecom_lookup_label (format_spec->u.label);
01374 if ((formatinit == NULL_TREE)
01375 || (TREE_CODE (formatinit) == ERROR_MARK))
01376 break;
01377 formatinit = ffecom_1 (ADDR_EXPR,
01378 build_pointer_type (void_type_node),
01379 formatinit);
01380 TREE_CONSTANT (formatinit) = 1;
01381 break;
01382
01383 case FFESTV_formatCHAREXPR:
01384 formatexp = ffecom_arg_ptr_to_const_expr (format_spec->u.expr, NULL);
01385 if (formatexp)
01386 formatinit = formatexp;
01387 else
01388 {
01389 formatinit = null_pointer_node;
01390 constantp = FALSE;
01391 }
01392 break;
01393
01394 case FFESTV_formatASTERISK:
01395 formatinit = null_pointer_node;
01396 formatexp = formatinit;
01397 break;
01398
01399 case FFESTV_formatINTEXPR:
01400 formatinit = null_pointer_node;
01401 formatexp = ffecom_expr_assign (format_spec->u.expr);
01402 if (GET_MODE_SIZE (TYPE_MODE (TREE_TYPE (formatexp)))
01403 < GET_MODE_SIZE (TYPE_MODE (TREE_TYPE (null_pointer_node))))
01404 error ("ASSIGNed FORMAT specifier is too small");
01405 formatexp = convert (string_type_node, formatexp);
01406 break;
01407
01408 case FFESTV_formatNAMELIST:
01409 formatinit = ffecom_expr (format_spec->u.expr);
01410 formatexp = formatinit;
01411 break;
01412
01413 default:
01414 assert ("bad format spec" == NULL);
01415 formatinit = integer_zero_node;
01416 formatexp = formatinit;
01417 break;
01418 }
01419
01420 ffeste_f2c_init_flag_ (have_end, endinit);
01421
01422 if (rec)
01423 recexp = ffecom_const_expr (rec_expr);
01424 else
01425 recexp = ffecom_integer_zero_node;
01426 if (recexp)
01427 recinit = recexp;
01428 else
01429 {
01430 recinit = ffecom_integer_zero_node;
01431 constantp = FALSE;
01432 }
01433
01434 inits = build_tree_list ((field = TYPE_FIELDS (f2c_cilist_struct)), errinit);
01435 initn = inits;
01436 ffeste_f2c_init_next_ (unitinit);
01437 ffeste_f2c_init_next_ (endinit);
01438 ffeste_f2c_init_next_ (formatinit);
01439 ffeste_f2c_init_next_ (recinit);
01440
01441 inits = build (CONSTRUCTOR, f2c_cilist_struct, NULL_TREE, inits);
01442 TREE_CONSTANT (inits) = constantp ? 1 : 0;
01443 TREE_STATIC (inits) = 1;
01444
01445 t = build_decl (VAR_DECL,
01446 ffecom_get_invented_identifier ("__g77_cilist_%d",
01447 mynumber++),
01448 f2c_cilist_struct);
01449 TREE_STATIC (t) = 1;
01450 t = ffecom_start_decl (t, 1);
01451 ffecom_finish_decl (t, inits, 0);
01452
01453
01454
01455 if (! unitexp)
01456 ffecom_prepare_expr (unit_expr);
01457
01458 if (! formatexp)
01459 ffecom_prepare_arg_ptr_to_expr (format_spec->u.expr);
01460
01461 if (! recexp)
01462 ffecom_prepare_expr (rec_expr);
01463
01464 ffecom_prepare_end ();
01465
01466
01467
01468 if (! unitexp)
01469 {
01470 unitexp = ffecom_expr (unit_expr);
01471 ffeste_f2c_compile_ (unitfield, unitexp);
01472 }
01473
01474 if (! formatexp)
01475 {
01476 formatexp = ffecom_arg_ptr_to_expr (format_spec->u.expr, NULL);
01477 ffeste_f2c_compile_ (formatfield, formatexp);
01478 }
01479 else if (format == FFESTV_formatINTEXPR)
01480 ffeste_f2c_compile_ (formatfield, formatexp);
01481
01482 if (! recexp)
01483 {
01484 recexp = ffecom_expr (rec_expr);
01485 ffeste_f2c_compile_ (recfield, recexp);
01486 }
01487
01488 ttype = build_pointer_type (TREE_TYPE (t));
01489 t = ffecom_1 (ADDR_EXPR, ttype, t);
01490
01491 t = build_tree_list (NULL_TREE, t);
01492
01493 return t;
01494 }
01495
01496
01497
01498
01499
01500
01501
01502
01503
01504
01505
01506
01507
01508
01509
01510
01511 static tree
01512 ffeste_io_cllist_ (bool have_err,
01513 ffebld unit_expr,
01514 ffestpFile *stat_spec)
01515 {
01516 static tree f2c_close_struct = NULL_TREE;
01517 tree t;
01518 tree ttype;
01519 tree field;
01520 tree inits, initn;
01521 tree ignore;
01522 bool constantp = TRUE;
01523 static tree errfield, unitfield, statfield;
01524 tree errinit, unitinit, statinit;
01525 tree unitexp, statexp;
01526 static int mynumber = 0;
01527
01528 if (f2c_close_struct == NULL_TREE)
01529 {
01530 tree ref;
01531
01532 ref = make_node (RECORD_TYPE);
01533
01534 errfield = ffecom_decl_field (ref, NULL_TREE, "err",
01535 ffecom_f2c_flag_type_node);
01536 unitfield = ffecom_decl_field (ref, errfield, "unit",
01537 ffecom_f2c_ftnint_type_node);
01538 statfield = ffecom_decl_field (ref, unitfield, "stat",
01539 string_type_node);
01540
01541 TYPE_FIELDS (ref) = errfield;
01542 layout_type (ref);
01543
01544 ggc_add_tree_root (&f2c_close_struct, 1);
01545
01546 f2c_close_struct = ref;
01547 }
01548
01549
01550
01551
01552 ffeste_f2c_init_flag_ (have_err, errinit);
01553
01554 unitexp = ffecom_const_expr (unit_expr);
01555 if (unitexp)
01556 unitinit = unitexp;
01557 else
01558 {
01559 unitinit = ffecom_integer_zero_node;
01560 constantp = FALSE;
01561 }
01562
01563 ffeste_f2c_init_charnolen_ (statexp, statinit, stat_spec);
01564
01565 inits = build_tree_list ((field = TYPE_FIELDS (f2c_close_struct)), errinit);
01566 initn = inits;
01567 ffeste_f2c_init_next_ (unitinit);
01568 ffeste_f2c_init_next_ (statinit);
01569
01570 inits = build (CONSTRUCTOR, f2c_close_struct, NULL_TREE, inits);
01571 TREE_CONSTANT (inits) = constantp ? 1 : 0;
01572 TREE_STATIC (inits) = 1;
01573
01574 t = build_decl (VAR_DECL,
01575 ffecom_get_invented_identifier ("__g77_cllist_%d",
01576 mynumber++),
01577 f2c_close_struct);
01578 TREE_STATIC (t) = 1;
01579 t = ffecom_start_decl (t, 1);
01580 ffecom_finish_decl (t, inits, 0);
01581
01582
01583
01584 if (! unitexp)
01585 ffecom_prepare_expr (unit_expr);
01586
01587 if (! statexp)
01588 ffecom_prepare_arg_ptr_to_expr (stat_spec->u.expr);
01589
01590 ffecom_prepare_end ();
01591
01592
01593
01594 if (! unitexp)
01595 {
01596 unitexp = ffecom_expr (unit_expr);
01597 ffeste_f2c_compile_ (unitfield, unitexp);
01598 }
01599
01600 ffeste_f2c_compile_charnolen_ (statfield, stat_spec, statexp);
01601
01602 ttype = build_pointer_type (TREE_TYPE (t));
01603 t = ffecom_1 (ADDR_EXPR, ttype, t);
01604
01605 t = build_tree_list (NULL_TREE, t);
01606
01607 return t;
01608 }
01609
01610
01611
01612
01613
01614
01615
01616
01617
01618
01619
01620
01621
01622
01623
01624
01625 static tree
01626 ffeste_io_icilist_ (bool have_err,
01627 ffebld unit_expr,
01628 bool have_end,
01629 ffestvFormat format,
01630 ffestpFile *format_spec)
01631 {
01632 static tree f2c_icilist_struct = NULL_TREE;
01633 tree t;
01634 tree ttype;
01635 tree field;
01636 tree inits, initn;
01637 bool constantp = TRUE;
01638 static tree errfield, unitfield, endfield, formatfield, unitlenfield,
01639 unitnumfield;
01640 tree errinit, unitinit, endinit, formatinit, unitleninit, unitnuminit;
01641 tree unitexp, formatexp, unitlenexp, unitnumexp;
01642 static int mynumber = 0;
01643
01644 if (f2c_icilist_struct == NULL_TREE)
01645 {
01646 tree ref;
01647
01648 ref = make_node (RECORD_TYPE);
01649
01650 errfield = ffecom_decl_field (ref, NULL_TREE, "err",
01651 ffecom_f2c_flag_type_node);
01652 unitfield = ffecom_decl_field (ref, errfield, "unit",
01653 string_type_node);
01654 endfield = ffecom_decl_field (ref, unitfield, "end",
01655 ffecom_f2c_flag_type_node);
01656 formatfield = ffecom_decl_field (ref, endfield, "format",
01657 string_type_node);
01658 unitlenfield = ffecom_decl_field (ref, formatfield, "unitlen",
01659 ffecom_f2c_ftnint_type_node);
01660 unitnumfield = ffecom_decl_field (ref, unitlenfield, "unitnum",
01661 ffecom_f2c_ftnint_type_node);
01662
01663 TYPE_FIELDS (ref) = errfield;
01664 layout_type (ref);
01665
01666 ggc_add_tree_root (&f2c_icilist_struct, 1);
01667
01668 f2c_icilist_struct = ref;
01669 }
01670
01671
01672
01673
01674 ffeste_f2c_init_flag_ (have_err, errinit);
01675
01676 unitexp = ffecom_arg_ptr_to_const_expr (unit_expr, &unitlenexp);
01677 if (unitexp)
01678 unitinit = unitexp;
01679 else
01680 {
01681 unitinit = null_pointer_node;
01682 constantp = FALSE;
01683 }
01684 if (unitlenexp)
01685 unitleninit = unitlenexp;
01686 else
01687 {
01688 unitleninit = ffecom_integer_zero_node;
01689 constantp = FALSE;
01690 }
01691
01692
01693
01694 if (ffeinfo_rank (ffebld_info (unit_expr)) == 0
01695 || (unitexp
01696 && TREE_CODE (TREE_TYPE (TREE_TYPE (unitexp))) != ARRAY_TYPE))
01697 {
01698
01699 unitnuminit = ffecom_integer_one_node;
01700 unitnumexp = unitnuminit;
01701 }
01702 else if (unitexp && unitlenexp)
01703 {
01704
01705 unitnuminit
01706 = size_binop (CEIL_DIV_EXPR,
01707 TYPE_SIZE_UNIT (TREE_TYPE (TREE_TYPE (unitexp))),
01708 convert (sizetype, unitlenexp));
01709 unitnuminit = size_binop (CEIL_DIV_EXPR, unitnuminit,
01710 size_int (TYPE_PRECISION (char_type_node)
01711 / BITS_PER_UNIT));
01712 unitnumexp = unitnuminit;
01713 }
01714 else
01715 {
01716
01717 unitnuminit = ffecom_integer_zero_node;
01718 unitnumexp = NULL_TREE;
01719 constantp = FALSE;
01720 }
01721
01722 switch (format)
01723 {
01724 case FFESTV_formatNONE:
01725 formatinit = null_pointer_node;
01726 formatexp = formatinit;
01727 break;
01728
01729 case FFESTV_formatLABEL:
01730 formatexp = error_mark_node;
01731 formatinit = ffecom_lookup_label (format_spec->u.label);
01732 if ((formatinit == NULL_TREE)
01733 || (TREE_CODE (formatinit) == ERROR_MARK))
01734 break;
01735 formatinit = ffecom_1 (ADDR_EXPR,
01736 build_pointer_type (void_type_node),
01737 formatinit);
01738 TREE_CONSTANT (formatinit) = 1;
01739 break;
01740
01741 case FFESTV_formatCHAREXPR:
01742 ffeste_f2c_init_format_ (formatexp, formatinit, format_spec);
01743 break;
01744
01745 case FFESTV_formatASTERISK:
01746 formatinit = null_pointer_node;
01747 formatexp = formatinit;
01748 break;
01749
01750 case FFESTV_formatINTEXPR:
01751 formatinit = null_pointer_node;
01752 formatexp = ffecom_expr_assign (format_spec->u.expr);
01753 if (GET_MODE_SIZE (TYPE_MODE (TREE_TYPE (formatexp)))
01754 < GET_MODE_SIZE (TYPE_MODE (TREE_TYPE (null_pointer_node))))
01755 error ("ASSIGNed FORMAT specifier is too small");
01756 formatexp = convert (string_type_node, formatexp);
01757 break;
01758
01759 default:
01760 assert ("bad format spec" == NULL);
01761 formatinit = ffecom_integer_zero_node;
01762 formatexp = formatinit;
01763 break;
01764 }
01765
01766 ffeste_f2c_init_flag_ (have_end, endinit);
01767
01768 inits = build_tree_list ((field = TYPE_FIELDS (f2c_icilist_struct)),
01769 errinit);
01770 initn = inits;
01771 ffeste_f2c_init_next_ (unitinit);
01772 ffeste_f2c_init_next_ (endinit);
01773 ffeste_f2c_init_next_ (formatinit);
01774 ffeste_f2c_init_next_ (unitleninit);
01775 ffeste_f2c_init_next_ (unitnuminit);
01776
01777 inits = build (CONSTRUCTOR, f2c_icilist_struct, NULL_TREE, inits);
01778 TREE_CONSTANT (inits) = constantp ? 1 : 0;
01779 TREE_STATIC (inits) = 1;
01780
01781 t = build_decl (VAR_DECL,
01782 ffecom_get_invented_identifier ("__g77_icilist_%d",
01783 mynumber++),
01784 f2c_icilist_struct);
01785 TREE_STATIC (t) = 1;
01786 t = ffecom_start_decl (t, 1);
01787 ffecom_finish_decl (t, inits, 0);
01788
01789
01790
01791 if (! unitexp)
01792 ffecom_prepare_arg_ptr_to_expr (unit_expr);
01793
01794 ffeste_f2c_prepare_format_ (format_spec, formatexp);
01795
01796 ffecom_prepare_end ();
01797
01798
01799
01800 if (! unitexp || ! unitlenexp)
01801 {
01802 int need_unitexp = (! unitexp);
01803 int need_unitlenexp = (! unitlenexp);
01804
01805 unitexp = ffecom_arg_ptr_to_expr (unit_expr, &unitlenexp);
01806 if (need_unitexp)
01807 ffeste_f2c_compile_ (unitfield, unitexp);
01808 if (need_unitlenexp)
01809 ffeste_f2c_compile_ (unitlenfield, unitlenexp);
01810 }
01811
01812 if (! unitnumexp
01813 && unitexp != error_mark_node
01814 && unitlenexp != error_mark_node)
01815 {
01816 unitnumexp
01817 = size_binop (CEIL_DIV_EXPR,
01818 TYPE_SIZE_UNIT (TREE_TYPE (TREE_TYPE (unitexp))),
01819 convert (sizetype, unitlenexp));
01820 unitnumexp = size_binop (CEIL_DIV_EXPR, unitnumexp,
01821 size_int (TYPE_PRECISION (char_type_node)
01822 / BITS_PER_UNIT));
01823 ffeste_f2c_compile_ (unitnumfield, unitnumexp);
01824 }
01825
01826 if (format == FFESTV_formatINTEXPR)
01827 ffeste_f2c_compile_ (formatfield, formatexp);
01828 else
01829 ffeste_f2c_compile_format_ (formatfield, format_spec, formatexp);
01830
01831 ttype = build_pointer_type (TREE_TYPE (t));
01832 t = ffecom_1 (ADDR_EXPR, ttype, t);
01833
01834 t = build_tree_list (NULL_TREE, t);
01835
01836 return t;
01837 }
01838
01839
01840
01841
01842
01843
01844
01845
01846
01847
01848
01849
01850
01851
01852
01853
01854 static tree
01855 ffeste_io_inlist_ (bool have_err,
01856 ffestpFile *unit_spec,
01857 ffestpFile *file_spec,
01858 ffestpFile *exist_spec,
01859 ffestpFile *open_spec,
01860 ffestpFile *number_spec,
01861 ffestpFile *named_spec,
01862 ffestpFile *name_spec,
01863 ffestpFile *access_spec,
01864 ffestpFile *sequential_spec,
01865 ffestpFile *direct_spec,
01866 ffestpFile *form_spec,
01867 ffestpFile *formatted_spec,
01868 ffestpFile *unformatted_spec,
01869 ffestpFile *recl_spec,
01870 ffestpFile *nextrec_spec,
01871 ffestpFile *blank_spec)
01872 {
01873 static tree f2c_inquire_struct = NULL_TREE;
01874 tree t;
01875 tree ttype;
01876 tree field;
01877 tree inits, initn;
01878 bool constantp = TRUE;
01879 static tree errfield, unitfield, filefield, filelenfield, existfield,
01880 openfield, numberfield, namedfield, namefield, namelenfield, accessfield,
01881 accesslenfield, sequentialfield, sequentiallenfield, directfield, directlenfield,
01882 formfield, formlenfield, formattedfield, formattedlenfield, unformattedfield,
01883 unformattedlenfield, reclfield, nextrecfield, blankfield, blanklenfield;
01884 tree errinit, unitinit, fileinit, fileleninit, existinit, openinit, numberinit,
01885 namedinit, nameinit, nameleninit, accessinit, accessleninit, sequentialinit,
01886 sequentialleninit, directinit, directleninit, forminit, formleninit,
01887 formattedinit, formattedleninit, unformattedinit, unformattedleninit,
01888 reclinit, nextrecinit, blankinit, blankleninit;
01889 tree
01890 unitexp, fileexp, filelenexp, existexp, openexp, numberexp, namedexp,
01891 nameexp, namelenexp, accessexp, accesslenexp, sequentialexp, sequentiallenexp,
01892 directexp, directlenexp, formexp, formlenexp, formattedexp, formattedlenexp,
01893 unformattedexp, unformattedlenexp, reclexp, nextrecexp, blankexp, blanklenexp;
01894 static int mynumber = 0;
01895
01896 if (f2c_inquire_struct == NULL_TREE)
01897 {
01898 tree ref;
01899
01900 ref = make_node (RECORD_TYPE);
01901
01902 errfield = ffecom_decl_field (ref, NULL_TREE, "err",
01903 ffecom_f2c_flag_type_node);
01904 unitfield = ffecom_decl_field (ref, errfield, "unit",
01905 ffecom_f2c_ftnint_type_node);
01906 filefield = ffecom_decl_field (ref, unitfield, "file",
01907 string_type_node);
01908 filelenfield = ffecom_decl_field (ref, filefield, "filelen",
01909 ffecom_f2c_ftnlen_type_node);
01910 existfield = ffecom_decl_field (ref, filelenfield, "exist",
01911 ffecom_f2c_ptr_to_ftnint_type_node);
01912 openfield = ffecom_decl_field (ref, existfield, "open",
01913 ffecom_f2c_ptr_to_ftnint_type_node);
01914 numberfield = ffecom_decl_field (ref, openfield, "number",
01915 ffecom_f2c_ptr_to_ftnint_type_node);
01916 namedfield = ffecom_decl_field (ref, numberfield, "named",
01917 ffecom_f2c_ptr_to_ftnint_type_node);
01918 namefield = ffecom_decl_field (ref, namedfield, "name",
01919 string_type_node);
01920 namelenfield = ffecom_decl_field (ref, namefield, "namelen",
01921 ffecom_f2c_ftnlen_type_node);
01922 accessfield = ffecom_decl_field (ref, namelenfield, "access",
01923 string_type_node);
01924 accesslenfield = ffecom_decl_field (ref, accessfield, "accesslen",
01925 ffecom_f2c_ftnlen_type_node);
01926 sequentialfield = ffecom_decl_field (ref, accesslenfield, "sequential",
01927 string_type_node);
01928 sequentiallenfield = ffecom_decl_field (ref, sequentialfield,
01929 "sequentiallen",
01930 ffecom_f2c_ftnlen_type_node);
01931 directfield = ffecom_decl_field (ref, sequentiallenfield, "direct",
01932 string_type_node);
01933 directlenfield = ffecom_decl_field (ref, directfield, "directlen",
01934 ffecom_f2c_ftnlen_type_node);
01935 formfield = ffecom_decl_field (ref, directlenfield, "form",
01936 string_type_node);
01937 formlenfield = ffecom_decl_field (ref, formfield, "formlen",
01938 ffecom_f2c_ftnlen_type_node);
01939 formattedfield = ffecom_decl_field (ref, formlenfield, "formatted",
01940 string_type_node);
01941 formattedlenfield = ffecom_decl_field (ref, formattedfield,
01942 "formattedlen",
01943 ffecom_f2c_ftnlen_type_node);
01944 unformattedfield = ffecom_decl_field (ref, formattedlenfield,
01945 "unformatted",
01946 string_type_node);
01947 unformattedlenfield = ffecom_decl_field (ref, unformattedfield,
01948 "unformattedlen",
01949 ffecom_f2c_ftnlen_type_node);
01950 reclfield = ffecom_decl_field (ref, unformattedlenfield, "recl",
01951 ffecom_f2c_ptr_to_ftnint_type_node);
01952 nextrecfield = ffecom_decl_field (ref, reclfield, "nextrec",
01953 ffecom_f2c_ptr_to_ftnint_type_node);
01954 blankfield = ffecom_decl_field (ref, nextrecfield, "blank",
01955 string_type_node);
01956 blanklenfield = ffecom_decl_field (ref, blankfield, "blanklen",
01957 ffecom_f2c_ftnlen_type_node);
01958
01959 TYPE_FIELDS (ref) = errfield;
01960 layout_type (ref);
01961
01962 ggc_add_tree_root (&f2c_inquire_struct, 1);
01963
01964 f2c_inquire_struct = ref;
01965 }
01966
01967
01968
01969
01970 ffeste_f2c_init_flag_ (have_err, errinit);
01971 ffeste_f2c_init_int_ (unitexp, unitinit, unit_spec);
01972 ffeste_f2c_init_char_ (fileexp, fileinit, filelenexp, fileleninit,
01973 file_spec);
01974 ffeste_f2c_init_ptrtoint_ (existexp, existinit, exist_spec);
01975 ffeste_f2c_init_ptrtoint_ (openexp, openinit, open_spec);
01976 ffeste_f2c_init_ptrtoint_ (numberexp, numberinit, number_spec);
01977 ffeste_f2c_init_ptrtoint_ (namedexp, namedinit, named_spec);
01978 ffeste_f2c_init_char_ (nameexp, nameinit, namelenexp, nameleninit,
01979 name_spec);
01980 ffeste_f2c_init_char_ (accessexp, accessinit, accesslenexp,
01981 accessleninit, access_spec);
01982 ffeste_f2c_init_char_ (sequentialexp, sequentialinit, sequentiallenexp,
01983 sequentialleninit, sequential_spec);
01984 ffeste_f2c_init_char_ (directexp, directinit, directlenexp,
01985 directleninit, direct_spec);
01986 ffeste_f2c_init_char_ (formexp, forminit, formlenexp, formleninit,
01987 form_spec);
01988 ffeste_f2c_init_char_ (formattedexp, formattedinit,
01989 formattedlenexp, formattedleninit, formatted_spec);
01990 ffeste_f2c_init_char_ (unformattedexp, unformattedinit, unformattedlenexp,
01991 unformattedleninit, unformatted_spec);
01992 ffeste_f2c_init_ptrtoint_ (reclexp, reclinit, recl_spec);
01993 ffeste_f2c_init_ptrtoint_ (nextrecexp, nextrecinit, nextrec_spec);
01994 ffeste_f2c_init_char_ (blankexp, blankinit, blanklenexp,
01995 blankleninit, blank_spec);
01996
01997 inits = build_tree_list ((field = TYPE_FIELDS (f2c_inquire_struct)),
01998 errinit);
01999 initn = inits;
02000 ffeste_f2c_init_next_ (unitinit);
02001 ffeste_f2c_init_next_ (fileinit);
02002 ffeste_f2c_init_next_ (fileleninit);
02003 ffeste_f2c_init_next_ (existinit);
02004 ffeste_f2c_init_next_ (openinit);
02005 ffeste_f2c_init_next_ (numberinit);
02006 ffeste_f2c_init_next_ (namedinit);
02007 ffeste_f2c_init_next_ (nameinit);
02008 ffeste_f2c_init_next_ (nameleninit);
02009 ffeste_f2c_init_next_ (accessinit);
02010 ffeste_f2c_init_next_ (accessleninit);
02011 ffeste_f2c_init_next_ (sequentialinit);
02012 ffeste_f2c_init_next_ (sequentialleninit);
02013 ffeste_f2c_init_next_ (directinit);
02014 ffeste_f2c_init_next_ (directleninit);
02015 ffeste_f2c_init_next_ (forminit);
02016 ffeste_f2c_init_next_ (formleninit);
02017 ffeste_f2c_init_next_ (formattedinit);
02018 ffeste_f2c_init_next_ (formattedleninit);
02019 ffeste_f2c_init_next_ (unformattedinit);
02020 ffeste_f2c_init_next_ (unformattedleninit);
02021 ffeste_f2c_init_next_ (reclinit);
02022 ffeste_f2c_init_next_ (nextrecinit);
02023 ffeste_f2c_init_next_ (blankinit);
02024 ffeste_f2c_init_next_ (blankleninit);
02025
02026 inits = build (CONSTRUCTOR, f2c_inquire_struct, NULL_TREE, inits);
02027 TREE_CONSTANT (inits) = constantp ? 1 : 0;
02028 TREE_STATIC (inits) = 1;
02029
02030 t = build_decl (VAR_DECL,
02031 ffecom_get_invented_identifier ("__g77_inlist_%d",
02032 mynumber++),
02033 f2c_inquire_struct);
02034 TREE_STATIC (t) = 1;
02035 t = ffecom_start_decl (t, 1);
02036 ffecom_finish_decl (t, inits, 0);
02037
02038
02039
02040 ffeste_f2c_prepare_int_ (unit_spec, unitexp);
02041 ffeste_f2c_prepare_char_ (file_spec, fileexp);
02042 ffeste_f2c_prepare_ptrtoint_ (exist_spec, existexp);
02043 ffeste_f2c_prepare_ptrtoint_ (open_spec, openexp);
02044 ffeste_f2c_prepare_ptrtoint_ (number_spec, numberexp);
02045 ffeste_f2c_prepare_ptrtoint_ (named_spec, namedexp);
02046 ffeste_f2c_prepare_char_ (name_spec, nameexp);
02047 ffeste_f2c_prepare_char_ (access_spec, accessexp);
02048 ffeste_f2c_prepare_char_ (sequential_spec, sequentialexp);
02049 ffeste_f2c_prepare_char_ (direct_spec, directexp);
02050 ffeste_f2c_prepare_char_ (form_spec, formexp);
02051 ffeste_f2c_prepare_char_ (formatted_spec, formattedexp);
02052 ffeste_f2c_prepare_char_ (unformatted_spec, unformattedexp);
02053 ffeste_f2c_prepare_ptrtoint_ (recl_spec, reclexp);
02054 ffeste_f2c_prepare_ptrtoint_ (nextrec_spec, nextrecexp);
02055 ffeste_f2c_prepare_char_ (blank_spec, blankexp);
02056
02057 ffecom_prepare_end ();
02058
02059
02060
02061 ffeste_f2c_compile_int_ (unitfield, unit_spec, unitexp);
02062 ffeste_f2c_compile_char_ (filefield, filelenfield, file_spec,
02063 fileexp, filelenexp);
02064 ffeste_f2c_compile_ptrtoint_ (existfield, exist_spec, existexp);
02065 ffeste_f2c_compile_ptrtoint_ (openfield, open_spec, openexp);
02066 ffeste_f2c_compile_ptrtoint_ (numberfield, number_spec, numberexp);
02067 ffeste_f2c_compile_ptrtoint_ (namedfield, named_spec, namedexp);
02068 ffeste_f2c_compile_char_ (namefield, namelenfield, name_spec, nameexp,
02069 namelenexp);
02070 ffeste_f2c_compile_char_ (accessfield, accesslenfield, access_spec,
02071 accessexp, accesslenexp);
02072 ffeste_f2c_compile_char_ (sequentialfield, sequentiallenfield,
02073 sequential_spec, sequentialexp,
02074 sequentiallenexp);
02075 ffeste_f2c_compile_char_ (directfield, directlenfield, direct_spec,
02076 directexp, directlenexp);
02077 ffeste_f2c_compile_char_ (formfield, formlenfield, form_spec, formexp,
02078 formlenexp);
02079 ffeste_f2c_compile_char_ (formattedfield, formattedlenfield, formatted_spec,
02080 formattedexp, formattedlenexp);
02081 ffeste_f2c_compile_char_ (unformattedfield, unformattedlenfield,
02082 unformatted_spec, unformattedexp,
02083 unformattedlenexp);
02084 ffeste_f2c_compile_ptrtoint_ (reclfield, recl_spec, reclexp);
02085 ffeste_f2c_compile_ptrtoint_ (nextrecfield, nextrec_spec, nextrecexp);
02086 ffeste_f2c_compile_char_ (blankfield, blanklenfield, blank_spec, blankexp,
02087 blanklenexp);
02088
02089 ttype = build_pointer_type (TREE_TYPE (t));
02090 t = ffecom_1 (ADDR_EXPR, ttype, t);
02091
02092 t = build_tree_list (NULL_TREE, t);
02093
02094 return t;
02095 }
02096
02097
02098
02099
02100
02101
02102
02103
02104
02105
02106
02107
02108
02109
02110
02111
02112 static tree
02113 ffeste_io_olist_ (bool have_err,
02114 ffebld unit_expr,
02115 ffestpFile *file_spec,
02116 ffestpFile *stat_spec,
02117 ffestpFile *access_spec,
02118 ffestpFile *form_spec,
02119 ffestpFile *recl_spec,
02120 ffestpFile *blank_spec)
02121 {
02122 static tree f2c_open_struct = NULL_TREE;
02123 tree t;
02124 tree ttype;
02125 tree field;
02126 tree inits, initn;
02127 tree ignore;
02128 bool constantp = TRUE;
02129 static tree errfield, unitfield, filefield, filelenfield, statfield,
02130 accessfield, formfield, reclfield, blankfield;
02131 tree errinit, unitinit, fileinit, fileleninit, statinit, accessinit,
02132 forminit, reclinit, blankinit;
02133 tree
02134 unitexp, fileexp, filelenexp, statexp, accessexp, formexp, reclexp,
02135 blankexp;
02136 static int mynumber = 0;
02137
02138 if (f2c_open_struct == NULL_TREE)
02139 {
02140 tree ref;
02141
02142 ref = make_node (RECORD_TYPE);
02143
02144 errfield = ffecom_decl_field (ref, NULL_TREE, "err",
02145 ffecom_f2c_flag_type_node);
02146 unitfield = ffecom_decl_field (ref, errfield, "unit",
02147 ffecom_f2c_ftnint_type_node);
02148 filefield = ffecom_decl_field (ref, unitfield, "file",
02149 string_type_node);
02150 filelenfield = ffecom_decl_field (ref, filefield, "filelen",
02151 ffecom_f2c_ftnlen_type_node);
02152 statfield = ffecom_decl_field (ref, filelenfield, "stat",
02153 string_type_node);
02154 accessfield = ffecom_decl_field (ref, statfield, "access",
02155 string_type_node);
02156 formfield = ffecom_decl_field (ref, accessfield, "form",
02157 string_type_node);
02158 reclfield = ffecom_decl_field (ref, formfield, "recl",
02159 ffecom_f2c_ftnint_type_node);
02160 blankfield = ffecom_decl_field (ref, reclfield, "blank",
02161 string_type_node);
02162
02163 TYPE_FIELDS (ref) = errfield;
02164 layout_type (ref);
02165
02166 ggc_add_tree_root (&f2c_open_struct, 1);
02167
02168 f2c_open_struct = ref;
02169 }
02170
02171
02172
02173
02174 ffeste_f2c_init_flag_ (have_err, errinit);
02175
02176 unitexp = ffecom_const_expr (unit_expr);
02177 if (unitexp)
02178 unitinit = unitexp;
02179 else
02180 {
02181 unitinit = ffecom_integer_zero_node;
02182 constantp = FALSE;
02183 }
02184
02185 ffeste_f2c_init_char_ (fileexp, fileinit, filelenexp, fileleninit,
02186 file_spec);
02187 ffeste_f2c_init_charnolen_ (statexp, statinit, stat_spec);
02188 ffeste_f2c_init_charnolen_ (accessexp, accessinit, access_spec);
02189 ffeste_f2c_init_charnolen_ (formexp, forminit, form_spec);
02190 ffeste_f2c_init_int_ (reclexp, reclinit, recl_spec);
02191 ffeste_f2c_init_charnolen_ (blankexp, blankinit, blank_spec);
02192
02193 inits = build_tree_list ((field = TYPE_FIELDS (f2c_open_struct)), errinit);
02194 initn = inits;
02195 ffeste_f2c_init_next_ (unitinit);
02196 ffeste_f2c_init_next_ (fileinit);
02197 ffeste_f2c_init_next_ (fileleninit);
02198 ffeste_f2c_init_next_ (statinit);
02199 ffeste_f2c_init_next_ (accessinit);
02200 ffeste_f2c_init_next_ (forminit);
02201 ffeste_f2c_init_next_ (reclinit);
02202 ffeste_f2c_init_next_ (blankinit);
02203
02204 inits = build (CONSTRUCTOR, f2c_open_struct, NULL_TREE, inits);
02205 TREE_CONSTANT (inits) = constantp ? 1 : 0;
02206 TREE_STATIC (inits) = 1;
02207
02208 t = build_decl (VAR_DECL,
02209 ffecom_get_invented_identifier ("__g77_olist_%d",
02210 mynumber++),
02211 f2c_open_struct);
02212 TREE_STATIC (t) = 1;
02213 t = ffecom_start_decl (t, 1);
02214 ffecom_finish_decl (t, inits, 0);
02215
02216
02217
02218 if (! unitexp)
02219 ffecom_prepare_expr (unit_expr);
02220
02221 ffeste_f2c_prepare_char_ (file_spec, fileexp);
02222 ffeste_f2c_prepare_charnolen_ (stat_spec, statexp);
02223 ffeste_f2c_prepare_charnolen_ (access_spec, accessexp);
02224 ffeste_f2c_prepare_charnolen_ (form_spec, formexp);
02225 ffeste_f2c_prepare_int_ (recl_spec, reclexp);
02226 ffeste_f2c_prepare_charnolen_ (blank_spec, blankexp);
02227
02228 ffecom_prepare_end ();
02229
02230
02231
02232 if (! unitexp)
02233 {
02234 unitexp = ffecom_expr (unit_expr);
02235 ffeste_f2c_compile_ (unitfield, unitexp);
02236 }
02237
02238 ffeste_f2c_compile_char_ (filefield, filelenfield, file_spec, fileexp,
02239 filelenexp);
02240 ffeste_f2c_compile_charnolen_ (statfield, stat_spec, statexp);
02241 ffeste_f2c_compile_charnolen_ (accessfield, access_spec, accessexp);
02242 ffeste_f2c_compile_charnolen_ (formfield, form_spec, formexp);
02243 ffeste_f2c_compile_int_ (reclfield, recl_spec, reclexp);
02244 ffeste_f2c_compile_charnolen_ (blankfield, blank_spec, blankexp);
02245
02246 ttype = build_pointer_type (TREE_TYPE (t));
02247 t = ffecom_1 (ADDR_EXPR, ttype, t);
02248
02249 t = build_tree_list (NULL_TREE, t);
02250
02251 return t;
02252 }
02253
02254
02255
02256 static void
02257 ffeste_subr_beru_ (ffestpBeruStmt *info, ffecomGfrt rt)
02258 {
02259 tree alist;
02260 bool iostat;
02261 bool errl;
02262
02263 ffeste_emit_line_note_ ();
02264
02265 #define specified(something) (info->beru_spec[something].kw_or_val_present)
02266
02267 iostat = specified (FFESTP_beruixIOSTAT);
02268 errl = specified (FFESTP_beruixERR);
02269
02270 #undef specified
02271
02272
02273
02274
02275
02276
02277
02278
02279
02280
02281
02282 ffeste_start_stmt_ ();
02283
02284 if (errl)
02285 {
02286
02287
02288 ffeste_io_err_
02289 = ffeste_io_abort_
02290 = ffecom_lookup_label
02291 (info->beru_spec[FFESTP_beruixERR].u.label);
02292 ffeste_io_abort_is_temp_ = FALSE;
02293 }
02294 else
02295 {
02296
02297
02298 ffeste_io_err_ = NULL_TREE;
02299
02300 if ((ffeste_io_abort_is_temp_ = iostat))
02301 ffeste_io_abort_ = ffecom_temp_label ();
02302 else
02303 ffeste_io_abort_ = NULL_TREE;
02304 }
02305
02306 if (iostat)
02307 {
02308
02309
02310 ffeste_io_iostat_is_temp_ = FALSE;
02311 ffeste_io_iostat_ = ffecom_expr
02312 (info->beru_spec[FFESTP_beruixIOSTAT].u.expr);
02313 }
02314 else if (ffeste_io_abort_ != NULL_TREE)
02315 {
02316
02317
02318 ffeste_io_iostat_is_temp_ = TRUE;
02319 ffeste_io_iostat_
02320 = ffecom_make_tempvar ("beru", ffecom_integer_type_node,
02321 FFETARGET_charactersizeNONE, -1);
02322 }
02323 else
02324 {
02325
02326
02327 ffeste_io_iostat_is_temp_ = FALSE;
02328 ffeste_io_iostat_ = NULL_TREE;
02329 }
02330
02331
02332
02333 alist = ffeste_io_ialist_ (errl || iostat, FFESTV_unitINTEXPR,
02334 info->beru_spec[FFESTP_beruixUNIT].u.expr, 6);
02335
02336
02337
02338
02339 ffeste_io_call_ (ffecom_call_gfrt (rt, alist, NULL_TREE),
02340 ! ffeste_io_abort_is_temp_);
02341
02342
02343
02344 if (ffeste_io_abort_is_temp_)
02345 {
02346 DECL_INITIAL (ffeste_io_abort_) = error_mark_node;
02347 emit_nop ();
02348 expand_label (ffeste_io_abort_);
02349
02350 assert (ffeste_io_err_ == NULL_TREE);
02351 }
02352
02353 ffeste_end_stmt_ ();
02354 }
02355
02356
02357
02358
02359
02360
02361
02362
02363 void
02364 ffeste_do (ffestw block)
02365 {
02366 ffeste_emit_line_note_ ();
02367
02368 if (ffestw_do_tvar (block) == 0)
02369 {
02370 expand_end_loop ();
02371
02372 ffeste_end_block_ (block);
02373 }
02374 else
02375 ffeste_end_iterdo_ (block,
02376 ffestw_do_tvar (block),
02377 ffestw_do_incr_saved (block),
02378 ffestw_do_count_var (block));
02379 }
02380
02381
02382
02383
02384
02385 void
02386 ffeste_end_R807 ()
02387 {
02388 ffeste_emit_line_note_ ();
02389
02390 expand_end_cond ();
02391
02392 ffeste_end_block_ (NULL);
02393 }
02394
02395
02396
02397 void
02398 ffeste_labeldef_branch (ffelab label)
02399 {
02400 tree glabel;
02401
02402 glabel = ffecom_lookup_label (label);
02403 assert (glabel != NULL_TREE);
02404 if (TREE_CODE (glabel) == ERROR_MARK)
02405 return;
02406
02407 assert (DECL_INITIAL (glabel) == NULL_TREE);
02408
02409 DECL_INITIAL (glabel) = error_mark_node;
02410 DECL_SOURCE_FILE (glabel) = ffelab_definition_filename (label);
02411 DECL_SOURCE_LINE (glabel) = ffelab_definition_filelinenum (label);
02412
02413 emit_nop ();
02414
02415 expand_label (glabel);
02416 }
02417
02418
02419
02420 void
02421 ffeste_labeldef_format (ffelab label)
02422 {
02423 ffeste_label_formatdef_ = label;
02424 }
02425
02426
02427
02428 void
02429 ffeste_R737A (ffebld dest, ffebld source)
02430 {
02431 ffeste_check_simple_ ();
02432
02433 ffeste_emit_line_note_ ();
02434
02435 ffeste_start_stmt_ ();
02436
02437 ffecom_expand_let_stmt (dest, source);
02438
02439 ffeste_end_stmt_ ();
02440 }
02441
02442
02443
02444 void
02445 ffeste_R803 (ffestw block, ffebld expr)
02446 {
02447 tree temp;
02448
02449 ffeste_check_simple_ ();
02450
02451 ffeste_emit_line_note_ ();
02452
02453 ffeste_start_block_ (block);
02454
02455 temp = ffecom_make_tempvar ("ifthen", integer_type_node,
02456 FFETARGET_charactersizeNONE, -1);
02457
02458 ffeste_start_stmt_ ();
02459
02460 ffecom_prepare_expr (expr);
02461
02462 if (ffecom_prepare_end ())
02463 {
02464 tree result;
02465
02466 result = ffecom_modify (void_type_node,
02467 temp,
02468 ffecom_truth_value (ffecom_expr (expr)));
02469
02470 expand_expr_stmt (result);
02471
02472 ffeste_end_stmt_ ();
02473 }
02474 else
02475 {
02476 ffeste_end_stmt_ ();
02477
02478 temp = ffecom_truth_value (ffecom_expr (expr));
02479 }
02480
02481 expand_start_cond (temp, 0);
02482
02483
02484 ffestw_set_ifthen_fake_else (block, 0);
02485 }
02486
02487
02488
02489 void
02490 ffeste_R804 (ffestw block, ffebld expr)
02491 {
02492 tree temp;
02493
02494 ffeste_check_simple_ ();
02495
02496 ffeste_emit_line_note_ ();
02497
02498
02499
02500
02501 expand_start_else ();
02502
02503 ffeste_start_block_ (block);
02504
02505 temp = ffecom_make_tempvar ("elseif", integer_type_node,
02506 FFETARGET_charactersizeNONE, -1);
02507
02508 ffeste_start_stmt_ ();
02509
02510 ffecom_prepare_expr (expr);
02511
02512 if (ffecom_prepare_end ())
02513 {
02514 tree result;
02515
02516 result = ffecom_modify (void_type_node,
02517 temp,
02518 ffecom_truth_value (ffecom_expr (expr)));
02519
02520 expand_expr_stmt (result);
02521
02522 ffeste_end_stmt_ ();
02523 }
02524 else
02525 {
02526
02527
02528
02529
02530
02531
02532 ffeste_end_stmt_ ();
02533
02534 temp = ffecom_truth_value (ffecom_expr (expr));
02535 }
02536
02537 expand_start_cond (temp, 0);
02538
02539
02540 ffestw_set_ifthen_fake_else (block,
02541 ffestw_ifthen_fake_else (block) + 1);
02542 }
02543
02544
02545
02546 void
02547 ffeste_R805 (ffestw block UNUSED)
02548 {
02549 ffeste_check_simple_ ();
02550
02551 ffeste_emit_line_note_ ();
02552
02553 expand_start_else ();
02554 }
02555
02556
02557
02558 void
02559 ffeste_R806 (ffestw block)
02560 {
02561 int i = ffestw_ifthen_fake_else (block) + 1;
02562
02563 ffeste_emit_line_note_ ();
02564
02565 for (; i; --i)
02566 {
02567 expand_end_cond ();
02568
02569 ffeste_end_block_ (block);
02570 }
02571 }
02572
02573
02574
02575 void
02576 ffeste_R807 (ffebld expr)
02577 {
02578 tree temp;
02579
02580 ffeste_check_simple_ ();
02581
02582 ffeste_emit_line_note_ ();
02583
02584 ffeste_start_block_ (NULL);
02585
02586 temp = ffecom_make_tempvar ("if", integer_type_node,
02587 FFETARGET_charactersizeNONE, -1);
02588
02589 ffeste_start_stmt_ ();
02590
02591 ffecom_prepare_expr (expr);
02592
02593 if (ffecom_prepare_end ())
02594 {
02595 tree result;
02596
02597 result = ffecom_modify (void_type_node,
02598 temp,
02599 ffecom_truth_value (ffecom_expr (expr)));
02600
02601 expand_expr_stmt (result);
02602
02603 ffeste_end_stmt_ ();
02604 }
02605 else
02606 {
02607 ffeste_end_stmt_ ();
02608
02609 temp = ffecom_truth_value (ffecom_expr (expr));
02610 }
02611
02612 expand_start_cond (temp, 0);
02613 }
02614
02615
02616
02617 void
02618 ffeste_R809 (ffestw block, ffebld expr)
02619 {
02620 ffeste_check_simple_ ();
02621
02622 ffeste_emit_line_note_ ();
02623
02624 ffeste_start_block_ (block);
02625
02626 if ((expr == NULL)
02627 || (ffeinfo_basictype (ffebld_info (expr))
02628 == FFEINFO_basictypeANY))
02629 ffestw_set_select_texpr (block, error_mark_node);
02630 else if (ffeinfo_basictype (ffebld_info (expr))
02631 == FFEINFO_basictypeCHARACTER)
02632 {
02633
02634
02635
02636 ffebad_start_msg ("SELECT CASE on CHARACTER type (at %0) not supported -- sorry",
02637 FFEBAD_severityFATAL);
02638 ffebad_here (0, ffestw_line (block), ffestw_col (block));
02639 ffebad_finish ();
02640 ffestw_set_select_texpr (block, error_mark_node);
02641 }
02642 else
02643 {
02644 tree result;
02645 tree texpr;
02646
02647 result = ffecom_make_tempvar ("select", ffecom_type_expr (expr),
02648 ffeinfo_size (ffebld_info (expr)),
02649 -1);
02650
02651 ffeste_start_stmt_ ();
02652
02653 ffecom_prepare_expr (expr);
02654
02655 ffecom_prepare_end ();
02656
02657 texpr = ffecom_expr (expr);
02658
02659 assert (TYPE_MAIN_VARIANT (TREE_TYPE (texpr))
02660 == TYPE_MAIN_VARIANT (TREE_TYPE (result)));
02661
02662 texpr = ffecom_modify (void_type_node,
02663 result,
02664 texpr);
02665 expand_expr_stmt (texpr);
02666
02667 ffeste_end_stmt_ ();
02668
02669 expand_start_case (1, result, TREE_TYPE (result),
02670 "SELECT CASE statement");
02671 ffestw_set_select_texpr (block, texpr);
02672 ffestw_set_select_break (block, FALSE);
02673 }
02674 }
02675
02676
02677
02678
02679
02680
02681
02682 void
02683 ffeste_R810 (ffestw block, unsigned long casenum)
02684 {
02685 ffestwSelect s = ffestw_select (block);
02686 ffestwCase c;
02687 tree texprlow;
02688 tree texprhigh;
02689 tree tlabel;
02690 int pushok;
02691 tree duplicate;
02692
02693 ffeste_check_simple_ ();
02694
02695 if (s->first_stmt == (ffestwCase) &s->first_rel)
02696 c = NULL;
02697 else
02698 c = s->first_stmt;
02699
02700 ffeste_emit_line_note_ ();
02701
02702 if (ffestw_select_texpr (block) == error_mark_node)
02703 return;
02704
02705
02706
02707 tlabel = build_decl (LABEL_DECL, NULL_TREE, NULL_TREE);
02708
02709 if (ffestw_select_break (block))
02710 expand_exit_something ();
02711 else
02712 ffestw_set_select_break (block, TRUE);
02713
02714 if ((c == NULL) || (casenum != c->casenum))
02715 {
02716 if (casenum == 0)
02717 {
02718 pushok = pushcase (NULL_TREE, 0, tlabel, &duplicate);
02719 assert (pushok == 0);
02720 }
02721 }
02722 else
02723 do
02724 {
02725 texprlow = (c->low == NULL) ? NULL_TREE
02726 : ffecom_constantunion (&ffebld_constant_union (c->low), s->type,
02727 s->kindtype,
02728 ffecom_tree_type[s->type][s->kindtype]);
02729 if (c->low != c->high)
02730 {
02731 texprhigh = (c->high == NULL) ? NULL_TREE
02732 : ffecom_constantunion (&ffebld_constant_union (c->high),
02733 s->type, s->kindtype,
02734 ffecom_tree_type[s->type][s->kindtype]);
02735 pushok = pushcase_range (texprlow, texprhigh, convert,
02736 tlabel, &duplicate);
02737 }
02738 else
02739 pushok = pushcase (texprlow, convert, tlabel, &duplicate);
02740 assert (pushok == 0);
02741 c = c->next_stmt;
02742
02743 c->previous_stmt->previous_stmt->next_stmt = c;
02744 c->previous_stmt = c->previous_stmt->previous_stmt;
02745 }
02746 while ((c != (ffestwCase) &s->first_rel) && (casenum == c->casenum));
02747 }
02748
02749
02750
02751 void
02752 ffeste_R811 (ffestw block)
02753 {
02754 ffeste_emit_line_note_ ();
02755
02756
02757
02758 if (TREE_CODE (ffestw_select_texpr (block)) != ERROR_MARK)
02759 expand_end_case (ffestw_select_texpr (block));
02760
02761 ffeste_end_block_ (block);
02762 }
02763
02764
02765
02766 void
02767 ffeste_R819A (ffestw block, ffelab label UNUSED, ffebld var,
02768 ffebld start, ffelexToken start_token,
02769 ffebld end, ffelexToken end_token,
02770 ffebld incr, ffelexToken incr_token)
02771 {
02772 ffeste_check_simple_ ();
02773
02774 ffeste_emit_line_note_ ();
02775
02776 ffeste_begin_iterdo_ (block, NULL, NULL, NULL,
02777 var,
02778 start, start_token,
02779 end, end_token,
02780 incr, incr_token,
02781 "Iterative DO loop");
02782 }
02783
02784
02785
02786 void
02787 ffeste_R819B (ffestw block, ffelab label UNUSED, ffebld expr)
02788 {
02789 tree result;
02790
02791 ffeste_check_simple_ ();
02792
02793 ffeste_emit_line_note_ ();
02794
02795 ffeste_start_block_ (block);
02796
02797 if (expr)
02798 {
02799 struct nesting *loop;
02800 tree mod;
02801
02802 result = ffecom_make_tempvar ("dowhile", integer_type_node,
02803 FFETARGET_charactersizeNONE, -1);
02804 loop = expand_start_loop (1);
02805
02806 ffeste_start_stmt_ ();
02807
02808 ffecom_prepare_expr (expr);
02809
02810 ffecom_prepare_end ();
02811
02812 mod = ffecom_modify (void_type_node,
02813 result,
02814 ffecom_truth_value (ffecom_expr (expr)));
02815 expand_expr_stmt (mod);
02816
02817 ffeste_end_stmt_ ();
02818
02819 ffestw_set_do_hook (block, loop);
02820 expand_exit_loop_top_cond (0, result);
02821 }
02822 else
02823 ffestw_set_do_hook (block, expand_start_loop (1));
02824
02825 ffestw_set_do_tvar (block, NULL_TREE);
02826 }
02827
02828
02829
02830
02831
02832
02833
02834
02835
02836 void
02837 ffeste_R825 ()
02838 {
02839 ffeste_check_simple_ ();
02840
02841 ffeste_emit_line_note_ ();
02842
02843 emit_nop ();
02844 }
02845
02846
02847
02848 void
02849 ffeste_R834 (ffestw block)
02850 {
02851 ffeste_check_simple_ ();
02852
02853 ffeste_emit_line_note_ ();
02854
02855 expand_continue_loop (ffestw_do_hook (block));
02856 }
02857
02858
02859
02860 void
02861 ffeste_R835 (ffestw block)
02862 {
02863 ffeste_check_simple_ ();
02864
02865 ffeste_emit_line_note_ ();
02866
02867 expand_exit_loop (ffestw_do_hook (block));
02868 }
02869
02870
02871
02872 void
02873 ffeste_R836 (ffelab label)
02874 {
02875 tree glabel;
02876
02877 ffeste_check_simple_ ();
02878
02879 ffeste_emit_line_note_ ();
02880
02881 glabel = ffecom_lookup_label (label);
02882 if ((glabel != NULL_TREE)
02883 && (TREE_CODE (glabel) != ERROR_MARK))
02884 {
02885 expand_goto (glabel);
02886 TREE_USED (glabel) = 1;
02887 }
02888 }
02889
02890
02891
02892 void
02893 ffeste_R837 (ffelab *labels, int count, ffebld expr)
02894 {
02895 int i;
02896 tree texpr;
02897 tree value;
02898 tree tlabel;
02899 int pushok;
02900 tree duplicate;
02901
02902 ffeste_check_simple_ ();
02903
02904 ffeste_emit_line_note_ ();
02905
02906 ffeste_start_stmt_ ();
02907
02908 ffecom_prepare_expr (expr);
02909
02910 ffecom_prepare_end ();
02911
02912 texpr = ffecom_expr (expr);
02913
02914 expand_start_case (0, texpr, TREE_TYPE (texpr), "computed GOTO statement");
02915
02916 for (i = 0; i < count; ++i)
02917 {
02918 value = build_int_2 (i + 1, 0);
02919 tlabel = build_decl (LABEL_DECL, NULL_TREE, NULL_TREE);
02920
02921 pushok = pushcase (value, convert, tlabel, &duplicate);
02922 assert (pushok == 0);
02923
02924 tlabel = ffecom_lookup_label (labels[i]);
02925 if ((tlabel == NULL_TREE)
02926 || (TREE_CODE (tlabel) == ERROR_MARK))
02927 continue;
02928
02929 expand_goto (tlabel);
02930 TREE_USED (tlabel) = 1;
02931 }
02932 expand_end_case (texpr);
02933
02934 ffeste_end_stmt_ ();
02935 }
02936
02937
02938
02939 void
02940 ffeste_R838 (ffelab label, ffebld target)
02941 {
02942 tree expr_tree;
02943 tree label_tree;
02944 tree target_tree;
02945
02946 ffeste_check_simple_ ();
02947
02948 ffeste_emit_line_note_ ();
02949
02950
02951
02952
02953 label_tree = ffecom_lookup_label (label);
02954 if ((label_tree != NULL_TREE)
02955 && (TREE_CODE (label_tree) != ERROR_MARK))
02956 {
02957 label_tree = ffecom_1 (ADDR_EXPR,
02958 build_pointer_type (void_type_node),
02959 label_tree);
02960 TREE_CONSTANT (label_tree) = 1;
02961
02962 target_tree = ffecom_expr_assign_w (target);
02963 if (GET_MODE_SIZE (TYPE_MODE (TREE_TYPE (target_tree)))
02964 < GET_MODE_SIZE (TYPE_MODE (TREE_TYPE (label_tree))))
02965 error ("ASSIGN to variable that is too small");
02966
02967 label_tree = convert (TREE_TYPE (target_tree), label_tree);
02968
02969 expr_tree = ffecom_modify (void_type_node,
02970 target_tree,
02971 label_tree);
02972 expand_expr_stmt (expr_tree);
02973 }
02974 }
02975
02976
02977
02978 void
02979 ffeste_R839 (ffebld target)
02980 {
02981 tree t;
02982
02983 ffeste_check_simple_ ();
02984
02985 ffeste_emit_line_note_ ();
02986
02987
02988
02989
02990 t = ffecom_expr_assign (target);
02991 if (GET_MODE_SIZE (TYPE_MODE (TREE_TYPE (t)))
02992 < GET_MODE_SIZE (TYPE_MODE (TREE_TYPE (null_pointer_node))))
02993 error ("ASSIGNed GOTO target variable is too small");
02994
02995 expand_computed_goto (convert (TREE_TYPE (null_pointer_node), t));
02996 }
02997
02998
02999
03000 void
03001 ffeste_R840 (ffebld expr, ffelab neg, ffelab zero, ffelab pos)
03002 {
03003 tree gneg = ffecom_lookup_label (neg);
03004 tree gzero = ffecom_lookup_label (zero);
03005 tree gpos = ffecom_lookup_label (pos);
03006 tree texpr;
03007
03008 ffeste_check_simple_ ();
03009
03010 ffeste_emit_line_note_ ();
03011
03012 if ((gneg == NULL_TREE) || (gzero == NULL_TREE) || (gpos == NULL_TREE))
03013 return;
03014 if ((TREE_CODE (gneg) == ERROR_MARK)
03015 || (TREE_CODE (gzero) == ERROR_MARK)
03016 || (TREE_CODE (gpos) == ERROR_MARK))
03017 return;
03018
03019 ffeste_start_stmt_ ();
03020
03021 ffecom_prepare_expr (expr);
03022
03023 ffecom_prepare_end ();
03024
03025 if (neg == zero)
03026 {
03027 if (neg == pos)
03028 expand_goto (gzero);
03029 else
03030 {
03031
03032 texpr = ffecom_expr (expr);
03033 texpr = ffecom_2 (LE_EXPR, integer_type_node,
03034 texpr,
03035 convert (TREE_TYPE (texpr),
03036 integer_zero_node));
03037 expand_start_cond (ffecom_truth_value (texpr), 0);
03038 expand_goto (gzero);
03039 expand_start_else ();
03040 expand_goto (gpos);
03041 expand_end_cond ();
03042 }
03043 }
03044 else if (neg == pos)
03045 {
03046
03047 texpr = ffecom_expr (expr);
03048 texpr = ffecom_2 (NE_EXPR, integer_type_node,
03049 texpr,
03050 convert (TREE_TYPE (texpr),
03051 integer_zero_node));
03052 expand_start_cond (ffecom_truth_value (texpr), 0);
03053 expand_goto (gneg);
03054 expand_start_else ();
03055 expand_goto (gzero);
03056 expand_end_cond ();
03057 }
03058 else if (zero == pos)
03059 {
03060
03061 texpr = ffecom_expr (expr);
03062 texpr = ffecom_2 (GE_EXPR, integer_type_node,
03063 texpr,
03064 convert (TREE_TYPE (texpr),
03065 integer_zero_node));
03066 expand_start_cond (ffecom_truth_value (texpr), 0);
03067 expand_goto (gzero);
03068 expand_start_else ();
03069 expand_goto (gneg);
03070 expand_end_cond ();
03071 }
03072 else
03073 {
03074
03075
03076
03077
03078 tree expr_saved = ffecom_save_tree (ffecom_expr (expr));
03079
03080 texpr = ffecom_2 (LT_EXPR, integer_type_node,
03081 expr_saved,
03082 convert (TREE_TYPE (expr_saved),
03083 integer_zero_node));
03084 expand_start_cond (ffecom_truth_value (texpr), 0);
03085 expand_goto (gneg);
03086 texpr = ffecom_2 (GT_EXPR, integer_type_node,
03087 expr_saved,
03088 convert (TREE_TYPE (expr_saved),
03089 integer_zero_node));
03090 expand_start_elseif (ffecom_truth_value (texpr));
03091 expand_goto (gpos);
03092 expand_start_else ();
03093 expand_goto (gzero);
03094 expand_end_cond ();
03095 }
03096
03097 ffeste_end_stmt_ ();
03098 }
03099
03100
03101
03102 void
03103 ffeste_R841 ()
03104 {
03105 ffeste_check_simple_ ();
03106
03107 ffeste_emit_line_note_ ();
03108
03109 emit_nop ();
03110 }
03111
03112
03113
03114 void
03115 ffeste_R842 (ffebld expr)
03116 {
03117 tree callit;
03118 ffelexToken msg;
03119
03120 ffeste_check_simple_ ();
03121
03122 ffeste_emit_line_note_ ();
03123
03124 if ((expr == NULL)
03125 || (ffeinfo_basictype (ffebld_info (expr))
03126 == FFEINFO_basictypeANY))
03127 {
03128 msg = ffelex_token_new_character ("",
03129 ffelex_token_where_line (ffesta_tokens[0]),
03130 ffelex_token_where_column (ffesta_tokens[0]));
03131 expr = ffebld_new_conter (ffebld_constant_new_characterdefault
03132 (msg));
03133 ffelex_token_kill (msg);
03134 ffebld_set_info (expr, ffeinfo_new (FFEINFO_basictypeCHARACTER,
03135 FFEINFO_kindtypeCHARACTERDEFAULT,
03136 0, FFEINFO_kindENTITY,
03137 FFEINFO_whereCONSTANT, 0));
03138 }
03139 else if (ffeinfo_basictype (ffebld_info (expr))
03140 == FFEINFO_basictypeINTEGER)
03141 {
03142 char num[50];
03143
03144 assert (ffebld_op (expr) == FFEBLD_opCONTER);
03145 assert (ffeinfo_kindtype (ffebld_info (expr))
03146 == FFEINFO_kindtypeINTEGERDEFAULT);
03147 sprintf (num, "%" ffetargetIntegerDefault_f "d",
03148 ffebld_constant_integer1 (ffebld_conter (expr)));
03149 msg = ffelex_token_new_character (num,
03150 ffelex_token_where_line (ffesta_tokens[0]),
03151 ffelex_token_where_column (ffesta_tokens[0]));
03152 expr = ffebld_new_conter (ffebld_constant_new_characterdefault (msg));
03153 ffelex_token_kill (msg);
03154 ffebld_set_info (expr, ffeinfo_new (FFEINFO_basictypeCHARACTER,
03155 FFEINFO_kindtypeCHARACTERDEFAULT,
03156 0, FFEINFO_kindENTITY,
03157 FFEINFO_whereCONSTANT, 0));
03158 }
03159 else
03160 {
03161 assert (ffeinfo_basictype (ffebld_info (expr))
03162 == FFEINFO_basictypeCHARACTER);
03163 assert (ffebld_op (expr) == FFEBLD_opCONTER);
03164 assert (ffeinfo_kindtype (ffebld_info (expr))
03165 == FFEINFO_kindtypeCHARACTERDEFAULT);
03166 }
03167
03168
03169
03170
03171 callit = ffecom_call_gfrt (FFECOM_gfrtSTOP,
03172 ffecom_list_ptr_to_expr (ffebld_new_item (expr, NULL)),
03173 NULL_TREE);
03174 TREE_SIDE_EFFECTS (callit) = 1;
03175
03176 expand_expr_stmt (callit);
03177 }
03178
03179
03180
03181 void
03182 ffeste_R843 (ffebld expr)
03183 {
03184 tree callit;
03185 ffelexToken msg;
03186
03187 ffeste_check_simple_ ();
03188
03189 ffeste_emit_line_note_ ();
03190
03191 if ((expr == NULL)
03192 || (ffeinfo_basictype (ffebld_info (expr))
03193 == FFEINFO_basictypeANY))
03194 {
03195 msg = ffelex_token_new_character ("",
03196 ffelex_token_where_line (ffesta_tokens[0]),
03197 ffelex_token_where_column (ffesta_tokens[0]));
03198 expr = ffebld_new_conter (ffebld_constant_new_characterdefault (msg));
03199 ffelex_token_kill (msg);
03200 ffebld_set_info (expr, ffeinfo_new (FFEINFO_basictypeCHARACTER,
03201 FFEINFO_kindtypeCHARACTERDEFAULT,
03202 0, FFEINFO_kindENTITY,
03203 FFEINFO_whereCONSTANT, 0));
03204 }
03205 else if (ffeinfo_basictype (ffebld_info (expr)) == FFEINFO_basictypeINTEGER)
03206 {
03207 char num[50];
03208
03209 assert (ffebld_op (expr) == FFEBLD_opCONTER);
03210 assert (ffeinfo_kindtype (ffebld_info (expr))
03211 == FFEINFO_kindtypeINTEGERDEFAULT);
03212 sprintf (num, "%" ffetargetIntegerDefault_f "d",
03213 ffebld_constant_integer1 (ffebld_conter (expr)));
03214 msg = ffelex_token_new_character (num, ffelex_token_where_line (ffesta_tokens[0]),
03215 ffelex_token_where_column (ffesta_tokens[0]));
03216 expr = ffebld_new_conter (ffebld_constant_new_characterdefault (msg));
03217 ffelex_token_kill (msg);
03218 ffebld_set_info (expr, ffeinfo_new (FFEINFO_basictypeCHARACTER,
03219 FFEINFO_kindtypeCHARACTERDEFAULT,
03220 0, FFEINFO_kindENTITY,
03221 FFEINFO_whereCONSTANT, 0));
03222 }
03223 else
03224 {
03225 assert (ffeinfo_basictype (ffebld_info (expr))
03226 == FFEINFO_basictypeCHARACTER);
03227 assert (ffebld_op (expr) == FFEBLD_opCONTER);
03228 assert (ffeinfo_kindtype (ffebld_info (expr))
03229 == FFEINFO_kindtypeCHARACTERDEFAULT);
03230 }
03231
03232
03233
03234
03235 callit = ffecom_call_gfrt (FFECOM_gfrtPAUSE,
03236 ffecom_list_ptr_to_expr (ffebld_new_item (expr, NULL)),
03237 NULL_TREE);
03238 TREE_SIDE_EFFECTS (callit) = 1;
03239
03240 expand_expr_stmt (callit);
03241 }
03242
03243
03244
03245 void
03246 ffeste_R904 (ffestpOpenStmt *info)
03247 {
03248 tree args;
03249 bool iostat;
03250 bool errl;
03251
03252 ffeste_check_simple_ ();
03253
03254 ffeste_emit_line_note_ ();
03255
03256 #define specified(something) (info->open_spec[something].kw_or_val_present)
03257
03258 iostat = specified (FFESTP_openixIOSTAT);
03259 errl = specified (FFESTP_openixERR);
03260
03261 #undef specified
03262
03263 ffeste_start_stmt_ ();
03264
03265 if (errl)
03266 {
03267 ffeste_io_err_
03268 = ffeste_io_abort_
03269 = ffecom_lookup_label
03270 (info->open_spec[FFESTP_openixERR].u.label);
03271 ffeste_io_abort_is_temp_ = FALSE;
03272 }
03273 else
03274 {
03275 ffeste_io_err_ = NULL_TREE;
03276
03277 if ((ffeste_io_abort_is_temp_ = iostat))
03278 ffeste_io_abort_ = ffecom_temp_label ();
03279 else
03280 ffeste_io_abort_ = NULL_TREE;
03281 }
03282
03283 if (iostat)
03284 {
03285
03286
03287 ffeste_io_iostat_is_temp_ = FALSE;
03288 ffeste_io_iostat_ = ffecom_expr
03289 (info->open_spec[FFESTP_openixIOSTAT].u.expr);
03290 }
03291 else if (ffeste_io_abort_ != NULL_TREE)
03292 {
03293
03294
03295 ffeste_io_iostat_is_temp_ = TRUE;
03296 ffeste_io_iostat_
03297 = ffecom_make_tempvar ("open", ffecom_integer_type_node,
03298 FFETARGET_charactersizeNONE, -1);
03299 }
03300 else
03301 {
03302
03303
03304 ffeste_io_iostat_is_temp_ = FALSE;
03305 ffeste_io_iostat_ = NULL_TREE;
03306 }
03307
03308
03309
03310 args = ffeste_io_olist_ (errl || iostat,
03311 info->open_spec[FFESTP_openixUNIT].u.expr,
03312 &info->open_spec[FFESTP_openixFILE],
03313 &info->open_spec[FFESTP_openixSTATUS],
03314 &info->open_spec[FFESTP_openixACCESS],
03315 &info->open_spec[FFESTP_openixFORM],
03316 &info->open_spec[FFESTP_openixRECL],
03317 &info->open_spec[FFESTP_openixBLANK]);
03318
03319
03320
03321
03322 ffeste_io_call_ (ffecom_call_gfrt (FFECOM_gfrtFOPEN, args, NULL_TREE),
03323 ! ffeste_io_abort_is_temp_);
03324
03325
03326
03327 if (ffeste_io_abort_is_temp_)
03328 {
03329 DECL_INITIAL (ffeste_io_abort_) = error_mark_node;
03330 emit_nop ();
03331 expand_label (ffeste_io_abort_);
03332
03333 assert (ffeste_io_err_ == NULL_TREE);
03334 }
03335
03336 ffeste_end_stmt_ ();
03337 }
03338
03339
03340
03341 void
03342 ffeste_R907 (ffestpCloseStmt *info)
03343 {
03344 tree args;
03345 bool iostat;
03346 bool errl;
03347
03348 ffeste_check_simple_ ();
03349
03350 ffeste_emit_line_note_ ();
03351
03352 #define specified(something) (info->close_spec[something].kw_or_val_present)
03353
03354 iostat = specified (FFESTP_closeixIOSTAT);
03355 errl = specified (FFESTP_closeixERR);
03356
03357 #undef specified
03358
03359 ffeste_start_stmt_ ();
03360
03361 if (errl)
03362 {
03363 ffeste_io_err_
03364 = ffeste_io_abort_
03365 = ffecom_lookup_label
03366 (info->close_spec[FFESTP_closeixERR].u.label);
03367 ffeste_io_abort_is_temp_ = FALSE;
03368 }
03369 else
03370 {
03371 ffeste_io_err_ = NULL_TREE;
03372
03373 if ((ffeste_io_abort_is_temp_ = iostat))
03374 ffeste_io_abort_ = ffecom_temp_label ();
03375 else
03376 ffeste_io_abort_ = NULL_TREE;
03377 }
03378
03379 if (iostat)
03380 {
03381
03382
03383 ffeste_io_iostat_is_temp_ = FALSE;
03384 ffeste_io_iostat_ = ffecom_expr
03385 (info->close_spec[FFESTP_closeixIOSTAT].u.expr);
03386 }
03387 else if (ffeste_io_abort_ != NULL_TREE)
03388 {
03389
03390
03391 ffeste_io_iostat_is_temp_ = TRUE;
03392 ffeste_io_iostat_
03393 = ffecom_make_tempvar ("close", ffecom_integer_type_node,
03394 FFETARGET_charactersizeNONE, -1);
03395 }
03396 else
03397 {
03398
03399
03400 ffeste_io_iostat_is_temp_ = FALSE;
03401 ffeste_io_iostat_ = NULL_TREE;
03402 }
03403
03404
03405
03406 args = ffeste_io_cllist_ (errl || iostat,
03407 info->close_spec[FFESTP_closeixUNIT].u.expr,
03408 &info->close_spec[FFESTP_closeixSTATUS]);
03409
03410
03411
03412
03413 ffeste_io_call_ (ffecom_call_gfrt (FFECOM_gfrtFCLOS, args, NULL_TREE),
03414 ! ffeste_io_abort_is_temp_);
03415
03416
03417
03418 if (ffeste_io_abort_is_temp_)
03419 {
03420 DECL_INITIAL (ffeste_io_abort_) = error_mark_node;
03421 emit_nop ();
03422 expand_label (ffeste_io_abort_);
03423
03424 assert (ffeste_io_err_ == NULL_TREE);
03425 }
03426
03427 ffeste_end_stmt_ ();
03428 }
03429
03430
03431
03432 void
03433 ffeste_R909_start (ffestpReadStmt *info, bool only_format UNUSED,
03434 ffestvUnit unit, ffestvFormat format, bool rec,
03435 bool key UNUSED)
03436 {
03437 ffecomGfrt start;
03438 ffecomGfrt end;
03439 tree cilist;
03440 bool iostat;
03441 bool errl;
03442 bool endl;
03443
03444 ffeste_check_start_ ();
03445
03446 ffeste_emit_line_note_ ();
03447
03448
03449
03450
03451
03452
03453 switch (format)
03454 {
03455 case FFESTV_formatNONE:
03456 ffeste_io_driver_ = ffeste_io_douio_;
03457 if (rec)
03458 start = FFECOM_gfrtSRDUE, end = FFECOM_gfrtERDUE;
03459 else
03460 start = FFECOM_gfrtSRSUE, end = FFECOM_gfrtERSUE;
03461 break;
03462
03463 case FFESTV_formatLABEL:
03464 case FFESTV_formatCHAREXPR:
03465 case FFESTV_formatINTEXPR:
03466 ffeste_io_driver_ = ffeste_io_dofio_;
03467 if (rec)
03468 start = FFECOM_gfrtSRDFE, end = FFECOM_gfrtERDFE;
03469 else if (unit == FFESTV_unitCHAREXPR)
03470 start = FFECOM_gfrtSRSFI, end = FFECOM_gfrtERSFI;
03471 else
03472 start = FFECOM_gfrtSRSFE, end = FFECOM_gfrtERSFE;
03473 break;
03474
03475 case FFESTV_formatASTERISK:
03476 ffeste_io_driver_ = ffeste_io_dolio_;
03477 if (unit == FFESTV_unitCHAREXPR)
03478 start = FFECOM_gfrtSRSLI, end = FFECOM_gfrtERSLI;
03479 else
03480 start = FFECOM_gfrtSRSLE, end = FFECOM_gfrtERSLE;
03481 break;
03482
03483 case FFESTV_formatNAMELIST:
03484
03485 ffeste_io_driver_ = NULL;
03486 start = FFECOM_gfrtSRSNE, end = FFECOM_gfrt;
03487 break;
03488
03489 default:
03490 assert ("Weird stuff" == NULL);
03491 start = FFECOM_gfrt, end = FFECOM_gfrt;
03492 break;
03493 }
03494 ffeste_io_endgfrt_ = end;
03495
03496 #define specified(something) (info->read_spec[something].kw_or_val_present)
03497
03498 iostat = specified (FFESTP_readixIOSTAT);
03499 errl = specified (FFESTP_readixERR);
03500 endl = specified (FFESTP_readixEND);
03501
03502 #undef specified
03503
03504 ffeste_start_stmt_ ();
03505
03506 if (errl)
03507 {
03508
03509
03510 ffeste_io_err_
03511 = ffecom_lookup_label (info->read_spec[FFESTP_readixERR].u.label);
03512
03513 if (endl)
03514 {
03515
03516 ffeste_io_end_
03517 = ffecom_lookup_label (info->read_spec[FFESTP_readixEND].u.label);
03518 ffeste_io_abort_is_temp_ = TRUE;
03519 ffeste_io_abort_ = ffecom_temp_label ();
03520 }
03521 else
03522 {
03523
03524 ffeste_io_end_ = NULL_TREE;
03525 if ((ffeste_io_abort_is_temp_ = iostat))
03526 ffeste_io_abort_ = ffecom_temp_label ();
03527 else
03528 ffeste_io_abort_ = ffeste_io_err_;
03529 }
03530 }
03531 else
03532 {
03533
03534
03535 ffeste_io_err_ = NULL_TREE;
03536 if (endl)
03537 {
03538
03539 ffeste_io_end_
03540 = ffecom_lookup_label (info->read_spec[FFESTP_readixEND].u.label);
03541 if ((ffeste_io_abort_is_temp_ = iostat))
03542 ffeste_io_abort_ = ffecom_temp_label ();
03543 else
03544 ffeste_io_abort_ = ffeste_io_end_;
03545 }
03546 else
03547 {
03548
03549
03550 ffeste_io_end_ = NULL_TREE;
03551 if ((ffeste_io_abort_is_temp_ = iostat))
03552 ffeste_io_abort_ = ffecom_temp_label ();
03553 else
03554 ffeste_io_abort_ = NULL_TREE;
03555 }
03556 }
03557
03558 if (iostat)
03559 {
03560
03561
03562 ffeste_io_iostat_is_temp_ = FALSE;
03563 ffeste_io_iostat_
03564 = ffecom_expr (info->read_spec[FFESTP_readixIOSTAT].u.expr);
03565 }
03566 else if (ffeste_io_abort_ != NULL_TREE)
03567 {
03568
03569
03570 ffeste_io_iostat_is_temp_ = TRUE;
03571 ffeste_io_iostat_
03572 = ffecom_make_tempvar ("read", ffecom_integer_type_node,
03573 FFETARGET_charactersizeNONE, -1);
03574 }
03575 else
03576 {
03577
03578
03579 ffeste_io_iostat_is_temp_ = FALSE;
03580 ffeste_io_iostat_ = NULL_TREE;
03581 }
03582
03583
03584
03585 if (unit == FFESTV_unitCHAREXPR)
03586 cilist = ffeste_io_icilist_ (errl || iostat,
03587 info->read_spec[FFESTP_readixUNIT].u.expr,
03588 endl || iostat, format,
03589 &info->read_spec[FFESTP_readixFORMAT]);
03590 else
03591 cilist = ffeste_io_cilist_ (errl || iostat, unit,
03592 info->read_spec[FFESTP_readixUNIT].u.expr,
03593 5, endl || iostat, format,
03594 &info->read_spec[FFESTP_readixFORMAT],
03595 rec,
03596 info->read_spec[FFESTP_readixREC].u.expr);
03597
03598
03599
03600
03601
03602
03603 ffeste_io_call_ (ffecom_call_gfrt (start, cilist, NULL_TREE),
03604 (! ffeste_io_abort_is_temp_) || (end != FFECOM_gfrt));
03605 }
03606
03607
03608
03609 void
03610 ffeste_R909_item (ffebld expr, ffelexToken expr_token)
03611 {
03612 ffeste_check_item_ ();
03613
03614 if (expr == NULL)
03615 return;
03616
03617
03618
03619 while (ffebld_op (expr) == FFEBLD_opPAREN)
03620 expr = ffebld_left (expr);
03621
03622 if (ffebld_op (expr) == FFEBLD_opANY)
03623 return;
03624
03625 if (ffebld_op (expr) == FFEBLD_opIMPDO)
03626 ffeste_io_impdo_ (expr, expr_token);
03627 else
03628 {
03629 ffeste_start_stmt_ ();
03630
03631 ffecom_prepare_arg_ptr_to_expr (expr);
03632
03633 ffecom_prepare_end ();
03634
03635 ffeste_io_call_ ((*ffeste_io_driver_) (expr), TRUE);
03636
03637 ffeste_end_stmt_ ();
03638 }
03639 }
03640
03641
03642
03643 void
03644 ffeste_R909_finish ()
03645 {
03646 ffeste_check_finish_ ();
03647
03648
03649
03650
03651 if (ffeste_io_endgfrt_ != FFECOM_gfrt)
03652 ffeste_io_call_ (ffecom_call_gfrt (ffeste_io_endgfrt_, NULL_TREE,
03653 NULL_TREE),
03654 ! ffeste_io_abort_is_temp_);
03655
03656
03657
03658
03659 if (ffeste_io_abort_is_temp_)
03660 {
03661 DECL_INITIAL (ffeste_io_abort_) = error_mark_node;
03662 emit_nop ();
03663 expand_label (ffeste_io_abort_);
03664
03665
03666
03667 if ((ffeste_io_end_ != NULL_TREE)
03668 && (TREE_CODE (ffeste_io_end_) != ERROR_MARK))
03669 {
03670 expand_start_cond (ffecom_truth_value
03671 (ffecom_2 (LT_EXPR, integer_type_node,
03672 ffeste_io_iostat_,
03673 ffecom_integer_zero_node)),
03674 0);
03675 expand_goto (ffeste_io_end_);
03676 expand_end_cond ();
03677 }
03678
03679
03680
03681 if ((ffeste_io_err_ != NULL_TREE)
03682 && (TREE_CODE (ffeste_io_err_) != ERROR_MARK))
03683 {
03684 expand_start_cond (ffecom_truth_value
03685 (ffecom_2 (GT_EXPR, integer_type_node,
03686 ffeste_io_iostat_,
03687 ffecom_integer_zero_node)),
03688 0);
03689 expand_goto (ffeste_io_err_);
03690 expand_end_cond ();
03691 }
03692 }
03693
03694 ffeste_end_stmt_ ();
03695 }
03696
03697
03698
03699 void
03700 ffeste_R910_start (ffestpWriteStmt *info, ffestvUnit unit,
03701 ffestvFormat format, bool rec)
03702 {
03703 ffecomGfrt start;
03704 ffecomGfrt end;
03705 tree cilist;
03706 bool iostat;
03707 bool errl;
03708
03709 ffeste_check_start_ ();
03710
03711 ffeste_emit_line_note_ ();
03712
03713
03714
03715
03716
03717
03718 switch (format)
03719 {
03720 case FFESTV_formatNONE:
03721 ffeste_io_driver_ = ffeste_io_douio_;
03722 if (rec)
03723 start = FFECOM_gfrtSWDUE, end = FFECOM_gfrtEWDUE;
03724 else
03725 start = FFECOM_gfrtSWSUE, end = FFECOM_gfrtEWSUE;
03726 break;
03727
03728 case FFESTV_formatLABEL:
03729 case FFESTV_formatCHAREXPR:
03730 case FFESTV_formatINTEXPR:
03731 ffeste_io_driver_ = ffeste_io_dofio_;
03732 if (rec)
03733 start = FFECOM_gfrtSWDFE, end = FFECOM_gfrtEWDFE;
03734 else if (unit == FFESTV_unitCHAREXPR)
03735 start = FFECOM_gfrtSWSFI, end = FFECOM_gfrtEWSFI;
03736 else
03737 start = FFECOM_gfrtSWSFE, end = FFECOM_gfrtEWSFE;
03738 break;
03739
03740 case FFESTV_formatASTERISK:
03741 ffeste_io_driver_ = ffeste_io_dolio_;
03742 if (unit == FFESTV_unitCHAREXPR)
03743 start = FFECOM_gfrtSWSLI, end = FFECOM_gfrtEWSLI;
03744 else
03745 start = FFECOM_gfrtSWSLE, end = FFECOM_gfrtEWSLE;
03746 break;
03747
03748 case FFESTV_formatNAMELIST:
03749
03750 ffeste_io_driver_ = NULL;
03751 start = FFECOM_gfrtSWSNE, end = FFECOM_gfrt;
03752 break;
03753
03754 default:
03755 assert ("Weird stuff" == NULL);
03756 start = FFECOM_gfrt, end = FFECOM_gfrt;
03757 break;
03758 }
03759 ffeste_io_endgfrt_ = end;
03760
03761 #define specified(something) (info->write_spec[something].kw_or_val_present)
03762
03763 iostat = specified (FFESTP_writeixIOSTAT);
03764 errl = specified (FFESTP_writeixERR);
03765
03766 #undef specified
03767
03768 ffeste_start_stmt_ ();
03769
03770 ffeste_io_end_ = NULL_TREE;
03771
03772 if (errl)
03773 {
03774
03775
03776 ffeste_io_err_
03777 = ffeste_io_abort_
03778 = ffecom_lookup_label
03779 (info->write_spec[FFESTP_writeixERR].u.label);
03780 ffeste_io_abort_is_temp_ = FALSE;
03781 }
03782 else
03783 {
03784
03785
03786 ffeste_io_err_ = NULL_TREE;
03787
03788 if ((ffeste_io_abort_is_temp_ = iostat))
03789 ffeste_io_abort_ = ffecom_temp_label ();
03790 else
03791 ffeste_io_abort_ = NULL_TREE;
03792 }
03793
03794 if (iostat)
03795 {
03796
03797
03798 ffeste_io_iostat_is_temp_ = FALSE;
03799 ffeste_io_iostat_ = ffecom_expr
03800 (info->write_spec[FFESTP_writeixIOSTAT].u.expr);
03801 }
03802 else if (ffeste_io_abort_ != NULL_TREE)
03803 {
03804
03805
03806 ffeste_io_iostat_is_temp_ = TRUE;
03807 ffeste_io_iostat_
03808 = ffecom_make_tempvar ("write", ffecom_integer_type_node,
03809 FFETARGET_charactersizeNONE, -1);
03810 }
03811 else
03812 {
03813
03814
03815 ffeste_io_iostat_is_temp_ = FALSE;
03816 ffeste_io_iostat_ = NULL_TREE;
03817 }
03818
03819
03820
03821 if (unit == FFESTV_unitCHAREXPR)
03822 cilist = ffeste_io_icilist_ (errl || iostat,
03823 info->write_spec[FFESTP_writeixUNIT].u.expr,
03824 FALSE, format,
03825 &info->write_spec[FFESTP_writeixFORMAT]);
03826 else
03827 cilist = ffeste_io_cilist_ (errl || iostat, unit,
03828 info->write_spec[FFESTP_writeixUNIT].u.expr,
03829 6, FALSE, format,
03830 &info->write_spec[FFESTP_writeixFORMAT],
03831 rec,
03832 info->write_spec[FFESTP_writeixREC].u.expr);
03833
03834
03835
03836
03837
03838
03839 ffeste_io_call_ (ffecom_call_gfrt (start, cilist, NULL_TREE),
03840 (! ffeste_io_abort_is_temp_) || (end != FFECOM_gfrt));
03841 }
03842
03843
03844
03845 void
03846 ffeste_R910_item (ffebld expr, ffelexToken expr_token)
03847 {
03848 ffeste_check_item_ ();
03849
03850 if (expr == NULL)
03851 return;
03852
03853 if (ffebld_op (expr) == FFEBLD_opANY)
03854 return;
03855
03856 if (ffebld_op (expr) == FFEBLD_opIMPDO)
03857 ffeste_io_impdo_ (expr, expr_token);
03858 else
03859 {
03860 ffeste_start_stmt_ ();
03861
03862 ffecom_prepare_arg_ptr_to_expr (expr);
03863
03864 ffecom_prepare_end ();
03865
03866 ffeste_io_call_ ((*ffeste_io_driver_) (expr), TRUE);
03867
03868 ffeste_end_stmt_ ();
03869 }
03870 }
03871
03872
03873
03874 void
03875 ffeste_R910_finish ()
03876 {
03877 ffeste_check_finish_ ();
03878
03879
03880
03881
03882 if (ffeste_io_endgfrt_ != FFECOM_gfrt)
03883 ffeste_io_call_ (ffecom_call_gfrt (ffeste_io_endgfrt_, NULL_TREE,
03884 NULL_TREE),
03885 ! ffeste_io_abort_is_temp_);
03886
03887
03888
03889 if (ffeste_io_abort_is_temp_)
03890 {
03891 DECL_INITIAL (ffeste_io_abort_) = error_mark_node;
03892 emit_nop ();
03893 expand_label (ffeste_io_abort_);
03894
03895 assert (ffeste_io_err_ == NULL_TREE);
03896 }
03897
03898 ffeste_end_stmt_ ();
03899 }
03900
03901
03902
03903 void
03904 ffeste_R911_start (ffestpPrintStmt *info, ffestvFormat format)
03905 {
03906 ffecomGfrt start;
03907 ffecomGfrt end;
03908 tree cilist;
03909
03910 ffeste_check_start_ ();
03911
03912 ffeste_emit_line_note_ ();
03913
03914
03915
03916
03917
03918
03919 switch (format)
03920 {
03921 case FFESTV_formatLABEL:
03922 case FFESTV_formatCHAREXPR:
03923 case FFESTV_formatINTEXPR:
03924 ffeste_io_driver_ = ffeste_io_dofio_;
03925 start = FFECOM_gfrtSWSFE, end = FFECOM_gfrtEWSFE;
03926 break;
03927
03928 case FFESTV_formatASTERISK:
03929 ffeste_io_driver_ = ffeste_io_dolio_;
03930 start = FFECOM_gfrtSWSLE, end = FFECOM_gfrtEWSLE;
03931 break;
03932
03933 case FFESTV_formatNAMELIST:
03934
03935 ffeste_io_driver_ = NULL;
03936 start = FFECOM_gfrtSWSNE, end = FFECOM_gfrt;
03937 break;
03938
03939 default:
03940 assert ("Weird stuff" == NULL);
03941 start = FFECOM_gfrt, end = FFECOM_gfrt;
03942 break;
03943 }
03944 ffeste_io_endgfrt_ = end;
03945
03946 ffeste_start_stmt_ ();
03947
03948 ffeste_io_end_ = NULL_TREE;
03949 ffeste_io_err_ = NULL_TREE;
03950 ffeste_io_abort_ = NULL_TREE;
03951 ffeste_io_abort_is_temp_ = FALSE;
03952 ffeste_io_iostat_is_temp_ = FALSE;
03953 ffeste_io_iostat_ = NULL_TREE;
03954
03955
03956
03957 cilist = ffeste_io_cilist_ (FALSE, FFESTV_unitNONE, NULL, 6, FALSE, format,
03958 &info->print_spec[FFESTP_printixFORMAT],
03959 FALSE, NULL);
03960
03961
03962
03963
03964
03965
03966 ffeste_io_call_ (ffecom_call_gfrt (start, cilist, NULL_TREE),
03967 (! ffeste_io_abort_is_temp_) || (end != FFECOM_gfrt));
03968 }
03969
03970
03971
03972 void
03973 ffeste_R911_item (ffebld expr, ffelexToken expr_token)
03974 {
03975 ffeste_check_item_ ();
03976
03977 if (expr == NULL)
03978 return;
03979
03980 if (ffebld_op (expr) == FFEBLD_opANY)
03981 return;
03982
03983 if (ffebld_op (expr) == FFEBLD_opIMPDO)
03984 ffeste_io_impdo_ (expr, expr_token);
03985 else
03986 {
03987 ffeste_start_stmt_ ();
03988
03989 ffecom_prepare_arg_ptr_to_expr (expr);
03990
03991 ffecom_prepare_end ();
03992
03993 ffeste_io_call_ ((*ffeste_io_driver_) (expr), TRUE);
03994
03995 ffeste_end_stmt_ ();
03996 }
03997 }
03998
03999
04000
04001 void
04002 ffeste_R911_finish ()
04003 {
04004 ffeste_check_finish_ ();
04005
04006 if (ffeste_io_endgfrt_ != FFECOM_gfrt)
04007 ffeste_io_call_ (ffecom_call_gfrt (ffeste_io_endgfrt_, NULL_TREE,
04008 NULL_TREE),
04009 FALSE);
04010
04011 ffeste_end_stmt_ ();
04012 }
04013
04014
04015
04016 void
04017 ffeste_R919 (ffestpBeruStmt *info)
04018 {
04019 ffeste_check_simple_ ();
04020
04021 ffeste_subr_beru_ (info, FFECOM_gfrtFBACK);
04022 }
04023
04024
04025
04026 void
04027 ffeste_R920 (ffestpBeruStmt *info)
04028 {
04029 ffeste_check_simple_ ();
04030
04031 ffeste_subr_beru_ (info, FFECOM_gfrtFEND);
04032 }
04033
04034
04035
04036 void
04037 ffeste_R921 (ffestpBeruStmt *info)
04038 {
04039 ffeste_check_simple_ ();
04040
04041 ffeste_subr_beru_ (info, FFECOM_gfrtFREW);
04042 }
04043
04044
04045
04046 void
04047 ffeste_R923A (ffestpInquireStmt *info, bool by_file UNUSED)
04048 {
04049 tree args;
04050 bool iostat;
04051 bool errl;
04052
04053 ffeste_check_simple_ ();
04054
04055 ffeste_emit_line_note_ ();
04056
04057 #define specified(something) (info->inquire_spec[something].kw_or_val_present)
04058
04059 iostat = specified (FFESTP_inquireixIOSTAT);
04060 errl = specified (FFESTP_inquireixERR);
04061
04062 #undef specified
04063
04064 ffeste_start_stmt_ ();
04065
04066 if (errl)
04067 {
04068 ffeste_io_err_
04069 = ffeste_io_abort_
04070 = ffecom_lookup_label
04071 (info->inquire_spec[FFESTP_inquireixERR].u.label);
04072 ffeste_io_abort_is_temp_ = FALSE;
04073 }
04074 else
04075 {
04076 ffeste_io_err_ = NULL_TREE;
04077
04078 if ((ffeste_io_abort_is_temp_ = iostat))
04079 ffeste_io_abort_ = ffecom_temp_label ();
04080 else
04081 ffeste_io_abort_ = NULL_TREE;
04082 }
04083
04084 if (iostat)
04085 {
04086
04087
04088 ffeste_io_iostat_is_temp_ = FALSE;
04089 ffeste_io_iostat_ = ffecom_expr
04090 (info->inquire_spec[FFESTP_inquireixIOSTAT].u.expr);
04091 }
04092 else if (ffeste_io_abort_ != NULL_TREE)
04093 {
04094
04095
04096 ffeste_io_iostat_is_temp_ = TRUE;
04097 ffeste_io_iostat_
04098 = ffecom_make_tempvar ("inquire", ffecom_integer_type_node,
04099 FFETARGET_charactersizeNONE, -1);
04100 }
04101 else
04102 {
04103
04104
04105 ffeste_io_iostat_is_temp_ = FALSE;
04106 ffeste_io_iostat_ = NULL_TREE;
04107 }
04108
04109
04110
04111 args
04112 = ffeste_io_inlist_ (errl || iostat,
04113 &info->inquire_spec[FFESTP_inquireixUNIT],
04114 &info->inquire_spec[FFESTP_inquireixFILE],
04115 &info->inquire_spec[FFESTP_inquireixEXIST],
04116 &info->inquire_spec[FFESTP_inquireixOPENED],
04117 &info->inquire_spec[FFESTP_inquireixNUMBER],
04118 &info->inquire_spec[FFESTP_inquireixNAMED],
04119 &info->inquire_spec[FFESTP_inquireixNAME],
04120 &info->inquire_spec[FFESTP_inquireixACCESS],
04121 &info->inquire_spec[FFESTP_inquireixSEQUENTIAL],
04122 &info->inquire_spec[FFESTP_inquireixDIRECT],
04123 &info->inquire_spec[FFESTP_inquireixFORM],
04124 &info->inquire_spec[FFESTP_inquireixFORMATTED],
04125 &info->inquire_spec[FFESTP_inquireixUNFORMATTED],
04126 &info->inquire_spec[FFESTP_inquireixRECL],
04127 &info->inquire_spec[FFESTP_inquireixNEXTREC],
04128 &info->inquire_spec[FFESTP_inquireixBLANK]);
04129
04130
04131
04132
04133 ffeste_io_call_ (ffecom_call_gfrt (FFECOM_gfrtFINQU, args, NULL_TREE),
04134 ! ffeste_io_abort_is_temp_);
04135
04136
04137
04138 if (ffeste_io_abort_is_temp_)
04139 {
04140 DECL_INITIAL (ffeste_io_abort_) = error_mark_node;
04141 emit_nop ();
04142 expand_label (ffeste_io_abort_);
04143
04144 assert (ffeste_io_err_ == NULL_TREE);
04145 }
04146
04147 ffeste_end_stmt_ ();
04148 }
04149
04150
04151
04152 void
04153 ffeste_R923B_start (ffestpInquireStmt *info UNUSED)
04154 {
04155 ffeste_check_start_ ();
04156
04157 assert ("INQUIRE(IOLENGTH=<var>) not implemented yet! ~~~" == NULL);
04158
04159 ffeste_emit_line_note_ ();
04160 }
04161
04162
04163
04164 void
04165 ffeste_R923B_item (ffebld expr UNUSED)
04166 {
04167 ffeste_check_item_ ();
04168 }
04169
04170
04171
04172 void
04173 ffeste_R923B_finish ()
04174 {
04175 ffeste_check_finish_ ();
04176 }
04177
04178
04179
04180
04181
04182 void
04183 ffeste_R1001 (ffests s)
04184 {
04185 tree t;
04186 tree ttype;
04187 tree maxindex;
04188 tree var;
04189
04190 ffeste_check_simple_ ();
04191
04192 assert (ffeste_label_formatdef_ != NULL);
04193
04194 ffeste_emit_line_note_ ();
04195
04196 t = build_string (ffests_length (s), ffests_text (s));
04197
04198 TREE_TYPE (t)
04199 = build_type_variant (build_array_type
04200 (char_type_node,
04201 build_range_type (integer_type_node,
04202 integer_one_node,
04203 build_int_2 (ffests_length (s),
04204 0))),
04205 1, 0);
04206 TREE_CONSTANT (t) = 1;
04207 TREE_STATIC (t) = 1;
04208
04209 var = ffecom_lookup_label (ffeste_label_formatdef_);
04210 if ((var != NULL_TREE)
04211 && (TREE_CODE (var) == VAR_DECL))
04212 {
04213 DECL_INITIAL (var) = t;
04214 maxindex = build_int_2 (ffests_length (s) - 1, 0);
04215 ttype = TREE_TYPE (var);
04216 TYPE_DOMAIN (ttype) = build_range_type (integer_type_node,
04217 integer_zero_node,
04218 maxindex);
04219 if (!TREE_TYPE (maxindex))
04220 TREE_TYPE (maxindex) = TYPE_DOMAIN (ttype);
04221 layout_type (ttype);
04222 rest_of_decl_compilation (var, NULL, 1, 0);
04223 expand_decl (var);
04224 expand_decl_init (var);
04225 }
04226
04227 ffeste_label_formatdef_ = NULL;
04228 }
04229
04230
04231
04232 void
04233 ffeste_R1103 ()
04234 {
04235 }
04236
04237
04238
04239 void
04240 ffeste_R1112 ()
04241 {
04242 }
04243
04244
04245
04246 void
04247 ffeste_R1212 (ffebld expr)
04248 {
04249 ffebld args;
04250 ffebld arg;
04251 ffebld labels = NULL;
04252 ffebld prevlabels = NULL;
04253 ffebld prevargs = NULL;
04254
04255 ffeste_check_simple_ ();
04256
04257 args = ffebld_right (expr);
04258
04259 ffeste_emit_line_note_ ();
04260
04261
04262
04263
04264
04265
04266
04267 for (args = ffebld_right (expr); args != NULL; args = ffebld_trail (args))
04268 {
04269 if (((arg = ffebld_head (args)) == NULL)
04270 || (ffebld_op (arg) != FFEBLD_opLABTER))
04271 {
04272 if (prevargs == NULL)
04273 {
04274 prevargs = args;
04275 ffebld_set_right (expr, args);
04276 }
04277 else
04278 {
04279 ffebld_set_trail (prevargs, args);
04280 prevargs = args;
04281 }
04282 }
04283 else
04284 {
04285 if (prevlabels == NULL)
04286 {
04287 prevlabels = labels = args;
04288 }
04289 else
04290 {
04291 ffebld_set_trail (prevlabels, args);
04292 prevlabels = args;
04293 }
04294 }
04295 }
04296 if (prevlabels == NULL)
04297 labels = NULL;
04298 else
04299 ffebld_set_trail (prevlabels, NULL);
04300 if (prevargs == NULL)
04301 ffebld_set_right (expr, NULL);
04302 else
04303 ffebld_set_trail (prevargs, NULL);
04304
04305 ffeste_start_stmt_ ();
04306
04307
04308
04309
04310
04311
04312
04313
04314
04315
04316
04317
04318
04319
04320
04321
04322 ffecom_prepare_expr (expr);
04323
04324 ffecom_prepare_end ();
04325
04326 if (labels == NULL)
04327 expand_expr_stmt (ffecom_expr (expr));
04328 else
04329 {
04330 tree texpr;
04331 tree value;
04332 tree tlabel;
04333 int caseno;
04334 int pushok;
04335 tree duplicate;
04336 ffebld label;
04337
04338 texpr = ffecom_expr (expr);
04339 expand_start_case (0, texpr, TREE_TYPE (texpr), "CALL statement");
04340
04341 for (caseno = 1, label = labels;
04342 label != NULL;
04343 ++caseno, label = ffebld_trail (label))
04344 {
04345 value = build_int_2 (caseno, 0);
04346 tlabel = build_decl (LABEL_DECL, NULL_TREE, NULL_TREE);
04347
04348 pushok = pushcase (value, convert, tlabel, &duplicate);
04349 assert (pushok == 0);
04350
04351 tlabel
04352 = ffecom_lookup_label (ffebld_labter (ffebld_head (label)));
04353 if ((tlabel == NULL_TREE)
04354 || (TREE_CODE (tlabel) == ERROR_MARK))
04355 continue;
04356 TREE_USED (tlabel) = 1;
04357 expand_goto (tlabel);
04358 }
04359
04360 expand_end_case (texpr);
04361 }
04362
04363 ffeste_end_stmt_ ();
04364 }
04365
04366
04367
04368 void
04369 ffeste_R1221 ()
04370 {
04371 }
04372
04373
04374
04375 void
04376 ffeste_R1225 ()
04377 {
04378 }
04379
04380
04381
04382 void
04383 ffeste_R1226 (ffesymbol entry)
04384 {
04385 tree label;
04386
04387 ffeste_check_simple_ ();
04388
04389 label = ffesymbol_hook (entry).length_tree;
04390
04391 ffeste_emit_line_note_ ();
04392
04393 if (label == error_mark_node)
04394 return;
04395
04396 DECL_INITIAL (label) = error_mark_node;
04397 emit_nop ();
04398 expand_label (label);
04399 }
04400
04401
04402
04403 void
04404 ffeste_R1227 (ffestw block UNUSED, ffebld expr)
04405 {
04406 tree rtn;
04407
04408 ffeste_check_simple_ ();
04409
04410 ffeste_emit_line_note_ ();
04411
04412 ffeste_start_stmt_ ();
04413
04414 ffecom_prepare_return_expr (expr);
04415
04416 ffecom_prepare_end ();
04417
04418 rtn = ffecom_return_expr (expr);
04419
04420 if ((rtn == NULL_TREE)
04421 || (rtn == error_mark_node))
04422 expand_null_return ();
04423 else
04424 {
04425 tree result = DECL_RESULT (current_function_decl);
04426
04427 if ((result != error_mark_node)
04428 && (TREE_TYPE (result) != error_mark_node))
04429 expand_return (ffecom_modify (NULL_TREE,
04430 result,
04431 convert (TREE_TYPE (result),
04432 rtn)));
04433 else
04434 expand_null_return ();
04435 }
04436
04437 ffeste_end_stmt_ ();
04438 }
04439
04440
04441
04442 #if FFESTR_VXT
04443 void
04444 ffeste_V018_start (ffestpRewriteStmt *info, ffestvFormat format)
04445 {
04446 ffeste_check_start_ ();
04447 }
04448
04449
04450
04451 void
04452 ffeste_V018_item (ffebld expr)
04453 {
04454 ffeste_check_item_ ();
04455 }
04456
04457
04458
04459 void
04460 ffeste_V018_finish ()
04461 {
04462 ffeste_check_finish_ ();
04463 }
04464
04465
04466
04467 void
04468 ffeste_V019_start (ffestpAcceptStmt *info, ffestvFormat format)
04469 {
04470 ffeste_check_start_ ();
04471 }
04472
04473
04474
04475 void
04476 ffeste_V019_item (ffebld expr)
04477 {
04478 ffeste_check_item_ ();
04479 }
04480
04481
04482
04483 void
04484 ffeste_V019_finish ()
04485 {
04486 ffeste_check_finish_ ();
04487 }
04488
04489 #endif
04490
04491
04492 void
04493 ffeste_V020_start (ffestpTypeStmt *info UNUSED,
04494 ffestvFormat format UNUSED)
04495 {
04496 ffeste_check_start_ ();
04497 }
04498
04499
04500
04501 void
04502 ffeste_V020_item (ffebld expr UNUSED)
04503 {
04504 ffeste_check_item_ ();
04505 }
04506
04507
04508
04509 void
04510 ffeste_V020_finish ()
04511 {
04512 ffeste_check_finish_ ();
04513 }
04514
04515
04516
04517 #if FFESTR_VXT
04518 void
04519 ffeste_V021 (ffestpDeleteStmt *info)
04520 {
04521 ffeste_check_simple_ ();
04522 }
04523
04524
04525
04526 void
04527 ffeste_V022 (ffestpBeruStmt *info)
04528 {
04529 ffeste_check_simple_ ();
04530 }
04531
04532
04533
04534 void
04535 ffeste_V023_start (ffestpVxtcodeStmt *info)
04536 {
04537 ffeste_check_start_ ();
04538 }
04539
04540
04541
04542 void
04543 ffeste_V023_item (ffebld expr)
04544 {
04545 ffeste_check_item_ ();
04546 }
04547
04548
04549
04550 void
04551 ffeste_V023_finish ()
04552 {
04553 ffeste_check_finish_ ();
04554 }
04555
04556
04557
04558 void
04559 ffeste_V024_start (ffestpVxtcodeStmt *info)
04560 {
04561 ffeste_check_start_ ();
04562 }
04563
04564
04565
04566 void
04567 ffeste_V024_item (ffebld expr)
04568 {
04569 ffeste_check_item_ ();
04570 }
04571
04572
04573
04574 void
04575 ffeste_V024_finish ()
04576 {
04577 ffeste_check_finish_ ();
04578 }
04579
04580
04581
04582 void
04583 ffeste_V025_start ()
04584 {
04585 ffeste_check_start_ ();
04586 }
04587
04588
04589
04590 void
04591 ffeste_V025_item (ffebld u, ffebld m, ffebld n, ffebld asv)
04592 {
04593 ffeste_check_item_ ();
04594 }
04595
04596
04597
04598 void
04599 ffeste_V025_finish ()
04600 {
04601 ffeste_check_finish_ ();
04602 }
04603
04604
04605
04606 void
04607 ffeste_V026 (ffestpFindStmt *info)
04608 {
04609 ffeste_check_simple_ ();
04610 }
04611
04612 #endif
04613
04614 #ifdef ENABLE_CHECKING
04615 void
04616 ffeste_terminate_2 (void)
04617 {
04618 assert (! ffeste_top_block_);
04619 }
04620 #endif