1 /* std.c -- Implementation File (module.c template V1.0)
2 Copyright (C) 1995, 1996 Free Software Foundation, Inc.
3 Contributed by James Craig Burley (burley@gnu.org).
5 This file is part of GNU Fortran.
7 GNU Fortran is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2, or (at your option)
12 GNU Fortran is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with GNU Fortran; see the file COPYING. If not, write to
19 the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
26 Implements the various statements and such like.
30 Split out actual code generation to ffeste.
53 /* Externals defined here. */
56 /* Simple definitions and enumerations. */
58 #define FFESTD_COPY_EASY_ 1 /* 1 for only one _subr_copy_xyz_ fn. */
60 #define FFESTD_IS_END_OPTIMIZED_ 1 /* 0=always gen STOP/RETURN before
65 FFESTD_stateletSIMPLE_, /* Expecting simple/start. */
66 FFESTD_stateletATTRIB_, /* Expecting attrib/item/itemstart. */
67 FFESTD_stateletITEM_, /* Expecting item/itemstart/finish. */
68 FFESTD_stateletITEMVALS_, /* Expecting itemvalue/itemendvals. */
75 FFESTD_stmtidENDDOLOOP_,
76 FFESTD_stmtidENDLOGIF_,
77 FFESTD_stmtidEXECLABEL_,
78 FFESTD_stmtidFORMATLABEL_,
79 FFESTD_stmtidR737A_, /* let */
80 FFESTD_stmtidR803_, /* IF-block */
81 FFESTD_stmtidR804_, /* ELSE IF */
82 FFESTD_stmtidR805_, /* ELSE */
83 FFESTD_stmtidR806_, /* END IF */
84 FFESTD_stmtidR807_, /* IF-logical */
85 FFESTD_stmtidR809_, /* SELECT CASE */
86 FFESTD_stmtidR810_, /* CASE */
87 FFESTD_stmtidR811_, /* END SELECT */
88 FFESTD_stmtidR819A_, /* DO-iterative */
89 FFESTD_stmtidR819B_, /* DO WHILE */
90 FFESTD_stmtidR825_, /* END DO */
91 FFESTD_stmtidR834_, /* CYCLE */
92 FFESTD_stmtidR835_, /* EXIT */
93 FFESTD_stmtidR836_, /* GOTO */
94 FFESTD_stmtidR837_, /* GOTO-computed */
95 FFESTD_stmtidR838_, /* ASSIGN */
96 FFESTD_stmtidR839_, /* GOTO-assigned */
97 FFESTD_stmtidR840_, /* IF-arithmetic */
98 FFESTD_stmtidR841_, /* CONTINUE */
99 FFESTD_stmtidR842_, /* STOP */
100 FFESTD_stmtidR843_, /* PAUSE */
101 FFESTD_stmtidR904_, /* OPEN */
102 FFESTD_stmtidR907_, /* CLOSE */
103 FFESTD_stmtidR909_, /* READ */
104 FFESTD_stmtidR910_, /* WRITE */
105 FFESTD_stmtidR911_, /* PRINT */
106 FFESTD_stmtidR919_, /* BACKSPACE */
107 FFESTD_stmtidR920_, /* ENDFILE */
108 FFESTD_stmtidR921_, /* REWIND */
109 FFESTD_stmtidR923A_, /* INQUIRE */
110 FFESTD_stmtidR923B_, /* INQUIRE-iolength */
111 FFESTD_stmtidR1001_, /* FORMAT */
112 FFESTD_stmtidR1103_, /* END_PROGRAM */
113 FFESTD_stmtidR1112_, /* END_BLOCK_DATA */
114 FFESTD_stmtidR1212_, /* CALL */
115 FFESTD_stmtidR1221_, /* END_FUNCTION */
116 FFESTD_stmtidR1225_, /* END_SUBROUTINE */
117 FFESTD_stmtidR1226_, /* ENTRY */
118 FFESTD_stmtidR1227_, /* RETURN */
120 FFESTD_stmtidV018_, /* REWRITE */
121 FFESTD_stmtidV019_, /* ACCEPT */
123 FFESTD_stmtidV020_, /* TYPE */
125 FFESTD_stmtidV021_, /* DELETE */
126 FFESTD_stmtidV022_, /* UNLOCK */
127 FFESTD_stmtidV023_, /* ENCODE */
128 FFESTD_stmtidV024_, /* DECODE */
129 FFESTD_stmtidV025start_, /* DEFINEFILE (start) */
130 FFESTD_stmtidV025item_, /* (DEFINEFILE item) */
131 FFESTD_stmtidV025finish_, /* (DEFINEFILE finish) */
132 FFESTD_stmtidV026_, /* FIND */
139 /* Internal typedefs. */
141 typedef struct _ffestd_expr_item_ *ffestdExprItem_;
143 typedef struct _ffestd_stmt_ *ffestdStmt_;
146 /* Private include files. */
149 /* Internal structure definitions. */
151 struct _ffestd_expr_item_
153 ffestdExprItem_ next;
162 ffestdStmt_ previous;
164 #if FFECOM_targetCURRENT == FFECOM_targetGCC
221 unsigned long casenum;
236 ffelexToken start_token;
238 ffelexToken end_token;
240 ffelexToken incr_token;
311 ffestpOpenStmt *params;
317 ffestpCloseStmt *params;
323 ffestpReadStmt *params;
329 ffestdExprItem_ list;
335 ffestpWriteStmt *params;
339 ffestdExprItem_ list;
345 ffestpPrintStmt *params;
347 ffestdExprItem_ list;
353 ffestpBeruStmt *params;
359 ffestpBeruStmt *params;
365 ffestpBeruStmt *params;
371 ffestpInquireStmt *params;
378 ffestpInquireStmt *params;
379 ffestdExprItem_ list;
410 ffestpRewriteStmt *params;
412 ffestdExprItem_ list;
418 ffestpAcceptStmt *params;
420 ffestdExprItem_ list;
427 ffestpTypeStmt *params;
429 ffestdExprItem_ list;
436 ffestpDeleteStmt *params;
442 ffestpBeruStmt *params;
448 ffestpVxtcodeStmt *params;
449 ffestdExprItem_ list;
455 ffestpVxtcodeStmt *params;
456 ffestdExprItem_ list;
474 ffestpFindStmt *params;
484 /* Static objects accessed by functions in this module. */
486 static ffestdStatelet_ ffestd_statelet_ = FFESTD_stateletSIMPLE_;
487 static int ffestd_block_level_ = 0; /* Block level for reachableness. */
488 static bool ffestd_is_reachable_; /* Is the current stmt reachable? */
489 static ffelab ffestd_label_formatdef_ = NULL;
491 static ffestdExprItem_ *ffestd_expr_list_;
505 #if FFECOM_targetCURRENT == FFECOM_targetGCC
506 static int ffestd_2pass_entrypoints_ = 0; /* # ENTRY statements
510 /* Static functions (internal). */
513 static void ffestd_stmt_append_ (ffestdStmt_ stmt);
514 static ffestdStmt_ ffestd_stmt_new_ (ffestdStmtId_ id);
515 static void ffestd_stmt_pass_ (void);
517 #if FFESTD_COPY_EASY_ && FFECOM_TWOPASS
518 static ffestpInquireStmt *ffestd_subr_copy_easy_ (ffestpInquireIx max);
520 #if FFECOM_targetCURRENT == FFECOM_targetGCC
521 static void ffestd_subr_vxt_ (void);
524 static void ffestd_subr_f90_ (void);
526 static void ffestd_subr_labels_ (bool unexpected);
527 static void ffestd_R1001dump_ (ffests s, ffesttFormatList list);
528 static void ffestd_R1001dump_1005_1_ (ffests s, ffesttFormatList f,
530 static void ffestd_R1001dump_1005_2_ (ffests s, ffesttFormatList f,
532 static void ffestd_R1001dump_1005_3_ (ffests s, ffesttFormatList f,
534 static void ffestd_R1001dump_1005_4_ (ffests s, ffesttFormatList f,
536 static void ffestd_R1001dump_1005_5_ (ffests s, ffesttFormatList f,
538 static void ffestd_R1001dump_1010_1_ (ffests s, ffesttFormatList f,
540 static void ffestd_R1001dump_1010_2_ (ffests s, ffesttFormatList f,
542 static void ffestd_R1001dump_1010_3_ (ffests s, ffesttFormatList f,
544 static void ffestd_R1001dump_1010_4_ (ffests s, ffesttFormatList f,
546 static void ffestd_R1001dump_1010_5_ (ffests s, ffesttFormatList f,
548 static void ffestd_R1001error_ (ffesttFormatList f);
549 static void ffestd_R1001rtexpr_ (ffests s, ffesttFormatList f, ffebld expr);
551 /* Internal macros. */
553 #if FFECOM_targetCURRENT == FFECOM_targetGCC
554 #define ffestd_subr_line_now_() \
555 ffeste_set_line (ffelex_token_where_filename (ffesta_tokens[0]), \
556 ffelex_token_where_filelinenum (ffesta_tokens[0]))
557 #define ffestd_subr_line_restore_(s) \
558 ffeste_set_line ((s)->filename, (s)->filelinenum)
559 #define ffestd_subr_line_save_(s) \
560 ((s)->filename = ffelex_token_where_filename (ffesta_tokens[0]), \
561 (s)->filelinenum = ffelex_token_where_filelinenum (ffesta_tokens[0]))
563 #define ffestd_subr_line_now_()
565 #define ffestd_subr_line_restore_(s)
566 #define ffestd_subr_line_save_(s)
567 #endif /* FFECOM_TWOPASS */
568 #endif /* FFECOM_targetCURRENT != FFECOM_targetGCC */
569 #define ffestd_check_simple_() \
570 assert(ffestd_statelet_ == FFESTD_stateletSIMPLE_)
571 #define ffestd_check_start_() \
572 assert(ffestd_statelet_ == FFESTD_stateletSIMPLE_); \
573 ffestd_statelet_ = FFESTD_stateletATTRIB_
574 #define ffestd_check_attrib_() \
575 assert(ffestd_statelet_ == FFESTD_stateletATTRIB_)
576 #define ffestd_check_item_() \
577 assert(ffestd_statelet_ == FFESTD_stateletATTRIB_ \
578 || ffestd_statelet_ == FFESTD_stateletITEM_); \
579 ffestd_statelet_ = FFESTD_stateletITEM_
580 #define ffestd_check_item_startvals_() \
581 assert(ffestd_statelet_ == FFESTD_stateletATTRIB_ \
582 || ffestd_statelet_ == FFESTD_stateletITEM_); \
583 ffestd_statelet_ = FFESTD_stateletITEMVALS_
584 #define ffestd_check_item_value_() \
585 assert(ffestd_statelet_ == FFESTD_stateletITEMVALS_)
586 #define ffestd_check_item_endvals_() \
587 assert(ffestd_statelet_ == FFESTD_stateletITEMVALS_); \
588 ffestd_statelet_ = FFESTD_stateletITEM_
589 #define ffestd_check_finish_() \
590 assert(ffestd_statelet_ == FFESTD_stateletATTRIB_ \
591 || ffestd_statelet_ == FFESTD_stateletITEM_); \
592 ffestd_statelet_ = FFESTD_stateletSIMPLE_
594 #if FFESTD_COPY_EASY_ && FFECOM_TWOPASS
595 #define ffestd_subr_copy_accept_() (ffestpAcceptStmt *) \
596 ffestd_subr_copy_easy_((ffestpInquireIx) FFESTP_acceptix)
597 #define ffestd_subr_copy_beru_() (ffestpBeruStmt *) \
598 ffestd_subr_copy_easy_((ffestpInquireIx) FFESTP_beruix)
599 #define ffestd_subr_copy_close_() (ffestpCloseStmt *) \
600 ffestd_subr_copy_easy_((ffestpInquireIx) FFESTP_closeix)
601 #define ffestd_subr_copy_delete_() (ffestpDeleteStmt *) \
602 ffestd_subr_copy_easy_((ffestpInquireIx) FFESTP_deleteix)
603 #define ffestd_subr_copy_find_() (ffestpFindStmt *) \
604 ffestd_subr_copy_easy_((ffestpInquireIx) FFESTP_findix)
605 #define ffestd_subr_copy_inquire_() (ffestpInquireStmt *) \
606 ffestd_subr_copy_easy_((ffestpInquireIx) FFESTP_inquireix)
607 #define ffestd_subr_copy_open_() (ffestpOpenStmt *) \
608 ffestd_subr_copy_easy_((ffestpInquireIx) FFESTP_openix)
609 #define ffestd_subr_copy_print_() (ffestpPrintStmt *) \
610 ffestd_subr_copy_easy_((ffestpInquireIx) FFESTP_printix)
611 #define ffestd_subr_copy_read_() (ffestpReadStmt *) \
612 ffestd_subr_copy_easy_((ffestpInquireIx) FFESTP_readix)
613 #define ffestd_subr_copy_rewrite_() (ffestpRewriteStmt *) \
614 ffestd_subr_copy_easy_((ffestpInquireIx) FFESTP_rewriteix)
615 #define ffestd_subr_copy_type_() (ffestpTypeStmt *) \
616 ffestd_subr_copy_easy_((ffestpInquireIx) FFESTP_typeix)
617 #define ffestd_subr_copy_vxtcode_() (ffestpVxtcodeStmt *) \
618 ffestd_subr_copy_easy_((ffestpInquireIx) FFESTP_vxtcodeix)
619 #define ffestd_subr_copy_write_() (ffestpWriteStmt *) \
620 ffestd_subr_copy_easy_((ffestpInquireIx) FFESTP_writeix)
623 /* ffestd_stmt_append_ -- Append statement to end of stmt list
625 ffestd_stmt_append_(ffestd_stmt_new_(FFESTD_stmtidR737A_)); */
629 ffestd_stmt_append_ (ffestdStmt_ stmt)
631 stmt->next = (ffestdStmt_) &ffestd_stmt_list_.first;
632 stmt->previous = ffestd_stmt_list_.last;
633 stmt->next->previous = stmt;
634 stmt->previous->next = stmt;
638 /* ffestd_stmt_new_ -- Make new statement with given id
641 stmt = ffestd_stmt_new_(FFESTD_stmtidR737A_); */
645 ffestd_stmt_new_ (ffestdStmtId_ id)
649 stmt = malloc_new_kp (ffe_pool_any_unit (), "ffestdStmt_", sizeof (*stmt));
655 /* ffestd_stmt_pass_ -- Pass all statements on list to ffeste
657 ffestd_stmt_pass_(); */
664 ffestdExprItem_ expr; /* For traversing lists. */
665 bool okay = (TREE_CODE (current_function_decl) != ERROR_MARK);
667 #if FFECOM_targetCURRENT == FFECOM_targetGCC
668 if ((ffestd_2pass_entrypoints_ != 0) && okay)
670 tree which = ffecom_which_entrypoint_decl ();
674 int ents = ffestd_2pass_entrypoints_;
677 expand_start_case (0, which, TREE_TYPE (which), "entrypoint dispatch");
680 stmt = ffestd_stmt_list_.first;
683 while (stmt->id != FFESTD_stmtidR1226_)
686 if (stmt->u.R1226.entry != NULL)
688 value = build_int_2 (stmt->u.R1226.entrynum, 0);
689 /* Yes, we really want to build a null LABEL_DECL here and not
690 put it on any list. That's what pushcase wants, so that's
692 label = build_decl (LABEL_DECL, NULL_TREE, NULL_TREE);
694 pushok = pushcase (value, convert, label, &duplicate);
695 assert (pushok == 0);
697 label = ffecom_temp_label ();
698 TREE_USED (label) = 1;
702 ffesymbol_hook (stmt->u.R1226.entry).length_tree = label;
709 expand_end_case (which);
714 for (stmt = ffestd_stmt_list_.first;
715 stmt != (ffestdStmt_) &ffestd_stmt_list_.first;
720 case FFESTD_stmtidENDDOLOOP_:
721 ffestd_subr_line_restore_ (stmt);
723 ffeste_do (stmt->u.enddoloop.block);
724 ffestw_kill (stmt->u.enddoloop.block);
727 case FFESTD_stmtidENDLOGIF_:
728 ffestd_subr_line_restore_ (stmt);
733 case FFESTD_stmtidEXECLABEL_:
735 ffeste_labeldef_branch (stmt->u.execlabel.label);
738 case FFESTD_stmtidFORMATLABEL_:
740 ffeste_labeldef_format (stmt->u.formatlabel.label);
743 case FFESTD_stmtidR737A_:
744 ffestd_subr_line_restore_ (stmt);
746 ffeste_R737A (stmt->u.R737A.dest, stmt->u.R737A.source);
747 malloc_pool_kill (stmt->u.R737A.pool);
750 case FFESTD_stmtidR803_:
751 ffestd_subr_line_restore_ (stmt);
753 ffeste_R803 (stmt->u.R803.expr);
754 malloc_pool_kill (stmt->u.R803.pool);
757 case FFESTD_stmtidR804_:
758 ffestd_subr_line_restore_ (stmt);
760 ffeste_R804 (stmt->u.R804.expr);
761 malloc_pool_kill (stmt->u.R804.pool);
764 case FFESTD_stmtidR805_:
765 ffestd_subr_line_restore_ (stmt);
770 case FFESTD_stmtidR806_:
771 ffestd_subr_line_restore_ (stmt);
776 case FFESTD_stmtidR807_:
777 ffestd_subr_line_restore_ (stmt);
779 ffeste_R807 (stmt->u.R807.expr);
780 malloc_pool_kill (stmt->u.R807.pool);
783 case FFESTD_stmtidR809_:
784 ffestd_subr_line_restore_ (stmt);
786 ffeste_R809 (stmt->u.R809.block, stmt->u.R809.expr);
787 malloc_pool_kill (stmt->u.R809.pool);
790 case FFESTD_stmtidR810_:
791 ffestd_subr_line_restore_ (stmt);
793 ffeste_R810 (stmt->u.R810.block, stmt->u.R810.casenum);
794 malloc_pool_kill (stmt->u.R810.pool);
797 case FFESTD_stmtidR811_:
798 ffestd_subr_line_restore_ (stmt);
800 ffeste_R811 (stmt->u.R811.block);
801 malloc_pool_kill (ffestw_select (stmt->u.R811.block)->pool);
802 ffestw_kill (stmt->u.R811.block);
805 case FFESTD_stmtidR819A_:
806 ffestd_subr_line_restore_ (stmt);
808 ffeste_R819A (stmt->u.R819A.block, stmt->u.R819A.label,
810 stmt->u.R819A.start, stmt->u.R819A.start_token,
811 stmt->u.R819A.end, stmt->u.R819A.end_token,
812 stmt->u.R819A.incr, stmt->u.R819A.incr_token);
813 ffelex_token_kill (stmt->u.R819A.start_token);
814 ffelex_token_kill (stmt->u.R819A.end_token);
815 if (stmt->u.R819A.incr_token != NULL)
816 ffelex_token_kill (stmt->u.R819A.incr_token);
817 malloc_pool_kill (stmt->u.R819A.pool);
820 case FFESTD_stmtidR819B_:
821 ffestd_subr_line_restore_ (stmt);
823 ffeste_R819B (stmt->u.R819B.block, stmt->u.R819B.label,
825 malloc_pool_kill (stmt->u.R819B.pool);
828 case FFESTD_stmtidR825_:
829 ffestd_subr_line_restore_ (stmt);
834 case FFESTD_stmtidR834_:
835 ffestd_subr_line_restore_ (stmt);
837 ffeste_R834 (stmt->u.R834.block);
840 case FFESTD_stmtidR835_:
841 ffestd_subr_line_restore_ (stmt);
843 ffeste_R835 (stmt->u.R835.block);
846 case FFESTD_stmtidR836_:
847 ffestd_subr_line_restore_ (stmt);
849 ffeste_R836 (stmt->u.R836.label);
852 case FFESTD_stmtidR837_:
853 ffestd_subr_line_restore_ (stmt);
855 ffeste_R837 (stmt->u.R837.labels, stmt->u.R837.count,
857 malloc_pool_kill (stmt->u.R837.pool);
860 case FFESTD_stmtidR838_:
861 ffestd_subr_line_restore_ (stmt);
863 ffeste_R838 (stmt->u.R838.label, stmt->u.R838.target);
864 malloc_pool_kill (stmt->u.R838.pool);
867 case FFESTD_stmtidR839_:
868 ffestd_subr_line_restore_ (stmt);
870 ffeste_R839 (stmt->u.R839.target);
871 malloc_pool_kill (stmt->u.R839.pool);
874 case FFESTD_stmtidR840_:
875 ffestd_subr_line_restore_ (stmt);
877 ffeste_R840 (stmt->u.R840.expr, stmt->u.R840.neg, stmt->u.R840.zero,
879 malloc_pool_kill (stmt->u.R840.pool);
882 case FFESTD_stmtidR841_:
883 ffestd_subr_line_restore_ (stmt);
888 case FFESTD_stmtidR842_:
889 ffestd_subr_line_restore_ (stmt);
891 ffeste_R842 (stmt->u.R842.expr);
892 if (stmt->u.R842.pool != NULL)
893 malloc_pool_kill (stmt->u.R842.pool);
896 case FFESTD_stmtidR843_:
897 ffestd_subr_line_restore_ (stmt);
899 ffeste_R843 (stmt->u.R843.expr);
900 malloc_pool_kill (stmt->u.R843.pool);
903 case FFESTD_stmtidR904_:
904 ffestd_subr_line_restore_ (stmt);
906 ffeste_R904 (stmt->u.R904.params);
907 malloc_pool_kill (stmt->u.R904.pool);
910 case FFESTD_stmtidR907_:
911 ffestd_subr_line_restore_ (stmt);
913 ffeste_R907 (stmt->u.R907.params);
914 malloc_pool_kill (stmt->u.R907.pool);
917 case FFESTD_stmtidR909_:
918 ffestd_subr_line_restore_ (stmt);
920 ffeste_R909_start (stmt->u.R909.params, stmt->u.R909.only_format,
921 stmt->u.R909.unit, stmt->u.R909.format,
922 stmt->u.R909.rec, stmt->u.R909.key);
923 for (expr = stmt->u.R909.list; expr != NULL; expr = expr->next)
926 ffeste_R909_item (expr->expr, expr->token);
927 ffelex_token_kill (expr->token);
930 ffeste_R909_finish ();
931 malloc_pool_kill (stmt->u.R909.pool);
934 case FFESTD_stmtidR910_:
935 ffestd_subr_line_restore_ (stmt);
937 ffeste_R910_start (stmt->u.R910.params, stmt->u.R910.unit,
938 stmt->u.R910.format, stmt->u.R910.rec);
939 for (expr = stmt->u.R910.list; expr != NULL; expr = expr->next)
942 ffeste_R910_item (expr->expr, expr->token);
943 ffelex_token_kill (expr->token);
946 ffeste_R910_finish ();
947 malloc_pool_kill (stmt->u.R910.pool);
950 case FFESTD_stmtidR911_:
951 ffestd_subr_line_restore_ (stmt);
953 ffeste_R911_start (stmt->u.R911.params, stmt->u.R911.format);
954 for (expr = stmt->u.R911.list; expr != NULL; expr = expr->next)
957 ffeste_R911_item (expr->expr, expr->token);
958 ffelex_token_kill (expr->token);
961 ffeste_R911_finish ();
962 malloc_pool_kill (stmt->u.R911.pool);
965 case FFESTD_stmtidR919_:
966 ffestd_subr_line_restore_ (stmt);
968 ffeste_R919 (stmt->u.R919.params);
969 malloc_pool_kill (stmt->u.R919.pool);
972 case FFESTD_stmtidR920_:
973 ffestd_subr_line_restore_ (stmt);
975 ffeste_R920 (stmt->u.R920.params);
976 malloc_pool_kill (stmt->u.R920.pool);
979 case FFESTD_stmtidR921_:
980 ffestd_subr_line_restore_ (stmt);
982 ffeste_R921 (stmt->u.R921.params);
983 malloc_pool_kill (stmt->u.R921.pool);
986 case FFESTD_stmtidR923A_:
987 ffestd_subr_line_restore_ (stmt);
989 ffeste_R923A (stmt->u.R923A.params, stmt->u.R923A.by_file);
990 malloc_pool_kill (stmt->u.R923A.pool);
993 case FFESTD_stmtidR923B_:
994 ffestd_subr_line_restore_ (stmt);
996 ffeste_R923B_start (stmt->u.R923B.params);
997 for (expr = stmt->u.R923B.list; expr != NULL; expr = expr->next)
1000 ffeste_R923B_item (expr->expr);
1003 ffeste_R923B_finish ();
1004 malloc_pool_kill (stmt->u.R923B.pool);
1007 case FFESTD_stmtidR1001_:
1009 ffeste_R1001 (&stmt->u.R1001.str);
1010 ffests_kill (&stmt->u.R1001.str);
1013 case FFESTD_stmtidR1103_:
1018 case FFESTD_stmtidR1112_:
1023 case FFESTD_stmtidR1212_:
1024 ffestd_subr_line_restore_ (stmt);
1026 ffeste_R1212 (stmt->u.R1212.expr);
1027 malloc_pool_kill (stmt->u.R1212.pool);
1030 case FFESTD_stmtidR1221_:
1035 case FFESTD_stmtidR1225_:
1040 case FFESTD_stmtidR1226_:
1041 ffestd_subr_line_restore_ (stmt);
1042 if (stmt->u.R1226.entry != NULL)
1045 ffeste_R1226 (stmt->u.R1226.entry);
1049 case FFESTD_stmtidR1227_:
1050 ffestd_subr_line_restore_ (stmt);
1052 ffeste_R1227 (stmt->u.R1227.block, stmt->u.R1227.expr);
1053 malloc_pool_kill (stmt->u.R1227.pool);
1057 case FFESTD_stmtidV018_:
1058 ffestd_subr_line_restore_ (stmt);
1060 ffeste_V018_start (stmt->u.V018.params, stmt->u.V018.format);
1061 for (expr = stmt->u.V018.list; expr != NULL; expr = expr->next)
1064 ffeste_V018_item (expr->expr);
1067 ffeste_V018_finish ();
1068 malloc_pool_kill (stmt->u.V018.pool);
1071 case FFESTD_stmtidV019_:
1072 ffestd_subr_line_restore_ (stmt);
1074 ffeste_V019_start (stmt->u.V019.params, stmt->u.V019.format);
1075 for (expr = stmt->u.V019.list; expr != NULL; expr = expr->next)
1078 ffeste_V019_item (expr->expr);
1081 ffeste_V019_finish ();
1082 malloc_pool_kill (stmt->u.V019.pool);
1086 case FFESTD_stmtidV020_:
1087 ffestd_subr_line_restore_ (stmt);
1089 ffeste_V020_start (stmt->u.V020.params, stmt->u.V020.format);
1090 for (expr = stmt->u.V020.list; expr != NULL; expr = expr->next)
1093 ffeste_V020_item (expr->expr);
1096 ffeste_V020_finish ();
1097 malloc_pool_kill (stmt->u.V020.pool);
1101 case FFESTD_stmtidV021_:
1102 ffestd_subr_line_restore_ (stmt);
1104 ffeste_V021 (stmt->u.V021.params);
1105 malloc_pool_kill (stmt->u.V021.pool);
1108 case FFESTD_stmtidV023_:
1109 ffestd_subr_line_restore_ (stmt);
1111 ffeste_V023_start (stmt->u.V023.params);
1112 for (expr = stmt->u.V023.list; expr != NULL; expr = expr->next)
1115 ffeste_V023_item (expr->expr);
1118 ffeste_V023_finish ();
1119 malloc_pool_kill (stmt->u.V023.pool);
1122 case FFESTD_stmtidV024_:
1123 ffestd_subr_line_restore_ (stmt);
1125 ffeste_V024_start (stmt->u.V024.params);
1126 for (expr = stmt->u.V024.list; expr != NULL; expr = expr->next)
1129 ffeste_V024_item (expr->expr);
1132 ffeste_V024_finish ();
1133 malloc_pool_kill (stmt->u.V024.pool);
1136 case FFESTD_stmtidV025start_:
1137 ffestd_subr_line_restore_ (stmt);
1139 ffeste_V025_start ();
1142 case FFESTD_stmtidV025item_:
1144 ffeste_V025_item (stmt->u.V025item.u, stmt->u.V025item.m,
1145 stmt->u.V025item.n, stmt->u.V025item.asv);
1148 case FFESTD_stmtidV025finish_:
1150 ffeste_V025_finish ();
1151 malloc_pool_kill (stmt->u.V025finish.pool);
1154 case FFESTD_stmtidV026_:
1155 ffestd_subr_line_restore_ (stmt);
1157 ffeste_V026 (stmt->u.V026.params);
1158 malloc_pool_kill (stmt->u.V026.pool);
1163 assert ("bad stmt->id" == NULL);
1170 /* ffestd_subr_copy_easy_ -- Copy I/O statement data structure
1172 ffestd_subr_copy_easy_();
1174 Copies all data except tokens in the I/O data structure into a new
1175 structure that lasts as long as the output pool for the current
1176 statement. Assumes that they are
1177 overlaid with each other (union) in stp.h and the typing
1178 and structure references assume (though not necessarily dangerous if
1179 FALSE) that INQUIRE has the most file elements. */
1181 #if FFESTD_COPY_EASY_ && FFECOM_TWOPASS
1182 static ffestpInquireStmt *
1183 ffestd_subr_copy_easy_ (ffestpInquireIx max)
1185 ffestpInquireStmt *stmt;
1188 stmt = (ffestpInquireStmt *) malloc_new_kp (ffesta_output_pool,
1189 "FFESTD easy", sizeof (ffestpFile) * max);
1191 for (ix = 0; ix < max; ++ix)
1193 if ((stmt->inquire_spec[ix].kw_or_val_present
1194 = ffestp_file.inquire.inquire_spec[ix].kw_or_val_present)
1195 && (stmt->inquire_spec[ix].value_present
1196 = ffestp_file.inquire.inquire_spec[ix].value_present))
1198 if ((stmt->inquire_spec[ix].value_is_label
1199 = ffestp_file.inquire.inquire_spec[ix].value_is_label))
1200 stmt->inquire_spec[ix].u.label
1201 = ffestp_file.inquire.inquire_spec[ix].u.label;
1203 stmt->inquire_spec[ix].u.expr
1204 = ffestp_file.inquire.inquire_spec[ix].u.expr;
1212 /* ffestd_subr_labels_ -- Handle any undefined labels
1214 ffestd_subr_labels_(FALSE);
1216 For every undefined label, generate an error message and either define
1217 label as a FORMAT() statement (for FORMAT labels) or as a STOP statement
1218 (for all other labels). */
1221 ffestd_subr_labels_ (bool unexpected)
1228 undef = ffelab_number () - ffestv_num_label_defines_;
1230 for (h = ffelab_handle_first (); h != NULL; h = ffelab_handle_next (h))
1232 l = ffelab_handle_target (h);
1233 if (ffewhere_line_is_unknown (ffelab_definition_line (l)))
1234 { /* Undefined label. */
1235 assert (!unexpected);
1238 ffebad_start (FFEBAD_UNDEF_LABEL);
1239 if (ffelab_type (l) == FFELAB_typeLOOPEND)
1240 ffebad_here (0, ffelab_doref_line (l), ffelab_doref_column (l));
1241 else if (ffelab_type (l) != FFELAB_typeANY)
1242 ffebad_here (0, ffelab_firstref_line (l), ffelab_firstref_column (l));
1243 else if (!ffewhere_line_is_unknown (ffelab_firstref_line (l)))
1244 ffebad_here (0, ffelab_firstref_line (l), ffelab_firstref_column (l));
1245 else if (!ffewhere_line_is_unknown (ffelab_doref_line (l)))
1246 ffebad_here (0, ffelab_doref_line (l), ffelab_doref_column (l));
1248 ffebad_here (0, ffelab_definition_line (l), ffelab_definition_column (l));
1251 switch (ffelab_type (l))
1253 case FFELAB_typeFORMAT:
1254 ffelab_set_definition_line (l,
1255 ffewhere_line_use (ffelab_firstref_line (l)));
1256 ffelab_set_definition_column (l,
1257 ffewhere_column_use (ffelab_firstref_column (l)));
1258 ffestv_num_label_defines_++;
1259 f = ffestt_formatlist_create (NULL, NULL);
1260 ffestd_labeldef_format (l);
1262 ffestt_formatlist_kill (f);
1265 case FFELAB_typeASSIGNABLE:
1266 ffelab_set_definition_line (l,
1267 ffewhere_line_use (ffelab_firstref_line (l)));
1268 ffelab_set_definition_column (l,
1269 ffewhere_column_use (ffelab_firstref_column (l)));
1270 ffestv_num_label_defines_++;
1271 ffelab_set_type (l, FFELAB_typeNOTLOOP);
1272 ffelab_set_blocknum (l, ffestw_blocknum (ffestw_stack_top ()));
1273 ffestd_labeldef_notloop (l);
1277 case FFELAB_typeNOTLOOP:
1278 ffelab_set_definition_line (l,
1279 ffewhere_line_use (ffelab_firstref_line (l)));
1280 ffelab_set_definition_column (l,
1281 ffewhere_column_use (ffelab_firstref_column (l)));
1282 ffestv_num_label_defines_++;
1283 ffelab_set_blocknum (l, ffestw_blocknum (ffestw_stack_top ()));
1284 ffestd_labeldef_notloop (l);
1289 assert ("bad label type" == NULL);
1291 case FFELAB_typeUNKNOWN:
1292 case FFELAB_typeANY:
1297 ffelab_handle_done (h);
1298 assert (undef == 0);
1301 /* ffestd_subr_f90_ -- Report error about lack of full F90 support
1303 ffestd_subr_f90_(); */
1309 ffebad_start (FFEBAD_F90);
1310 ffebad_here (0, ffelex_token_where_line (ffesta_tokens[0]),
1311 ffelex_token_where_column (ffesta_tokens[0]));
1316 /* ffestd_subr_vxt_ -- Report error about lack of full VXT support
1318 ffestd_subr_vxt_(); */
1320 #if FFECOM_targetCURRENT == FFECOM_targetGCC
1324 ffebad_start (FFEBAD_VXT_UNSUPPORTED);
1325 ffebad_here (0, ffelex_token_where_line (ffesta_tokens[0]),
1326 ffelex_token_where_column (ffesta_tokens[0]));
1331 /* ffestd_begin_uses -- Start a bunch of USE statements
1333 ffestd_begin_uses();
1335 Invoked before handling the first USE statement in a block of one or
1336 more USE statements. _end_uses_(bool ok) is invoked before handling
1337 the first statement after the block (there are no BEGIN USE and END USE
1338 statements, but the semantics of USE statements effectively requires
1339 handling them as a single block rather than one statement at a time). */
1342 ffestd_begin_uses ()
1344 #if FFECOM_targetCURRENT == FFECOM_targetFFE
1345 fputs ("; begin_uses\n", dmpout);
1346 #elif FFECOM_targetCURRENT == FFECOM_targetGCC
1352 /* ffestd_do -- End of statement following DO-term-stmt etc
1356 Also invoked by _labeldef_branch_finish_ (or, in cases
1357 of errors, other _labeldef_ functions) when the label definition is
1358 for a DO-target (LOOPEND) label, once per matching/outstanding DO
1359 block on the stack. These cases invoke this function with ok==TRUE, so
1360 only forced stack popping (via ffestd_eof_()) invokes it with ok==FALSE. */
1363 ffestd_do (bool ok UNUSED)
1366 ffestd_subr_line_now_ ();
1367 ffeste_do (ffestw_stack_top ());
1372 stmt = ffestd_stmt_new_ (FFESTD_stmtidENDDOLOOP_);
1373 ffestd_stmt_append_ (stmt);
1374 ffestd_subr_line_save_ (stmt);
1375 stmt->u.enddoloop.block = ffestw_stack_top ();
1379 --ffestd_block_level_;
1380 assert (ffestd_block_level_ >= 0);
1383 /* ffestd_end_uses -- End a bunch of USE statements
1385 ffestd_end_uses(TRUE);
1387 ok==TRUE means simply not popping due to ffestd_eof_()
1388 being called, because there is no formal END USES statement in Fortran. */
1392 ffestd_end_uses (bool ok)
1394 #if FFECOM_targetCURRENT == FFECOM_targetFFE
1395 fputs ("; end_uses\n", dmpout);
1396 #elif FFECOM_targetCURRENT == FFECOM_targetGCC
1402 /* ffestd_end_R740 -- End a WHERE(-THEN)
1404 ffestd_end_R740(TRUE); */
1407 ffestd_end_R740 (bool ok)
1413 /* ffestd_end_R807 -- End of statement following logical IF
1415 ffestd_end_R807(TRUE);
1417 Applies ONLY to logical IF, not to IF-THEN. For example, does not
1418 ffelex_token_kill the construct name for an IF-THEN block (the name
1419 field is invalid for logical IF). ok==TRUE iff statement following
1420 logical IF (substatement) is valid; else, statement is invalid or
1421 stack forcibly popped due to ffestd_eof_(). */
1424 ffestd_end_R807 (bool ok UNUSED)
1427 ffestd_subr_line_now_ ();
1433 stmt = ffestd_stmt_new_ (FFESTD_stmtidENDLOGIF_);
1434 ffestd_stmt_append_ (stmt);
1435 ffestd_subr_line_save_ (stmt);
1439 --ffestd_block_level_;
1440 assert (ffestd_block_level_ >= 0);
1443 /* ffestd_exec_begin -- Executable statements can start coming in now
1445 ffestd_exec_begin(); */
1448 ffestd_exec_begin ()
1450 ffecom_exec_transition ();
1452 #if FFECOM_targetCURRENT == FFECOM_targetFFE
1453 fputs ("{ begin_exec\n", dmpout);
1456 #if FFECOM_targetCURRENT == FFECOM_targetGCC
1457 if (ffestd_2pass_entrypoints_ != 0)
1458 { /* Process pending ENTRY statements now that
1461 int ents = ffestd_2pass_entrypoints_;
1463 stmt = ffestd_stmt_list_.first;
1466 while (stmt->id != FFESTD_stmtidR1226_)
1469 if (!ffecom_2pass_advise_entrypoint (stmt->u.R1226.entry))
1471 stmt->u.R1226.entry = NULL;
1472 --ffestd_2pass_entrypoints_;
1476 while (--ents != 0);
1481 /* ffestd_exec_end -- Executable statements can no longer come in now
1483 ffestd_exec_end(); */
1488 #if FFECOM_targetCURRENT == FFECOM_targetGCC
1489 int old_lineno = lineno;
1490 char *old_input_filename = input_filename;
1493 ffecom_end_transition ();
1496 ffestd_stmt_pass_ ();
1499 #if FFECOM_targetCURRENT == FFECOM_targetFFE
1500 fputs ("} end_exec\n", dmpout);
1501 fputs ("> end_unit\n", dmpout);
1504 #if FFECOM_targetCURRENT == FFECOM_targetGCC
1505 ffecom_finish_progunit ();
1507 if (ffestd_2pass_entrypoints_ != 0)
1509 int ents = ffestd_2pass_entrypoints_;
1510 ffestdStmt_ stmt = ffestd_stmt_list_.first;
1514 while (stmt->id != FFESTD_stmtidR1226_)
1517 if (stmt->u.R1226.entry != NULL)
1519 ffestd_subr_line_restore_ (stmt);
1520 ffecom_2pass_do_entrypoint (stmt->u.R1226.entry);
1524 while (--ents != 0);
1527 ffestd_stmt_list_.first = NULL;
1528 ffestd_stmt_list_.last = NULL;
1529 ffestd_2pass_entrypoints_ = 0;
1531 lineno = old_lineno;
1532 input_filename = old_input_filename;
1536 /* ffestd_init_3 -- Initialize for any program unit
1544 ffestd_stmt_list_.first = (ffestdStmt_) &ffestd_stmt_list_.first;
1545 ffestd_stmt_list_.last = (ffestdStmt_) &ffestd_stmt_list_.first;
1549 /* Generate "code" for "any" label def. */
1552 ffestd_labeldef_any (ffelab label UNUSED)
1554 #if FFECOM_targetCURRENT == FFECOM_targetFFE
1555 fprintf (dmpout, "; any_label_def %lu\n", ffelab_value (label));
1556 #elif FFECOM_targetCURRENT == FFECOM_targetGCC
1562 /* ffestd_labeldef_branch -- Generate "code" for branch label def
1564 ffestd_labeldef_branch(label); */
1567 ffestd_labeldef_branch (ffelab label)
1570 ffeste_labeldef_branch (label);
1575 stmt = ffestd_stmt_new_ (FFESTD_stmtidEXECLABEL_);
1576 ffestd_stmt_append_ (stmt);
1577 stmt->u.execlabel.label = label;
1581 ffestd_is_reachable_ = TRUE;
1584 /* ffestd_labeldef_format -- Generate "code" for FORMAT label def
1586 ffestd_labeldef_format(label); */
1589 ffestd_labeldef_format (ffelab label)
1591 ffestd_label_formatdef_ = label;
1594 ffeste_labeldef_format (label);
1599 stmt = ffestd_stmt_new_ (FFESTD_stmtidFORMATLABEL_);
1600 ffestd_stmt_append_ (stmt);
1601 stmt->u.formatlabel.label = label;
1606 /* ffestd_labeldef_useless -- Generate "code" for useless label def
1608 ffestd_labeldef_useless(label); */
1611 ffestd_labeldef_useless (ffelab label UNUSED)
1613 #if FFECOM_targetCURRENT == FFECOM_targetFFE
1614 fprintf (dmpout, "; useless_label_def %lu\n", ffelab_value (label));
1615 #elif FFECOM_targetCURRENT == FFECOM_targetGCC
1621 /* ffestd_R423A -- PRIVATE statement (in R422 derived-type statement)
1629 ffestd_check_simple_ ();
1631 #if FFECOM_targetCURRENT == FFECOM_targetFFE
1632 fputs ("* PRIVATE_derived_type\n", dmpout);
1633 #elif FFECOM_targetCURRENT == FFECOM_targetGCC
1639 /* ffestd_R423B -- SEQUENCE statement (in R422 derived-type-stmt)
1646 ffestd_check_simple_ ();
1648 #if FFECOM_targetCURRENT == FFECOM_targetFFE
1649 fputs ("* SEQUENCE_derived_type\n", dmpout);
1650 #elif FFECOM_targetCURRENT == FFECOM_targetGCC
1656 /* ffestd_R424 -- derived-TYPE-def statement
1658 ffestd_R424(access_token,access_kw,name_token);
1660 Handle a derived-type definition. */
1663 ffestd_R424 (ffelexToken access, ffestrOther access_kw, ffelexToken name)
1665 ffestd_check_simple_ ();
1667 ffestd_subr_f90_ ();
1674 fprintf (dmpout, "* TYPE %s\n", ffelex_token_text (name));
1679 case FFESTR_otherPUBLIC:
1683 case FFESTR_otherPRIVATE:
1690 fprintf (dmpout, "* TYPE,%s: %s\n", a, ffelex_token_text (name));
1695 /* ffestd_R425 -- End a TYPE
1697 ffestd_R425(TRUE); */
1700 ffestd_R425 (bool ok)
1702 #if FFECOM_targetCURRENT == FFECOM_targetFFE
1703 fprintf (dmpout, "* END_TYPE %s\n", ffelex_token_text (ffestw_name (ffestw_stack_top ())));
1704 #elif FFECOM_targetCURRENT == FFECOM_targetGCC
1710 /* ffestd_R519_start -- INTENT statement list begin
1712 ffestd_R519_start();
1714 Verify that INTENT is valid here, and begin accepting items in the list. */
1717 ffestd_R519_start (ffestrOther intent_kw)
1719 ffestd_check_start_ ();
1721 ffestd_subr_f90_ ();
1729 case FFESTR_otherIN:
1733 case FFESTR_otherOUT:
1737 case FFESTR_otherINOUT:
1744 fprintf (dmpout, "* INTENT (%s) ", a);
1748 /* ffestd_R519_item -- INTENT statement for name
1750 ffestd_R519_item(name_token);
1752 Make sure name_token identifies a valid object to be INTENTed. */
1755 ffestd_R519_item (ffelexToken name)
1757 ffestd_check_item_ ();
1762 fprintf (dmpout, "%s,", ffelex_token_text (name));
1766 /* ffestd_R519_finish -- INTENT statement list complete
1768 ffestd_R519_finish();
1770 Just wrap up any local activities. */
1773 ffestd_R519_finish ()
1775 ffestd_check_finish_ ();
1780 fputc ('\n', dmpout);
1784 /* ffestd_R520_start -- OPTIONAL statement list begin
1786 ffestd_R520_start();
1788 Verify that OPTIONAL is valid here, and begin accepting items in the list. */
1791 ffestd_R520_start ()
1793 ffestd_check_start_ ();
1795 ffestd_subr_f90_ ();
1799 fputs ("* OPTIONAL ", dmpout);
1803 /* ffestd_R520_item -- OPTIONAL statement for name
1805 ffestd_R520_item(name_token);
1807 Make sure name_token identifies a valid object to be OPTIONALed. */
1810 ffestd_R520_item (ffelexToken name)
1812 ffestd_check_item_ ();
1817 fprintf (dmpout, "%s,", ffelex_token_text (name));
1821 /* ffestd_R520_finish -- OPTIONAL statement list complete
1823 ffestd_R520_finish();
1825 Just wrap up any local activities. */
1828 ffestd_R520_finish ()
1830 ffestd_check_finish_ ();
1835 fputc ('\n', dmpout);
1839 /* ffestd_R521A -- PUBLIC statement
1843 Verify that PUBLIC is valid here. */
1848 ffestd_check_simple_ ();
1850 ffestd_subr_f90_ ();
1854 fputs ("* PUBLIC\n", dmpout);
1858 /* ffestd_R521Astart -- PUBLIC statement list begin
1860 ffestd_R521Astart();
1862 Verify that PUBLIC is valid here, and begin accepting items in the list. */
1865 ffestd_R521Astart ()
1867 ffestd_check_start_ ();
1869 ffestd_subr_f90_ ();
1873 fputs ("* PUBLIC ", dmpout);
1877 /* ffestd_R521Aitem -- PUBLIC statement for name
1879 ffestd_R521Aitem(name_token);
1881 Make sure name_token identifies a valid object to be PUBLICed. */
1884 ffestd_R521Aitem (ffelexToken name)
1886 ffestd_check_item_ ();
1891 fprintf (dmpout, "%s,", ffelex_token_text (name));
1895 /* ffestd_R521Afinish -- PUBLIC statement list complete
1897 ffestd_R521Afinish();
1899 Just wrap up any local activities. */
1902 ffestd_R521Afinish ()
1904 ffestd_check_finish_ ();
1909 fputc ('\n', dmpout);
1913 /* ffestd_R521B -- PRIVATE statement
1917 Verify that PRIVATE is valid here (outside a derived-type statement). */
1922 ffestd_check_simple_ ();
1924 ffestd_subr_f90_ ();
1928 fputs ("* PRIVATE_outside_of_R422_derived_type_def\n", dmpout);
1932 /* ffestd_R521Bstart -- PRIVATE statement list begin
1934 ffestd_R521Bstart();
1936 Verify that PRIVATE is valid here, and begin accepting items in the list. */
1939 ffestd_R521Bstart ()
1941 ffestd_check_start_ ();
1943 ffestd_subr_f90_ ();
1947 fputs ("* PRIVATE ", dmpout);
1951 /* ffestd_R521Bitem -- PRIVATE statement for name
1953 ffestd_R521Bitem(name_token);
1955 Make sure name_token identifies a valid object to be PRIVATEed. */
1958 ffestd_R521Bitem (ffelexToken name)
1960 ffestd_check_item_ ();
1965 fprintf (dmpout, "%s,", ffelex_token_text (name));
1969 /* ffestd_R521Bfinish -- PRIVATE statement list complete
1971 ffestd_R521Bfinish();
1973 Just wrap up any local activities. */
1976 ffestd_R521Bfinish ()
1978 ffestd_check_finish_ ();
1983 fputc ('\n', dmpout);
1988 /* ffestd_R522 -- SAVE statement with no list
1992 Verify that SAVE is valid here, and flag everything as SAVEd. */
1997 ffestd_check_simple_ ();
1999 #if FFECOM_targetCURRENT == FFECOM_targetFFE
2000 fputs ("* SAVE_all\n", dmpout);
2001 #elif FFECOM_targetCURRENT == FFECOM_targetGCC
2007 /* ffestd_R522start -- SAVE statement list begin
2011 Verify that SAVE is valid here, and begin accepting items in the list. */
2016 ffestd_check_start_ ();
2018 #if FFECOM_targetCURRENT == FFECOM_targetFFE
2019 fputs ("* SAVE ", dmpout);
2020 #elif FFECOM_targetCURRENT == FFECOM_targetGCC
2026 /* ffestd_R522item_object -- SAVE statement for object-name
2028 ffestd_R522item_object(name_token);
2030 Make sure name_token identifies a valid object to be SAVEd. */
2033 ffestd_R522item_object (ffelexToken name UNUSED)
2035 ffestd_check_item_ ();
2037 #if FFECOM_targetCURRENT == FFECOM_targetFFE
2038 fprintf (dmpout, "%s,", ffelex_token_text (name));
2039 #elif FFECOM_targetCURRENT == FFECOM_targetGCC
2045 /* ffestd_R522item_cblock -- SAVE statement for common-block-name
2047 ffestd_R522item_cblock(name_token);
2049 Make sure name_token identifies a valid common block to be SAVEd. */
2052 ffestd_R522item_cblock (ffelexToken name UNUSED)
2054 ffestd_check_item_ ();
2056 #if FFECOM_targetCURRENT == FFECOM_targetFFE
2057 fprintf (dmpout, "/%s/,", ffelex_token_text (name));
2058 #elif FFECOM_targetCURRENT == FFECOM_targetGCC
2064 /* ffestd_R522finish -- SAVE statement list complete
2066 ffestd_R522finish();
2068 Just wrap up any local activities. */
2071 ffestd_R522finish ()
2073 ffestd_check_finish_ ();
2075 #if FFECOM_targetCURRENT == FFECOM_targetFFE
2076 fputc ('\n', dmpout);
2077 #elif FFECOM_targetCURRENT == FFECOM_targetGCC
2083 /* ffestd_R524_start -- DIMENSION statement list begin
2085 ffestd_R524_start(bool virtual);
2087 Verify that DIMENSION is valid here, and begin accepting items in the list. */
2090 ffestd_R524_start (bool virtual UNUSED)
2092 ffestd_check_start_ ();
2094 #if FFECOM_targetCURRENT == FFECOM_targetFFE
2096 fputs ("* VIRTUAL ", dmpout); /* V028. */
2098 fputs ("* DIMENSION ", dmpout);
2099 #elif FFECOM_targetCURRENT == FFECOM_targetGCC
2105 /* ffestd_R524_item -- DIMENSION statement for object-name
2107 ffestd_R524_item(name_token,dim_list);
2109 Make sure name_token identifies a valid object to be DIMENSIONd. */
2112 ffestd_R524_item (ffelexToken name UNUSED, ffesttDimList dims UNUSED)
2114 ffestd_check_item_ ();
2116 #if FFECOM_targetCURRENT == FFECOM_targetFFE
2117 fputs (ffelex_token_text (name), dmpout);
2118 fputc ('(', dmpout);
2119 ffestt_dimlist_dump (dims);
2120 fputs ("),", dmpout);
2121 #elif FFECOM_targetCURRENT == FFECOM_targetGCC
2127 /* ffestd_R524_finish -- DIMENSION statement list complete
2129 ffestd_R524_finish();
2131 Just wrap up any local activities. */
2134 ffestd_R524_finish ()
2136 ffestd_check_finish_ ();
2138 #if FFECOM_targetCURRENT == FFECOM_targetFFE
2139 fputc ('\n', dmpout);
2140 #elif FFECOM_targetCURRENT == FFECOM_targetGCC
2146 /* ffestd_R525_start -- ALLOCATABLE statement list begin
2148 ffestd_R525_start();
2150 Verify that ALLOCATABLE is valid here, and begin accepting items in the
2155 ffestd_R525_start ()
2157 ffestd_check_start_ ();
2159 ffestd_subr_f90_ ();
2163 fputs ("* ALLOCATABLE ", dmpout);
2167 /* ffestd_R525_item -- ALLOCATABLE statement for object-name
2169 ffestd_R525_item(name_token,dim_list);
2171 Make sure name_token identifies a valid object to be ALLOCATABLEd. */
2174 ffestd_R525_item (ffelexToken name, ffesttDimList dims)
2176 ffestd_check_item_ ();
2181 fputs (ffelex_token_text (name), dmpout);
2184 fputc ('(', dmpout);
2185 ffestt_dimlist_dump (dims);
2186 fputc (')', dmpout);
2188 fputc (',', dmpout);
2192 /* ffestd_R525_finish -- ALLOCATABLE statement list complete
2194 ffestd_R525_finish();
2196 Just wrap up any local activities. */
2199 ffestd_R525_finish ()
2201 ffestd_check_finish_ ();
2206 fputc ('\n', dmpout);
2210 /* ffestd_R526_start -- POINTER statement list begin
2212 ffestd_R526_start();
2214 Verify that POINTER is valid here, and begin accepting items in the
2218 ffestd_R526_start ()
2220 ffestd_check_start_ ();
2222 ffestd_subr_f90_ ();
2226 fputs ("* POINTER ", dmpout);
2230 /* ffestd_R526_item -- POINTER statement for object-name
2232 ffestd_R526_item(name_token,dim_list);
2234 Make sure name_token identifies a valid object to be POINTERd. */
2237 ffestd_R526_item (ffelexToken name, ffesttDimList dims)
2239 ffestd_check_item_ ();
2244 fputs (ffelex_token_text (name), dmpout);
2247 fputc ('(', dmpout);
2248 ffestt_dimlist_dump (dims);
2249 fputc (')', dmpout);
2251 fputc (',', dmpout);
2255 /* ffestd_R526_finish -- POINTER statement list complete
2257 ffestd_R526_finish();
2259 Just wrap up any local activities. */
2262 ffestd_R526_finish ()
2264 ffestd_check_finish_ ();
2269 fputc ('\n', dmpout);
2273 /* ffestd_R527_start -- TARGET statement list begin
2275 ffestd_R527_start();
2277 Verify that TARGET is valid here, and begin accepting items in the
2281 ffestd_R527_start ()
2283 ffestd_check_start_ ();
2285 ffestd_subr_f90_ ();
2289 fputs ("* TARGET ", dmpout);
2293 /* ffestd_R527_item -- TARGET statement for object-name
2295 ffestd_R527_item(name_token,dim_list);
2297 Make sure name_token identifies a valid object to be TARGETd. */
2300 ffestd_R527_item (ffelexToken name, ffesttDimList dims)
2302 ffestd_check_item_ ();
2307 fputs (ffelex_token_text (name), dmpout);
2310 fputc ('(', dmpout);
2311 ffestt_dimlist_dump (dims);
2312 fputc (')', dmpout);
2314 fputc (',', dmpout);
2318 /* ffestd_R527_finish -- TARGET statement list complete
2320 ffestd_R527_finish();
2322 Just wrap up any local activities. */
2325 ffestd_R527_finish ()
2327 ffestd_check_finish_ ();
2332 fputc ('\n', dmpout);
2337 /* ffestd_R537_start -- PARAMETER statement list begin
2339 ffestd_R537_start();
2341 Verify that PARAMETER is valid here, and begin accepting items in the list. */
2344 ffestd_R537_start ()
2346 ffestd_check_start_ ();
2348 #if FFECOM_targetCURRENT == FFECOM_targetFFE
2349 fputs ("* PARAMETER (", dmpout);
2350 #elif FFECOM_targetCURRENT == FFECOM_targetGCC
2356 /* ffestd_R537_item -- PARAMETER statement assignment
2358 ffestd_R537_item(dest,dest_token,source,source_token);
2360 Make sure the source is a valid source for the destination; make the
2364 ffestd_R537_item (ffebld dest UNUSED, ffebld source UNUSED)
2366 ffestd_check_item_ ();
2368 #if FFECOM_targetCURRENT == FFECOM_targetFFE
2370 fputc ('=', dmpout);
2371 ffebld_dump (source);
2372 fputc (',', dmpout);
2373 #elif FFECOM_targetCURRENT == FFECOM_targetGCC
2379 /* ffestd_R537_finish -- PARAMETER statement list complete
2381 ffestd_R537_finish();
2383 Just wrap up any local activities. */
2386 ffestd_R537_finish ()
2388 ffestd_check_finish_ ();
2390 #if FFECOM_targetCURRENT == FFECOM_targetFFE
2391 fputs (")\n", dmpout);
2392 #elif FFECOM_targetCURRENT == FFECOM_targetGCC
2398 /* ffestd_R539 -- IMPLICIT NONE statement
2402 Verify that the IMPLICIT NONE statement is ok here and implement. */
2407 ffestd_check_simple_ ();
2409 #if FFECOM_targetCURRENT == FFECOM_targetFFE
2410 fputs ("* IMPLICIT_NONE\n", dmpout);
2411 #elif FFECOM_targetCURRENT == FFECOM_targetGCC
2417 /* ffestd_R539start -- IMPLICIT statement
2421 Verify that the IMPLICIT statement is ok here and implement. */
2426 ffestd_check_start_ ();
2428 #if FFECOM_targetCURRENT == FFECOM_targetFFE
2429 fputs ("* IMPLICIT ", dmpout);
2430 #elif FFECOM_targetCURRENT == FFECOM_targetGCC
2436 /* ffestd_R539item -- IMPLICIT statement specification (R540)
2438 ffestd_R539item(...);
2440 Verify that the type and letter list are all ok and implement. */
2443 ffestd_R539item (ffestpType type UNUSED, ffebld kind UNUSED,
2444 ffelexToken kindt UNUSED, ffebld len UNUSED,
2445 ffelexToken lent UNUSED, ffesttImpList letters UNUSED)
2447 #if FFECOM_targetCURRENT == FFECOM_targetFFE
2451 ffestd_check_item_ ();
2453 #if FFECOM_targetCURRENT == FFECOM_targetFFE
2456 case FFESTP_typeINTEGER:
2460 case FFESTP_typeBYTE:
2464 case FFESTP_typeWORD:
2468 case FFESTP_typeREAL:
2472 case FFESTP_typeCOMPLEX:
2476 case FFESTP_typeLOGICAL:
2480 case FFESTP_typeCHARACTER:
2484 case FFESTP_typeDBLPRCSN:
2485 a = "DOUBLE PRECISION";
2488 case FFESTP_typeDBLCMPLX:
2489 a = "DOUBLE COMPLEX";
2493 case FFESTP_typeTYPE:
2503 fprintf (dmpout, "%s(", a);
2506 fputs ("kind=", dmpout);
2508 fputs (ffelex_token_text (kindt), dmpout);
2512 fputc (',', dmpout);
2516 fputs ("len=", dmpout);
2518 fputs (ffelex_token_text (lent), dmpout);
2522 fputs (")(", dmpout);
2523 ffestt_implist_dump (letters);
2524 fputs ("),", dmpout);
2525 #elif FFECOM_targetCURRENT == FFECOM_targetGCC
2531 /* ffestd_R539finish -- IMPLICIT statement
2533 ffestd_R539finish();
2535 Finish up any local activities. */
2538 ffestd_R539finish ()
2540 ffestd_check_finish_ ();
2542 #if FFECOM_targetCURRENT == FFECOM_targetFFE
2543 fputc ('\n', dmpout);
2544 #elif FFECOM_targetCURRENT == FFECOM_targetGCC
2550 /* ffestd_R542_start -- NAMELIST statement list begin
2552 ffestd_R542_start();
2554 Verify that NAMELIST is valid here, and begin accepting items in the list. */
2557 ffestd_R542_start ()
2559 ffestd_check_start_ ();
2561 #if FFECOM_targetCURRENT == FFECOM_targetFFE
2562 fputs ("* NAMELIST ", dmpout);
2563 #elif FFECOM_targetCURRENT == FFECOM_targetGCC
2569 /* ffestd_R542_item_nlist -- NAMELIST statement for group-name
2571 ffestd_R542_item_nlist(groupname_token);
2573 Make sure name_token identifies a valid object to be NAMELISTd. */
2576 ffestd_R542_item_nlist (ffelexToken name UNUSED)
2578 ffestd_check_item_ ();
2580 #if FFECOM_targetCURRENT == FFECOM_targetFFE
2581 fprintf (dmpout, "/%s/", ffelex_token_text (name));
2582 #elif FFECOM_targetCURRENT == FFECOM_targetGCC
2588 /* ffestd_R542_item_nitem -- NAMELIST statement for variable-name
2590 ffestd_R542_item_nitem(name_token);
2592 Make sure name_token identifies a valid object to be NAMELISTd. */
2595 ffestd_R542_item_nitem (ffelexToken name UNUSED)
2597 ffestd_check_item_ ();
2599 #if FFECOM_targetCURRENT == FFECOM_targetFFE
2600 fprintf (dmpout, "%s,", ffelex_token_text (name));
2601 #elif FFECOM_targetCURRENT == FFECOM_targetGCC
2607 /* ffestd_R542_finish -- NAMELIST statement list complete
2609 ffestd_R542_finish();
2611 Just wrap up any local activities. */
2614 ffestd_R542_finish ()
2616 ffestd_check_finish_ ();
2618 #if FFECOM_targetCURRENT == FFECOM_targetFFE
2619 fputc ('\n', dmpout);
2620 #elif FFECOM_targetCURRENT == FFECOM_targetGCC
2626 /* ffestd_R544_start -- EQUIVALENCE statement list begin
2628 ffestd_R544_start();
2630 Verify that EQUIVALENCE is valid here, and begin accepting items in the
2635 ffestd_R544_start ()
2637 ffestd_check_start_ ();
2639 #if FFECOM_targetCURRENT == FFECOM_targetFFE
2640 fputs ("* EQUIVALENCE (", dmpout);
2641 #elif FFECOM_targetCURRENT == FFECOM_targetGCC
2648 /* ffestd_R544_item -- EQUIVALENCE statement assignment
2650 ffestd_R544_item(exprlist);
2652 Make sure the equivalence is valid, then implement it. */
2656 ffestd_R544_item (ffesttExprList exprlist)
2658 ffestd_check_item_ ();
2660 #if FFECOM_targetCURRENT == FFECOM_targetFFE
2661 ffestt_exprlist_dump (exprlist);
2662 fputs ("),", dmpout);
2663 #elif FFECOM_targetCURRENT == FFECOM_targetGCC
2670 /* ffestd_R544_finish -- EQUIVALENCE statement list complete
2672 ffestd_R544_finish();
2674 Just wrap up any local activities. */
2678 ffestd_R544_finish ()
2680 ffestd_check_finish_ ();
2682 #if FFECOM_targetCURRENT == FFECOM_targetFFE
2683 fputs (")\n", dmpout);
2684 #elif FFECOM_targetCURRENT == FFECOM_targetGCC
2691 /* ffestd_R547_start -- COMMON statement list begin
2693 ffestd_R547_start();
2695 Verify that COMMON is valid here, and begin accepting items in the list. */
2698 ffestd_R547_start ()
2700 ffestd_check_start_ ();
2702 #if FFECOM_targetCURRENT == FFECOM_targetFFE
2703 fputs ("* COMMON ", dmpout);
2704 #elif FFECOM_targetCURRENT == FFECOM_targetGCC
2710 /* ffestd_R547_item_object -- COMMON statement for object-name
2712 ffestd_R547_item_object(name_token,dim_list);
2714 Make sure name_token identifies a valid object to be COMMONd. */
2717 ffestd_R547_item_object (ffelexToken name UNUSED,
2718 ffesttDimList dims UNUSED)
2720 ffestd_check_item_ ();
2722 #if FFECOM_targetCURRENT == FFECOM_targetFFE
2723 fputs (ffelex_token_text (name), dmpout);
2726 fputc ('(', dmpout);
2727 ffestt_dimlist_dump (dims);
2728 fputc (')', dmpout);
2730 fputc (',', dmpout);
2731 #elif FFECOM_targetCURRENT == FFECOM_targetGCC
2737 /* ffestd_R547_item_cblock -- COMMON statement for common-block-name
2739 ffestd_R547_item_cblock(name_token);
2741 Make sure name_token identifies a valid common block to be COMMONd. */
2744 ffestd_R547_item_cblock (ffelexToken name UNUSED)
2746 ffestd_check_item_ ();
2748 #if FFECOM_targetCURRENT == FFECOM_targetFFE
2750 fputs ("//,", dmpout);
2752 fprintf (dmpout, "/%s/,", ffelex_token_text (name));
2753 #elif FFECOM_targetCURRENT == FFECOM_targetGCC
2759 /* ffestd_R547_finish -- COMMON statement list complete
2761 ffestd_R547_finish();
2763 Just wrap up any local activities. */
2766 ffestd_R547_finish ()
2768 ffestd_check_finish_ ();
2770 #if FFECOM_targetCURRENT == FFECOM_targetFFE
2771 fputc ('\n', dmpout);
2772 #elif FFECOM_targetCURRENT == FFECOM_targetGCC
2778 /* ffestd_R620 -- ALLOCATE statement
2780 ffestd_R620(exprlist,stat,stat_token);
2782 Make sure the expression list is valid, then implement it. */
2786 ffestd_R620 (ffesttExprList exprlist, ffebld stat)
2788 ffestd_check_simple_ ();
2790 ffestd_subr_f90_ ();
2794 fputs ("+ ALLOCATE (", dmpout);
2795 ffestt_exprlist_dump (exprlist);
2798 fputs (",stat=", dmpout);
2801 fputs (")\n", dmpout);
2805 /* ffestd_R624 -- NULLIFY statement
2807 ffestd_R624(pointer_name_list);
2809 Make sure pointer_name_list identifies valid pointers for a NULLIFY. */
2812 ffestd_R624 (ffesttExprList pointers)
2814 ffestd_check_simple_ ();
2816 ffestd_subr_f90_ ();
2820 fputs ("+ NULLIFY (", dmpout);
2821 assert (pointers != NULL);
2822 ffestt_exprlist_dump (pointers);
2823 fputs (")\n", dmpout);
2827 /* ffestd_R625 -- DEALLOCATE statement
2829 ffestd_R625(exprlist,stat,stat_token);
2831 Make sure the equivalence is valid, then implement it. */
2834 ffestd_R625 (ffesttExprList exprlist, ffebld stat)
2836 ffestd_check_simple_ ();
2838 ffestd_subr_f90_ ();
2842 fputs ("+ DEALLOCATE (", dmpout);
2843 ffestt_exprlist_dump (exprlist);
2846 fputs (",stat=", dmpout);
2849 fputs (")\n", dmpout);
2854 /* ffestd_R737A -- Assignment statement outside of WHERE
2856 ffestd_R737A(dest_expr,source_expr); */
2859 ffestd_R737A (ffebld dest, ffebld source)
2861 ffestd_check_simple_ ();
2864 ffestd_subr_line_now_ ();
2865 ffeste_R737A (dest, source);
2870 stmt = ffestd_stmt_new_ (FFESTD_stmtidR737A_);
2871 ffestd_stmt_append_ (stmt);
2872 ffestd_subr_line_save_ (stmt);
2873 stmt->u.R737A.pool = ffesta_output_pool;
2874 stmt->u.R737A.dest = dest;
2875 stmt->u.R737A.source = source;
2876 ffesta_set_outpooldisp (FFESTA_pooldispPRESERVE);
2881 /* ffestd_R737B -- Assignment statement inside of WHERE
2883 ffestd_R737B(dest_expr,source_expr); */
2887 ffestd_R737B (ffebld dest, ffebld source)
2889 ffestd_check_simple_ ();
2894 fputs ("+ let_inside_where ", dmpout);
2896 fputs ("=", dmpout);
2897 ffebld_dump (source);
2898 fputc ('\n', dmpout);
2902 /* ffestd_R738 -- Pointer assignment statement
2904 ffestd_R738(dest_expr,source_expr,source_token);
2906 Make sure the assignment is valid. */
2909 ffestd_R738 (ffebld dest, ffebld source)
2911 ffestd_check_simple_ ();
2913 ffestd_subr_f90_ ();
2917 fputs ("+ let_pointer ", dmpout);
2919 fputs ("=>", dmpout);
2920 ffebld_dump (source);
2921 fputc ('\n', dmpout);
2925 /* ffestd_R740 -- WHERE statement
2927 ffestd_R740(expr,expr_token);
2929 Make sure statement is valid here; implement. */
2932 ffestd_R740 (ffebld expr)
2934 ffestd_check_simple_ ();
2936 ffestd_subr_f90_ ();
2940 fputs ("+ WHERE (", dmpout);
2942 fputs (")\n", dmpout);
2944 ++ffestd_block_level_;
2945 assert (ffestd_block_level_ > 0);
2949 /* ffestd_R742 -- WHERE-construct statement
2951 ffestd_R742(expr,expr_token);
2953 Make sure statement is valid here; implement. */
2956 ffestd_R742 (ffebld expr)
2958 ffestd_check_simple_ ();
2960 ffestd_subr_f90_ ();
2964 fputs ("+ WHERE_construct (", dmpout);
2966 fputs (")\n", dmpout);
2968 ++ffestd_block_level_;
2969 assert (ffestd_block_level_ > 0);
2973 /* ffestd_R744 -- ELSE WHERE statement
2977 Make sure ffestd_kind_ identifies a WHERE block.
2978 Implement the ELSE of the current WHERE block. */
2983 ffestd_check_simple_ ();
2988 fputs ("+ ELSE_WHERE\n", dmpout);
2992 /* ffestd_R745 -- Implicit END WHERE statement
2996 Implement the end of the current WHERE "block". ok==TRUE iff statement
2997 following WHERE (substatement) is valid; else, statement is invalid
2998 or stack forcibly popped due to ffestd_eof_(). */
3001 ffestd_R745 (bool ok)
3006 fputs ("+ END_WHERE\n", dmpout); /* Also see ffestd_R745. */
3008 --ffestd_block_level_;
3009 assert (ffestd_block_level_ >= 0);
3014 /* ffestd_R803 -- Block IF (IF-THEN) statement
3016 ffestd_R803(construct_name,expr,expr_token);
3018 Make sure statement is valid here; implement. */
3021 ffestd_R803 (ffelexToken construct_name UNUSED, ffebld expr)
3023 ffestd_check_simple_ ();
3026 ffestd_subr_line_now_ ();
3027 ffeste_R803 (expr); /* Don't bother with name. */
3032 stmt = ffestd_stmt_new_ (FFESTD_stmtidR803_);
3033 ffestd_stmt_append_ (stmt);
3034 ffestd_subr_line_save_ (stmt);
3035 stmt->u.R803.pool = ffesta_output_pool;
3036 stmt->u.R803.expr = expr;
3037 ffesta_set_outpooldisp (FFESTA_pooldispPRESERVE);
3041 ++ffestd_block_level_;
3042 assert (ffestd_block_level_ > 0);
3045 /* ffestd_R804 -- ELSE IF statement
3047 ffestd_R804(expr,expr_token,name_token);
3049 Make sure ffestd_kind_ identifies an IF block. If not
3050 NULL, make sure name_token gives the correct name. Implement the else
3054 ffestd_R804 (ffebld expr, ffelexToken name UNUSED)
3056 ffestd_check_simple_ ();
3059 ffestd_subr_line_now_ ();
3060 ffeste_R804 (expr); /* Don't bother with name. */
3065 stmt = ffestd_stmt_new_ (FFESTD_stmtidR804_);
3066 ffestd_stmt_append_ (stmt);
3067 ffestd_subr_line_save_ (stmt);
3068 stmt->u.R804.pool = ffesta_output_pool;
3069 stmt->u.R804.expr = expr;
3070 ffesta_set_outpooldisp (FFESTA_pooldispPRESERVE);
3075 /* ffestd_R805 -- ELSE statement
3077 ffestd_R805(name_token);
3079 Make sure ffestd_kind_ identifies an IF block. If not
3080 NULL, make sure name_token gives the correct name. Implement the ELSE
3084 ffestd_R805 (ffelexToken name UNUSED)
3086 ffestd_check_simple_ ();
3089 ffestd_subr_line_now_ ();
3090 ffeste_R805 (); /* Don't bother with name. */
3095 stmt = ffestd_stmt_new_ (FFESTD_stmtidR805_);
3096 ffestd_stmt_append_ (stmt);
3097 ffestd_subr_line_save_ (stmt);
3102 /* ffestd_R806 -- End an IF-THEN
3104 ffestd_R806(TRUE); */
3107 ffestd_R806 (bool ok UNUSED)
3110 ffestd_subr_line_now_ ();
3116 stmt = ffestd_stmt_new_ (FFESTD_stmtidR806_);
3117 ffestd_stmt_append_ (stmt);
3118 ffestd_subr_line_save_ (stmt);
3122 --ffestd_block_level_;
3123 assert (ffestd_block_level_ >= 0);
3126 /* ffestd_R807 -- Logical IF statement
3128 ffestd_R807(expr,expr_token);
3130 Make sure statement is valid here; implement. */
3133 ffestd_R807 (ffebld expr)
3135 ffestd_check_simple_ ();
3138 ffestd_subr_line_now_ ();
3144 stmt = ffestd_stmt_new_ (FFESTD_stmtidR807_);
3145 ffestd_stmt_append_ (stmt);
3146 ffestd_subr_line_save_ (stmt);
3147 stmt->u.R807.pool = ffesta_output_pool;
3148 stmt->u.R807.expr = expr;
3149 ffesta_set_outpooldisp (FFESTA_pooldispPRESERVE);
3153 ++ffestd_block_level_;
3154 assert (ffestd_block_level_ > 0);
3157 /* ffestd_R809 -- SELECT CASE statement
3159 ffestd_R809(construct_name,expr,expr_token);
3161 Make sure statement is valid here; implement. */
3164 ffestd_R809 (ffelexToken construct_name UNUSED, ffebld expr)
3166 ffestd_check_simple_ ();
3169 ffestd_subr_line_now_ ();
3170 ffeste_R809 (ffestw_stack_top (), expr);
3175 stmt = ffestd_stmt_new_ (FFESTD_stmtidR809_);
3176 ffestd_stmt_append_ (stmt);
3177 ffestd_subr_line_save_ (stmt);
3178 stmt->u.R809.pool = ffesta_output_pool;
3179 stmt->u.R809.block = ffestw_use (ffestw_stack_top ());
3180 stmt->u.R809.expr = expr;
3181 ffesta_set_outpooldisp (FFESTA_pooldispPRESERVE);
3182 malloc_pool_use (ffestw_select (ffestw_stack_top ())->pool);
3186 ++ffestd_block_level_;
3187 assert (ffestd_block_level_ > 0);
3190 /* ffestd_R810 -- CASE statement
3192 ffestd_R810(case_value_range_list,name);
3194 If casenum is 0, it's CASE DEFAULT. Else it's the case ranges at
3195 the start of the first_stmt list in the select object at the top of
3196 the stack that match casenum. */
3199 ffestd_R810 (unsigned long casenum)
3201 ffestd_check_simple_ ();
3204 ffestd_subr_line_now_ ();
3205 ffeste_R810 (ffestw_stack_top (), casenum);
3210 stmt = ffestd_stmt_new_ (FFESTD_stmtidR810_);
3211 ffestd_stmt_append_ (stmt);
3212 ffestd_subr_line_save_ (stmt);
3213 stmt->u.R810.pool = ffesta_output_pool;
3214 stmt->u.R810.block = ffestw_stack_top ();
3215 stmt->u.R810.casenum = casenum;
3216 ffesta_set_outpooldisp (FFESTA_pooldispPRESERVE);
3221 /* ffestd_R811 -- End a SELECT
3223 ffestd_R811(TRUE); */
3226 ffestd_R811 (bool ok UNUSED)
3229 ffestd_subr_line_now_ ();
3230 ffeste_R811 (ffestw_stack_top ());
3235 stmt = ffestd_stmt_new_ (FFESTD_stmtidR811_);
3236 ffestd_stmt_append_ (stmt);
3237 ffestd_subr_line_save_ (stmt);
3238 stmt->u.R811.block = ffestw_stack_top ();
3242 --ffestd_block_level_;
3243 assert (ffestd_block_level_ >= 0);
3246 /* ffestd_R819A -- Iterative DO statement
3248 ffestd_R819A(construct_name,label_token,expr,expr_token);
3250 Make sure statement is valid here; implement. */
3253 ffestd_R819A (ffelexToken construct_name UNUSED, ffelab label,
3254 ffebld var, ffebld start, ffelexToken start_token,
3255 ffebld end, ffelexToken end_token,
3256 ffebld incr, ffelexToken incr_token)
3258 ffestd_check_simple_ ();
3261 ffestd_subr_line_now_ ();
3262 ffeste_R819A (ffestw_stack_top (), label, var, start, end, incr,
3268 stmt = ffestd_stmt_new_ (FFESTD_stmtidR819A_);
3269 ffestd_stmt_append_ (stmt);
3270 ffestd_subr_line_save_ (stmt);
3271 stmt->u.R819A.pool = ffesta_output_pool;
3272 stmt->u.R819A.block = ffestw_use (ffestw_stack_top ());
3273 stmt->u.R819A.label = label;
3274 stmt->u.R819A.var = var;
3275 stmt->u.R819A.start = start;
3276 stmt->u.R819A.start_token = ffelex_token_use (start_token);
3277 stmt->u.R819A.end = end;
3278 stmt->u.R819A.end_token = ffelex_token_use (end_token);
3279 stmt->u.R819A.incr = incr;
3280 stmt->u.R819A.incr_token = (incr_token == NULL) ? NULL
3281 : ffelex_token_use (incr_token);
3282 ffesta_set_outpooldisp (FFESTA_pooldispPRESERVE);
3286 ++ffestd_block_level_;
3287 assert (ffestd_block_level_ > 0);
3290 /* ffestd_R819B -- DO WHILE statement
3292 ffestd_R819B(construct_name,label_token,expr,expr_token);
3294 Make sure statement is valid here; implement. */
3297 ffestd_R819B (ffelexToken construct_name UNUSED, ffelab label,
3300 ffestd_check_simple_ ();
3303 ffestd_subr_line_now_ ();
3304 ffeste_R819B (ffestw_stack_top (), label, expr);
3309 stmt = ffestd_stmt_new_ (FFESTD_stmtidR819B_);
3310 ffestd_stmt_append_ (stmt);
3311 ffestd_subr_line_save_ (stmt);
3312 stmt->u.R819B.pool = ffesta_output_pool;
3313 stmt->u.R819B.block = ffestw_use (ffestw_stack_top ());
3314 stmt->u.R819B.label = label;
3315 stmt->u.R819B.expr = expr;
3316 ffesta_set_outpooldisp (FFESTA_pooldispPRESERVE);
3320 ++ffestd_block_level_;
3321 assert (ffestd_block_level_ > 0);
3324 /* ffestd_R825 -- END DO statement
3326 ffestd_R825(name_token);
3328 Make sure ffestd_kind_ identifies a DO block. If not
3329 NULL, make sure name_token gives the correct name. Do whatever
3330 is specific to seeing END DO with a DO-target label definition on it,
3331 where the END DO is really treated as a CONTINUE (i.e. generate th
3332 same code you would for CONTINUE). ffestd_do handles the actual
3333 generation of end-loop code. */
3336 ffestd_R825 (ffelexToken name UNUSED)
3338 ffestd_check_simple_ ();
3341 ffestd_subr_line_now_ ();
3347 stmt = ffestd_stmt_new_ (FFESTD_stmtidR825_);
3348 ffestd_stmt_append_ (stmt);
3349 ffestd_subr_line_save_ (stmt);
3354 /* ffestd_R834 -- CYCLE statement
3356 ffestd_R834(name_token);
3358 Handle a CYCLE within a loop. */
3361 ffestd_R834 (ffestw block)
3363 ffestd_check_simple_ ();
3366 ffestd_subr_line_now_ ();
3367 ffeste_R834 (block);
3372 stmt = ffestd_stmt_new_ (FFESTD_stmtidR834_);
3373 ffestd_stmt_append_ (stmt);
3374 ffestd_subr_line_save_ (stmt);
3375 stmt->u.R834.block = block;
3380 /* ffestd_R835 -- EXIT statement
3382 ffestd_R835(name_token);
3384 Handle a EXIT within a loop. */
3387 ffestd_R835 (ffestw block)
3389 ffestd_check_simple_ ();
3392 ffestd_subr_line_now_ ();
3393 ffeste_R835 (block);
3398 stmt = ffestd_stmt_new_ (FFESTD_stmtidR835_);
3399 ffestd_stmt_append_ (stmt);
3400 ffestd_subr_line_save_ (stmt);
3401 stmt->u.R835.block = block;
3406 /* ffestd_R836 -- GOTO statement
3410 Make sure label_token identifies a valid label for a GOTO. Update
3411 that label's info to indicate it is the target of a GOTO. */
3414 ffestd_R836 (ffelab label)
3416 ffestd_check_simple_ ();
3419 ffestd_subr_line_now_ ();
3420 ffeste_R836 (label);
3425 stmt = ffestd_stmt_new_ (FFESTD_stmtidR836_);
3426 ffestd_stmt_append_ (stmt);
3427 ffestd_subr_line_save_ (stmt);
3428 stmt->u.R836.label = label;
3432 if (ffestd_block_level_ == 0)
3433 ffestd_is_reachable_ = FALSE;
3436 /* ffestd_R837 -- Computed GOTO statement
3438 ffestd_R837(labels,expr);
3440 Make sure label_list identifies valid labels for a GOTO. Update
3441 each label's info to indicate it is the target of a GOTO. */
3444 ffestd_R837 (ffelab *labels, int count, ffebld expr)
3446 ffestd_check_simple_ ();
3449 ffestd_subr_line_now_ ();
3450 ffeste_R837 (labels, count, expr);
3455 stmt = ffestd_stmt_new_ (FFESTD_stmtidR837_);
3456 ffestd_stmt_append_ (stmt);
3457 ffestd_subr_line_save_ (stmt);
3458 stmt->u.R837.pool = ffesta_output_pool;
3459 stmt->u.R837.labels = labels;
3460 stmt->u.R837.count = count;
3461 stmt->u.R837.expr = expr;
3462 ffesta_set_outpooldisp (FFESTA_pooldispPRESERVE);
3467 /* ffestd_R838 -- ASSIGN statement
3469 ffestd_R838(label_token,target_variable,target_token);
3471 Make sure label_token identifies a valid label for an assignment. Update
3472 that label's info to indicate it is the source of an assignment. Update
3473 target_variable's info to indicate it is the target the assignment of that
3477 ffestd_R838 (ffelab label, ffebld target)
3479 ffestd_check_simple_ ();
3482 ffestd_subr_line_now_ ();
3483 ffeste_R838 (label, target);
3488 stmt = ffestd_stmt_new_ (FFESTD_stmtidR838_);
3489 ffestd_stmt_append_ (stmt);
3490 ffestd_subr_line_save_ (stmt);
3491 stmt->u.R838.pool = ffesta_output_pool;
3492 stmt->u.R838.label = label;
3493 stmt->u.R838.target = target;
3494 ffesta_set_outpooldisp (FFESTA_pooldispPRESERVE);
3499 /* ffestd_R839 -- Assigned GOTO statement
3501 ffestd_R839(target,labels);
3503 Make sure label_list identifies valid labels for a GOTO. Update
3504 each label's info to indicate it is the target of a GOTO. */
3507 ffestd_R839 (ffebld target, ffelab *labels UNUSED, int count UNUSED)
3509 ffestd_check_simple_ ();
3512 ffestd_subr_line_now_ ();
3513 ffeste_R839 (target);
3518 stmt = ffestd_stmt_new_ (FFESTD_stmtidR839_);
3519 ffestd_stmt_append_ (stmt);
3520 ffestd_subr_line_save_ (stmt);
3521 stmt->u.R839.pool = ffesta_output_pool;
3522 stmt->u.R839.target = target;
3523 ffesta_set_outpooldisp (FFESTA_pooldispPRESERVE);
3527 if (ffestd_block_level_ == 0)
3528 ffestd_is_reachable_ = FALSE;
3531 /* ffestd_R840 -- Arithmetic IF statement
3533 ffestd_R840(expr,expr_token,neg,zero,pos);
3535 Make sure the labels are valid; implement. */
3538 ffestd_R840 (ffebld expr, ffelab neg, ffelab zero, ffelab pos)
3540 ffestd_check_simple_ ();
3543 ffestd_subr_line_now_ ();
3544 ffeste_R840 (expr, neg, zero, pos);
3549 stmt = ffestd_stmt_new_ (FFESTD_stmtidR840_);
3550 ffestd_stmt_append_ (stmt);
3551 ffestd_subr_line_save_ (stmt);
3552 stmt->u.R840.pool = ffesta_output_pool;
3553 stmt->u.R840.expr = expr;
3554 stmt->u.R840.neg = neg;
3555 stmt->u.R840.zero = zero;
3556 stmt->u.R840.pos = pos;
3557 ffesta_set_outpooldisp (FFESTA_pooldispPRESERVE);
3561 if (ffestd_block_level_ == 0)
3562 ffestd_is_reachable_ = FALSE;
3565 /* ffestd_R841 -- CONTINUE statement
3570 ffestd_R841 (bool in_where UNUSED)
3572 ffestd_check_simple_ ();
3575 ffestd_subr_line_now_ ();
3581 stmt = ffestd_stmt_new_ (FFESTD_stmtidR841_);
3582 ffestd_stmt_append_ (stmt);
3583 ffestd_subr_line_save_ (stmt);
3588 /* ffestd_R842 -- STOP statement
3590 ffestd_R842(expr); */
3593 ffestd_R842 (ffebld expr)
3595 ffestd_check_simple_ ();
3598 ffestd_subr_line_now_ ();
3604 stmt = ffestd_stmt_new_ (FFESTD_stmtidR842_);
3605 ffestd_stmt_append_ (stmt);
3606 ffestd_subr_line_save_ (stmt);
3607 if (ffesta_outpooldisp () == FFESTA_pooldispPRESERVE)
3609 /* This is a "spurious" (automatically-generated) STOP
3610 that follows a previous STOP or other statement.
3611 Make sure we don't have an expression in the pool,
3612 and then mark that the pool has already been killed. */
3613 assert (expr == NULL);
3614 stmt->u.R842.pool = NULL;
3615 stmt->u.R842.expr = NULL;
3619 stmt->u.R842.pool = ffesta_output_pool;
3620 stmt->u.R842.expr = expr;
3621 ffesta_set_outpooldisp (FFESTA_pooldispPRESERVE);
3626 if (ffestd_block_level_ == 0)
3627 ffestd_is_reachable_ = FALSE;
3630 /* ffestd_R843 -- PAUSE statement
3632 ffestd_R843(expr,expr_token);
3634 Make sure statement is valid here; implement. expr and expr_token are
3635 both NULL if there was no expression. */
3638 ffestd_R843 (ffebld expr)
3640 ffestd_check_simple_ ();
3643 ffestd_subr_line_now_ ();
3649 stmt = ffestd_stmt_new_ (FFESTD_stmtidR843_);
3650 ffestd_stmt_append_ (stmt);
3651 ffestd_subr_line_save_ (stmt);
3652 stmt->u.R843.pool = ffesta_output_pool;
3653 stmt->u.R843.expr = expr;
3654 ffesta_set_outpooldisp (FFESTA_pooldispPRESERVE);
3659 /* ffestd_R904 -- OPEN statement
3663 Make sure an OPEN is valid in the current context, and implement it. */
3668 ffestd_check_simple_ ();
3670 #if FFECOM_targetCURRENT == FFECOM_targetGCC
3671 #define specified(something) \
3672 (ffestp_file.open.open_spec[something].kw_or_val_present)
3674 /* Warn if there are any thing we don't handle via f2c libraries. */
3676 if (specified (FFESTP_openixACTION)
3677 || specified (FFESTP_openixASSOCIATEVARIABLE)
3678 || specified (FFESTP_openixBLOCKSIZE)
3679 || specified (FFESTP_openixBUFFERCOUNT)
3680 || specified (FFESTP_openixCARRIAGECONTROL)
3681 || specified (FFESTP_openixDEFAULTFILE)
3682 || specified (FFESTP_openixDELIM)
3683 || specified (FFESTP_openixDISPOSE)
3684 || specified (FFESTP_openixEXTENDSIZE)
3685 || specified (FFESTP_openixINITIALSIZE)
3686 || specified (FFESTP_openixKEY)
3687 || specified (FFESTP_openixMAXREC)
3688 || specified (FFESTP_openixNOSPANBLOCKS)
3689 || specified (FFESTP_openixORGANIZATION)
3690 || specified (FFESTP_openixPAD)
3691 || specified (FFESTP_openixPOSITION)
3692 || specified (FFESTP_openixREADONLY)
3693 || specified (FFESTP_openixRECORDTYPE)
3694 || specified (FFESTP_openixSHARED)
3695 || specified (FFESTP_openixUSEROPEN))
3697 ffebad_start (FFEBAD_OPEN_UNSUPPORTED);
3698 ffebad_here (0, ffelex_token_where_line (ffesta_tokens[0]),
3699 ffelex_token_where_column (ffesta_tokens[0]));
3707 ffestd_subr_line_now_ ();
3708 ffeste_R904 (&ffestp_file.open);
3713 stmt = ffestd_stmt_new_ (FFESTD_stmtidR904_);
3714 ffestd_stmt_append_ (stmt);
3715 ffestd_subr_line_save_ (stmt);
3716 stmt->u.R904.pool = ffesta_output_pool;
3717 stmt->u.R904.params = ffestd_subr_copy_open_ ();
3718 ffesta_set_outpooldisp (FFESTA_pooldispPRESERVE);
3723 /* ffestd_R907 -- CLOSE statement
3727 Make sure a CLOSE is valid in the current context, and implement it. */
3732 ffestd_check_simple_ ();
3735 ffestd_subr_line_now_ ();
3736 ffeste_R907 (&ffestp_file.close);
3741 stmt = ffestd_stmt_new_ (FFESTD_stmtidR907_);
3742 ffestd_stmt_append_ (stmt);
3743 ffestd_subr_line_save_ (stmt);
3744 stmt->u.R907.pool = ffesta_output_pool;
3745 stmt->u.R907.params = ffestd_subr_copy_close_ ();
3746 ffesta_set_outpooldisp (FFESTA_pooldispPRESERVE);
3751 /* ffestd_R909_start -- READ(...) statement list begin
3753 ffestd_R909_start(FALSE);
3755 Verify that READ is valid here, and begin accepting items in the
3759 ffestd_R909_start (bool only_format, ffestvUnit unit,
3760 ffestvFormat format, bool rec, bool key)
3762 ffestd_check_start_ ();
3764 #if FFECOM_targetCURRENT == FFECOM_targetGCC
3765 #define specified(something) \
3766 (ffestp_file.read.read_spec[something].kw_or_val_present)
3768 /* Warn if there are any thing we don't handle via f2c libraries. */
3769 if (specified (FFESTP_readixADVANCE)
3770 || specified (FFESTP_readixEOR)
3771 || specified (FFESTP_readixKEYEQ)
3772 || specified (FFESTP_readixKEYGE)
3773 || specified (FFESTP_readixKEYGT)
3774 || specified (FFESTP_readixKEYID)
3775 || specified (FFESTP_readixNULLS)
3776 || specified (FFESTP_readixSIZE))
3778 ffebad_start (FFEBAD_READ_UNSUPPORTED);
3779 ffebad_here (0, ffelex_token_where_line (ffesta_tokens[0]),
3780 ffelex_token_where_column (ffesta_tokens[0]));
3788 ffestd_subr_line_now_ ();
3789 ffeste_R909_start (&ffestp_file.read, only_format, unit, format, rec, key);
3794 stmt = ffestd_stmt_new_ (FFESTD_stmtidR909_);
3795 ffestd_stmt_append_ (stmt);
3796 ffestd_subr_line_save_ (stmt);
3797 stmt->u.R909.pool = ffesta_output_pool;
3798 stmt->u.R909.params = ffestd_subr_copy_read_ ();
3799 stmt->u.R909.only_format = only_format;
3800 stmt->u.R909.unit = unit;
3801 stmt->u.R909.format = format;
3802 stmt->u.R909.rec = rec;
3803 stmt->u.R909.key = key;
3804 stmt->u.R909.list = NULL;
3805 ffestd_expr_list_ = &stmt->u.R909.list;
3806 ffesta_set_outpooldisp (FFESTA_pooldispPRESERVE);
3811 /* ffestd_R909_item -- READ statement i/o item
3813 ffestd_R909_item(expr,expr_token);
3815 Implement output-list expression. */
3818 ffestd_R909_item (ffebld expr, ffelexToken expr_token)
3820 ffestd_check_item_ ();
3823 ffeste_R909_item (expr);
3826 ffestdExprItem_ item
3827 = (ffestdExprItem_) malloc_new_kp (ffesta_output_pool, "ffestdExprItem_",
3832 item->token = ffelex_token_use (expr_token);
3833 *ffestd_expr_list_ = item;
3834 ffestd_expr_list_ = &item->next;
3839 /* ffestd_R909_finish -- READ statement list complete
3841 ffestd_R909_finish();
3843 Just wrap up any local activities. */
3846 ffestd_R909_finish ()
3848 ffestd_check_finish_ ();
3851 ffeste_R909_finish ();
3853 /* Nothing to do, it's implicit. */
3857 /* ffestd_R910_start -- WRITE(...) statement list begin
3859 ffestd_R910_start();
3861 Verify that WRITE is valid here, and begin accepting items in the
3865 ffestd_R910_start (ffestvUnit unit, ffestvFormat format, bool rec)
3867 ffestd_check_start_ ();
3869 #if FFECOM_targetCURRENT == FFECOM_targetGCC
3870 #define specified(something) \
3871 (ffestp_file.write.write_spec[something].kw_or_val_present)
3873 /* Warn if there are any thing we don't handle via f2c libraries. */
3874 if (specified (FFESTP_writeixADVANCE)
3875 || specified (FFESTP_writeixEOR))
3877 ffebad_start (FFEBAD_WRITE_UNSUPPORTED);
3878 ffebad_here (0, ffelex_token_where_line (ffesta_tokens[0]),
3879 ffelex_token_where_column (ffesta_tokens[0]));
3887 ffestd_subr_line_now_ ();
3888 ffeste_R910_start (&ffestp_file.write, unit, format, rec);
3893 stmt = ffestd_stmt_new_ (FFESTD_stmtidR910_);
3894 ffestd_stmt_append_ (stmt);
3895 ffestd_subr_line_save_ (stmt);
3896 stmt->u.R910.pool = ffesta_output_pool;
3897 stmt->u.R910.params = ffestd_subr_copy_write_ ();
3898 stmt->u.R910.unit = unit;
3899 stmt->u.R910.format = format;
3900 stmt->u.R910.rec = rec;
3901 stmt->u.R910.list = NULL;
3902 ffestd_expr_list_ = &stmt->u.R910.list;
3903 ffesta_set_outpooldisp (FFESTA_pooldispPRESERVE);
3908 /* ffestd_R910_item -- WRITE statement i/o item
3910 ffestd_R910_item(expr,expr_token);
3912 Implement output-list expression. */
3915 ffestd_R910_item (ffebld expr, ffelexToken expr_token)
3917 ffestd_check_item_ ();
3920 ffeste_R910_item (expr);
3923 ffestdExprItem_ item
3924 = (ffestdExprItem_) malloc_new_kp (ffesta_output_pool, "ffestdExprItem_",
3929 item->token = ffelex_token_use (expr_token);
3930 *ffestd_expr_list_ = item;
3931 ffestd_expr_list_ = &item->next;
3936 /* ffestd_R910_finish -- WRITE statement list complete
3938 ffestd_R910_finish();
3940 Just wrap up any local activities. */
3943 ffestd_R910_finish ()
3945 ffestd_check_finish_ ();
3948 ffeste_R910_finish ();
3950 /* Nothing to do, it's implicit. */
3954 /* ffestd_R911_start -- PRINT statement list begin
3956 ffestd_R911_start();
3958 Verify that PRINT is valid here, and begin accepting items in the
3962 ffestd_R911_start (ffestvFormat format)
3964 ffestd_check_start_ ();
3967 ffestd_subr_line_now_ ();
3968 ffeste_R911_start (&ffestp_file.print, format);
3973 stmt = ffestd_stmt_new_ (FFESTD_stmtidR911_);
3974 ffestd_stmt_append_ (stmt);
3975 ffestd_subr_line_save_ (stmt);
3976 stmt->u.R911.pool = ffesta_output_pool;
3977 stmt->u.R911.params = ffestd_subr_copy_print_ ();
3978 stmt->u.R911.format = format;
3979 stmt->u.R911.list = NULL;
3980 ffestd_expr_list_ = &stmt->u.R911.list;
3981 ffesta_set_outpooldisp (FFESTA_pooldispPRESERVE);
3986 /* ffestd_R911_item -- PRINT statement i/o item
3988 ffestd_R911_item(expr,expr_token);
3990 Implement output-list expression. */
3993 ffestd_R911_item (ffebld expr, ffelexToken expr_token)
3995 ffestd_check_item_ ();
3998 ffeste_R911_item (expr);
4001 ffestdExprItem_ item
4002 = (ffestdExprItem_) malloc_new_kp (ffesta_output_pool, "ffestdExprItem_",
4007 item->token = ffelex_token_use (expr_token);
4008 *ffestd_expr_list_ = item;
4009 ffestd_expr_list_ = &item->next;
4014 /* ffestd_R911_finish -- PRINT statement list complete
4016 ffestd_R911_finish();
4018 Just wrap up any local activities. */
4021 ffestd_R911_finish ()
4023 ffestd_check_finish_ ();
4026 ffeste_R911_finish ();
4028 /* Nothing to do, it's implicit. */
4032 /* ffestd_R919 -- BACKSPACE statement
4036 Make sure a BACKSPACE is valid in the current context, and implement it. */
4041 ffestd_check_simple_ ();
4044 ffestd_subr_line_now_ ();
4045 ffeste_R919 (&ffestp_file.beru);
4050 stmt = ffestd_stmt_new_ (FFESTD_stmtidR919_);
4051 ffestd_stmt_append_ (stmt);
4052 ffestd_subr_line_save_ (stmt);
4053 stmt->u.R919.pool = ffesta_output_pool;
4054 stmt->u.R919.params = ffestd_subr_copy_beru_ ();
4055 ffesta_set_outpooldisp (FFESTA_pooldispPRESERVE);
4060 /* ffestd_R920 -- ENDFILE statement
4064 Make sure a ENDFILE is valid in the current context, and implement it. */
4069 ffestd_check_simple_ ();
4072 ffestd_subr_line_now_ ();
4073 ffeste_R920 (&ffestp_file.beru);
4078 stmt = ffestd_stmt_new_ (FFESTD_stmtidR920_);
4079 ffestd_stmt_append_ (stmt);
4080 ffestd_subr_line_save_ (stmt);
4081 stmt->u.R920.pool = ffesta_output_pool;
4082 stmt->u.R920.params = ffestd_subr_copy_beru_ ();
4083 ffesta_set_outpooldisp (FFESTA_pooldispPRESERVE);
4088 /* ffestd_R921 -- REWIND statement
4092 Make sure a REWIND is valid in the current context, and implement it. */
4097 ffestd_check_simple_ ();
4100 ffestd_subr_line_now_ ();
4101 ffeste_R921 (&ffestp_file.beru);
4106 stmt = ffestd_stmt_new_ (FFESTD_stmtidR921_);
4107 ffestd_stmt_append_ (stmt);
4108 ffestd_subr_line_save_ (stmt);
4109 stmt->u.R921.pool = ffesta_output_pool;
4110 stmt->u.R921.params = ffestd_subr_copy_beru_ ();
4111 ffesta_set_outpooldisp (FFESTA_pooldispPRESERVE);
4116 /* ffestd_R923A -- INQUIRE statement (non-IOLENGTH version)
4118 ffestd_R923A(bool by_file);
4120 Make sure an INQUIRE is valid in the current context, and implement it. */
4123 ffestd_R923A (bool by_file)
4125 ffestd_check_simple_ ();
4127 #if FFECOM_targetCURRENT == FFECOM_targetGCC
4128 #define specified(something) \
4129 (ffestp_file.inquire.inquire_spec[something].kw_or_val_present)
4131 /* Warn if there are any thing we don't handle via f2c libraries. */
4132 if (specified (FFESTP_inquireixACTION)
4133 || specified (FFESTP_inquireixCARRIAGECONTROL)
4134 || specified (FFESTP_inquireixDEFAULTFILE)
4135 || specified (FFESTP_inquireixDELIM)
4136 || specified (FFESTP_inquireixKEYED)
4137 || specified (FFESTP_inquireixORGANIZATION)
4138 || specified (FFESTP_inquireixPAD)
4139 || specified (FFESTP_inquireixPOSITION)
4140 || specified (FFESTP_inquireixREAD)
4141 || specified (FFESTP_inquireixREADWRITE)
4142 || specified (FFESTP_inquireixRECORDTYPE)
4143 || specified (FFESTP_inquireixWRITE))
4145 ffebad_start (FFEBAD_INQUIRE_UNSUPPORTED);
4146 ffebad_here (0, ffelex_token_where_line (ffesta_tokens[0]),
4147 ffelex_token_where_column (ffesta_tokens[0]));
4155 ffestd_subr_line_now_ ();
4156 ffeste_R923A (&ffestp_file.inquire, by_file);
4161 stmt = ffestd_stmt_new_ (FFESTD_stmtidR923A_);
4162 ffestd_stmt_append_ (stmt);
4163 ffestd_subr_line_save_ (stmt);
4164 stmt->u.R923A.pool = ffesta_output_pool;
4165 stmt->u.R923A.params = ffestd_subr_copy_inquire_ ();
4166 stmt->u.R923A.by_file = by_file;
4167 ffesta_set_outpooldisp (FFESTA_pooldispPRESERVE);
4172 /* ffestd_R923B_start -- INQUIRE(IOLENGTH=expr) statement list begin
4174 ffestd_R923B_start();
4176 Verify that INQUIRE is valid here, and begin accepting items in the
4180 ffestd_R923B_start ()
4182 ffestd_check_start_ ();
4185 ffestd_subr_line_now_ ();
4186 ffeste_R923B_start (&ffestp_file.inquire);
4191 stmt = ffestd_stmt_new_ (FFESTD_stmtidR923B_);
4192 ffestd_stmt_append_ (stmt);
4193 ffestd_subr_line_save_ (stmt);
4194 stmt->u.R923B.pool = ffesta_output_pool;
4195 stmt->u.R923B.params = ffestd_subr_copy_inquire_ ();
4196 stmt->u.R923B.list = NULL;
4197 ffestd_expr_list_ = &stmt->u.R923B.list;
4198 ffesta_set_outpooldisp (FFESTA_pooldispPRESERVE);
4203 /* ffestd_R923B_item -- INQUIRE statement i/o item
4205 ffestd_R923B_item(expr,expr_token);
4207 Implement output-list expression. */
4210 ffestd_R923B_item (ffebld expr)
4212 ffestd_check_item_ ();
4215 ffeste_R923B_item (expr);
4218 ffestdExprItem_ item
4219 = (ffestdExprItem_) malloc_new_kp (ffesta_output_pool, "ffestdExprItem_",
4224 *ffestd_expr_list_ = item;
4225 ffestd_expr_list_ = &item->next;
4230 /* ffestd_R923B_finish -- INQUIRE statement list complete
4232 ffestd_R923B_finish();
4234 Just wrap up any local activities. */
4237 ffestd_R923B_finish ()
4239 ffestd_check_finish_ ();
4242 ffeste_R923B_finish ();
4244 /* Nothing to do, it's implicit. */
4248 /* ffestd_R1001 -- FORMAT statement
4250 ffestd_R1001(format_list); */
4253 ffestd_R1001 (ffesttFormatList f)
4258 ffestd_check_simple_ ();
4260 if (ffestd_label_formatdef_ == NULL)
4261 return; /* Nothing to hook it up to (no label def). */
4263 ffests_new (s, malloc_pool_image (), 80);
4264 ffests_putc (s, '(');
4265 ffestd_R1001dump_ (s, f); /* Build the string in s. */
4266 ffests_putc (s, ')');
4270 ffests_kill (s); /* Kill the string in s. */
4275 stmt = ffestd_stmt_new_ (FFESTD_stmtidR1001_);
4276 ffestd_stmt_append_ (stmt);
4277 stmt->u.R1001.str = str;
4281 ffestd_label_formatdef_ = NULL;
4284 /* ffestd_R1001dump_ -- Dump list of formats
4286 ffesttFormatList list;
4287 ffestd_R1001dump_(list,0);
4289 The formats in the list are dumped. */
4292 ffestd_R1001dump_ (ffests s, ffesttFormatList list)
4294 ffesttFormatList next;
4296 for (next = list->next; next != list; next = next->next)
4298 if (next != list->next)
4299 ffests_putc (s, ',');
4302 case FFESTP_formattypeI:
4303 ffestd_R1001dump_1005_3_ (s, next, "I");
4306 case FFESTP_formattypeB:
4307 #if FFECOM_targetCURRENT == FFECOM_targetFFE
4308 ffestd_R1001dump_1005_3_ (s, next, "B");
4309 #elif FFECOM_targetCURRENT == FFECOM_targetGCC
4310 ffestd_R1001error_ (next);
4316 case FFESTP_formattypeO:
4317 ffestd_R1001dump_1005_3_ (s, next, "O");
4320 case FFESTP_formattypeZ:
4321 ffestd_R1001dump_1005_3_ (s, next, "Z");
4324 case FFESTP_formattypeF:
4325 ffestd_R1001dump_1005_4_ (s, next, "F");
4328 case FFESTP_formattypeE:
4329 ffestd_R1001dump_1005_5_ (s, next, "E");
4332 case FFESTP_formattypeEN:
4333 #if FFECOM_targetCURRENT == FFECOM_targetFFE
4334 ffestd_R1001dump_1005_5_ (s, next, "EN");
4335 #elif FFECOM_targetCURRENT == FFECOM_targetGCC
4336 ffestd_R1001error_ (next);
4342 case FFESTP_formattypeG:
4343 ffestd_R1001dump_1005_5_ (s, next, "G");
4346 case FFESTP_formattypeL:
4347 ffestd_R1001dump_1005_2_ (s, next, "L");
4350 case FFESTP_formattypeA:
4351 ffestd_R1001dump_1005_1_ (s, next, "A");
4354 case FFESTP_formattypeD:
4355 ffestd_R1001dump_1005_4_ (s, next, "D");
4358 case FFESTP_formattypeQ:
4359 #if FFECOM_targetCURRENT == FFECOM_targetFFE
4360 ffestd_R1001dump_1010_1_ (s, next, "Q");
4361 #elif FFECOM_targetCURRENT == FFECOM_targetGCC
4362 ffestd_R1001error_ (next);
4368 case FFESTP_formattypeDOLLAR:
4369 ffestd_R1001dump_1010_1_ (s, next, "$");
4372 case FFESTP_formattypeP:
4373 ffestd_R1001dump_1010_4_ (s, next, "P");
4376 case FFESTP_formattypeT:
4377 ffestd_R1001dump_1010_5_ (s, next, "T");
4380 case FFESTP_formattypeTL:
4381 ffestd_R1001dump_1010_5_ (s, next, "TL");
4384 case FFESTP_formattypeTR:
4385 ffestd_R1001dump_1010_5_ (s, next, "TR");
4388 case FFESTP_formattypeX:
4389 ffestd_R1001dump_1010_3_ (s, next, "X");
4392 case FFESTP_formattypeS:
4393 ffestd_R1001dump_1010_1_ (s, next, "S");
4396 case FFESTP_formattypeSP:
4397 ffestd_R1001dump_1010_1_ (s, next, "SP");
4400 case FFESTP_formattypeSS:
4401 ffestd_R1001dump_1010_1_ (s, next, "SS");
4404 case FFESTP_formattypeBN:
4405 ffestd_R1001dump_1010_1_ (s, next, "BN");
4408 case FFESTP_formattypeBZ:
4409 ffestd_R1001dump_1010_1_ (s, next, "BZ");
4412 case FFESTP_formattypeSLASH:
4413 ffestd_R1001dump_1010_2_ (s, next, "/");
4416 case FFESTP_formattypeCOLON:
4417 ffestd_R1001dump_1010_1_ (s, next, ":");
4420 case FFESTP_formattypeR1016:
4421 switch (ffelex_token_type (next->t))
4423 case FFELEX_typeCHARACTER:
4425 char *p = ffelex_token_text (next->t);
4426 ffeTokenLength i = ffelex_token_length (next->t);
4428 ffests_putc (s, '\002');
4432 ffests_putc (s, '\002');
4433 ffests_putc (s, *p);
4436 ffests_putc (s, '\002');
4440 case FFELEX_typeHOLLERITH:
4442 char *p = ffelex_token_text (next->t);
4443 ffeTokenLength i = ffelex_token_length (next->t);
4445 ffests_printf_1U (s,
4446 "%" ffeTokenLength_f "uH",
4450 ffests_putc (s, *p);
4461 case FFESTP_formattypeFORMAT:
4462 if (next->u.R1003D.R1004.present)
4464 if (next->u.R1003D.R1004.rtexpr)
4465 ffestd_R1001rtexpr_ (s, next, next->u.R1003D.R1004.u.expr);
4467 ffests_printf_1U (s, "%lu",
4468 next->u.R1003D.R1004.u.unsigned_val);
4471 ffests_putc (s, '(');
4472 ffestd_R1001dump_ (s, next->u.R1003D.format);
4473 ffests_putc (s, ')');
4482 /* ffestd_R1001dump_1005_1_ -- Dump a particular format
4485 ffestd_R1001dump_1005_1_(f,"I");
4487 The format is dumped with form [r]X[w]. */
4490 ffestd_R1001dump_1005_1_ (ffests s, ffesttFormatList f, char *string)
4492 assert (!f->u.R1005.R1007_or_R1008.present);
4493 assert (!f->u.R1005.R1009.present);
4495 if (f->u.R1005.R1004.present)
4497 if (f->u.R1005.R1004.rtexpr)
4498 ffestd_R1001rtexpr_ (s, f, f->u.R1005.R1004.u.expr);
4500 ffests_printf_1U (s, "%lu", f->u.R1005.R1004.u.unsigned_val);
4503 ffests_puts (s, string);
4505 if (f->u.R1005.R1006.present)
4507 if (f->u.R1005.R1006.rtexpr)
4508 ffestd_R1001rtexpr_ (s, f, f->u.R1005.R1006.u.expr);
4510 ffests_printf_1U (s, "%lu", f->u.R1005.R1006.u.unsigned_val);
4514 /* ffestd_R1001dump_1005_2_ -- Dump a particular format
4517 ffestd_R1001dump_1005_2_(f,"I");
4519 The format is dumped with form [r]Xw. */
4522 ffestd_R1001dump_1005_2_ (ffests s, ffesttFormatList f, char *string)
4524 assert (!f->u.R1005.R1007_or_R1008.present);
4525 assert (!f->u.R1005.R1009.present);
4526 assert (f->u.R1005.R1006.present);
4528 if (f->u.R1005.R1004.present)
4530 if (f->u.R1005.R1004.rtexpr)
4531 ffestd_R1001rtexpr_ (s, f, f->u.R1005.R1004.u.expr);
4533 ffests_printf_1U (s, "%lu", f->u.R1005.R1004.u.unsigned_val);
4536 ffests_puts (s, string);
4538 if (f->u.R1005.R1006.rtexpr)
4539 ffestd_R1001rtexpr_ (s, f, f->u.R1005.R1006.u.expr);
4541 ffests_printf_1U (s, "%lu", f->u.R1005.R1006.u.unsigned_val);
4544 /* ffestd_R1001dump_1005_3_ -- Dump a particular format
4547 ffestd_R1001dump_1005_3_(f,"I");
4549 The format is dumped with form [r]Xw[.m]. */
4552 ffestd_R1001dump_1005_3_ (ffests s, ffesttFormatList f, char *string)
4554 assert (!f->u.R1005.R1009.present);
4555 assert (f->u.R1005.R1006.present);
4557 if (f->u.R1005.R1004.present)
4559 if (f->u.R1005.R1004.rtexpr)
4560 ffestd_R1001rtexpr_ (s, f, f->u.R1005.R1004.u.expr);
4562 ffests_printf_1U (s, "%lu", f->u.R1005.R1004.u.unsigned_val);
4565 ffests_puts (s, string);
4567 if (f->u.R1005.R1006.rtexpr)
4568 ffestd_R1001rtexpr_ (s, f, f->u.R1005.R1006.u.expr);
4570 ffests_printf_1U (s, "%lu", f->u.R1005.R1006.u.unsigned_val);
4572 if (f->u.R1005.R1007_or_R1008.present)
4574 ffests_putc (s, '.');
4575 if (f->u.R1005.R1007_or_R1008.rtexpr)
4576 ffestd_R1001rtexpr_ (s, f, f->u.R1005.R1007_or_R1008.u.expr);
4578 ffests_printf_1U (s, "%lu",
4579 f->u.R1005.R1007_or_R1008.u.unsigned_val);
4583 /* ffestd_R1001dump_1005_4_ -- Dump a particular format
4586 ffestd_R1001dump_1005_4_(f,"I");
4588 The format is dumped with form [r]Xw.d. */
4591 ffestd_R1001dump_1005_4_ (ffests s, ffesttFormatList f, char *string)
4593 assert (!f->u.R1005.R1009.present);
4594 assert (f->u.R1005.R1007_or_R1008.present);
4595 assert (f->u.R1005.R1006.present);
4597 if (f->u.R1005.R1004.present)
4599 if (f->u.R1005.R1004.rtexpr)
4600 ffestd_R1001rtexpr_ (s, f, f->u.R1005.R1004.u.expr);
4602 ffests_printf_1U (s, "%lu", f->u.R1005.R1004.u.unsigned_val);
4605 ffests_puts (s, string);
4607 if (f->u.R1005.R1006.rtexpr)
4608 ffestd_R1001rtexpr_ (s, f, f->u.R1005.R1006.u.expr);
4610 ffests_printf_1U (s, "%lu", f->u.R1005.R1006.u.unsigned_val);
4612 ffests_putc (s, '.');
4613 if (f->u.R1005.R1007_or_R1008.rtexpr)
4614 ffestd_R1001rtexpr_ (s, f, f->u.R1005.R1007_or_R1008.u.expr);
4616 ffests_printf_1U (s, "%lu", f->u.R1005.R1007_or_R1008.u.unsigned_val);
4619 /* ffestd_R1001dump_1005_5_ -- Dump a particular format
4622 ffestd_R1001dump_1005_5_(f,"I");
4624 The format is dumped with form [r]Xw.d[Ee]. */
4627 ffestd_R1001dump_1005_5_ (ffests s, ffesttFormatList f, char *string)
4629 assert (f->u.R1005.R1007_or_R1008.present);
4630 assert (f->u.R1005.R1006.present);
4632 if (f->u.R1005.R1004.present)
4634 if (f->u.R1005.R1004.rtexpr)
4635 ffestd_R1001rtexpr_ (s, f, f->u.R1005.R1004.u.expr);
4637 ffests_printf_1U (s, "%lu", f->u.R1005.R1004.u.unsigned_val);
4640 ffests_puts (s, string);
4642 if (f->u.R1005.R1006.rtexpr)
4643 ffestd_R1001rtexpr_ (s, f, f->u.R1005.R1006.u.expr);
4645 ffests_printf_1U (s, "%lu", f->u.R1005.R1006.u.unsigned_val);
4647 ffests_putc (s, '.');
4648 if (f->u.R1005.R1007_or_R1008.rtexpr)
4649 ffestd_R1001rtexpr_ (s, f, f->u.R1005.R1007_or_R1008.u.expr);
4651 ffests_printf_1U (s, "%lu", f->u.R1005.R1007_or_R1008.u.unsigned_val);
4653 if (f->u.R1005.R1009.present)
4655 ffests_putc (s, 'E');
4656 if (f->u.R1005.R1009.rtexpr)
4657 ffestd_R1001rtexpr_ (s, f, f->u.R1005.R1009.u.expr);
4659 ffests_printf_1U (s, "%lu", f->u.R1005.R1009.u.unsigned_val);
4663 /* ffestd_R1001dump_1010_1_ -- Dump a particular format
4666 ffestd_R1001dump_1010_1_(f,"I");
4668 The format is dumped with form X. */
4671 ffestd_R1001dump_1010_1_ (ffests s, ffesttFormatList f, char *string)
4673 assert (!f->u.R1010.val.present);
4675 ffests_puts (s, string);
4678 /* ffestd_R1001dump_1010_2_ -- Dump a particular format
4681 ffestd_R1001dump_1010_2_(f,"I");
4683 The format is dumped with form [r]X. */
4686 ffestd_R1001dump_1010_2_ (ffests s, ffesttFormatList f, char *string)
4688 if (f->u.R1010.val.present)
4690 if (f->u.R1010.val.rtexpr)
4691 ffestd_R1001rtexpr_ (s, f, f->u.R1010.val.u.expr);
4693 ffests_printf_1U (s, "%lu", f->u.R1010.val.u.unsigned_val);
4696 ffests_puts (s, string);
4699 /* ffestd_R1001dump_1010_3_ -- Dump a particular format
4702 ffestd_R1001dump_1010_3_(f,"I");
4704 The format is dumped with form nX. */
4707 ffestd_R1001dump_1010_3_ (ffests s, ffesttFormatList f, char *string)
4709 assert (f->u.R1010.val.present);
4711 if (f->u.R1010.val.rtexpr)
4712 ffestd_R1001rtexpr_ (s, f, f->u.R1010.val.u.expr);
4714 ffests_printf_1U (s, "%lu", f->u.R1010.val.u.unsigned_val);
4716 ffests_puts (s, string);
4719 /* ffestd_R1001dump_1010_4_ -- Dump a particular format
4722 ffestd_R1001dump_1010_4_(f,"I");
4724 The format is dumped with form kX. Note that k is signed. */
4727 ffestd_R1001dump_1010_4_ (ffests s, ffesttFormatList f, char *string)
4729 assert (f->u.R1010.val.present);
4731 if (f->u.R1010.val.rtexpr)
4732 ffestd_R1001rtexpr_ (s, f, f->u.R1010.val.u.expr);
4734 ffests_printf_1D (s, "%ld", f->u.R1010.val.u.signed_val);
4736 ffests_puts (s, string);
4739 /* ffestd_R1001dump_1010_5_ -- Dump a particular format
4742 ffestd_R1001dump_1010_5_(f,"I");
4744 The format is dumped with form Xn. */
4747 ffestd_R1001dump_1010_5_ (ffests s, ffesttFormatList f, char *string)
4749 assert (f->u.R1010.val.present);
4751 ffests_puts (s, string);
4753 if (f->u.R1010.val.rtexpr)
4754 ffestd_R1001rtexpr_ (s, f, f->u.R1010.val.u.expr);
4756 ffests_printf_1U (s, "%lu", f->u.R1010.val.u.unsigned_val);
4759 /* ffestd_R1001error_ -- Complain about FORMAT specification not supported
4762 ffestd_R1001error_(f);
4764 An error message is produced. */
4767 ffestd_R1001error_ (ffesttFormatList f)
4769 ffebad_start (FFEBAD_FORMAT_UNSUPPORTED);
4770 ffebad_here (0, ffelex_token_where_line (f->t), ffelex_token_where_column (f->t));
4775 ffestd_R1001rtexpr_ (ffests s, ffesttFormatList f, ffebld expr)
4778 || (ffebld_op (expr) != FFEBLD_opCONTER)
4779 || (ffeinfo_basictype (ffebld_info (expr)) != FFEINFO_basictypeINTEGER)
4780 || (ffeinfo_kindtype (ffebld_info (expr)) == FFEINFO_kindtypeINTEGER4))
4782 ffebad_start (FFEBAD_FORMAT_VARIABLE);
4783 ffebad_here (0, ffelex_token_where_line (f->t), ffelex_token_where_column (f->t));
4790 switch (ffeinfo_kindtype (ffebld_info (expr)))
4792 #if FFETARGET_okINTEGER1
4793 case FFEINFO_kindtypeINTEGER1:
4794 val = ffebld_constant_integer1 (ffebld_conter (expr));
4798 #if FFETARGET_okINTEGER2
4799 case FFEINFO_kindtypeINTEGER2:
4800 val = ffebld_constant_integer2 (ffebld_conter (expr));
4804 #if FFETARGET_okINTEGER3
4805 case FFEINFO_kindtypeINTEGER3:
4806 val = ffebld_constant_integer3 (ffebld_conter (expr));
4811 assert ("bad INTEGER constant kind type" == NULL);
4813 case FFEINFO_kindtypeANY:
4816 ffests_printf_1D (s, "%ld", val);
4820 /* ffestd_R1102 -- PROGRAM statement
4822 ffestd_R1102(name_token);
4824 Make sure ffestd_kind_ identifies an empty block. Make sure name_token
4825 gives a valid name. Implement the beginning of a main program. */
4828 ffestd_R1102 (ffesymbol s, ffelexToken name UNUSED)
4830 ffestd_check_simple_ ();
4832 assert (ffestd_block_level_ == 0);
4833 ffestd_is_reachable_ = TRUE;
4835 ffecom_notify_primary_entry (s);
4836 ffe_set_is_mainprog (TRUE); /* Is a main program. */
4837 ffe_set_is_saveall (TRUE); /* Main program always has implicit SAVE. */
4839 ffestw_set_sym (ffestw_stack_top (), s);
4841 #if FFECOM_targetCURRENT == FFECOM_targetFFE
4843 fputs ("< PROGRAM_unnamed\n", dmpout);
4845 fprintf (dmpout, "< PROGRAM %s\n", ffelex_token_text (name));
4846 #elif FFECOM_targetCURRENT == FFECOM_targetGCC
4852 /* ffestd_R1103 -- End a PROGRAM
4857 ffestd_R1103 (bool ok UNUSED)
4859 assert (ffestd_block_level_ == 0);
4861 if (FFESTD_IS_END_OPTIMIZED_ && ffestd_is_reachable_)
4862 ffestd_R842 (NULL); /* Generate STOP. */
4864 if (ffestw_state (ffestw_stack_top ()) != FFESTV_statePROGRAM5)
4865 ffestd_subr_labels_ (FALSE);/* Handle any undefined labels. */
4873 stmt = ffestd_stmt_new_ (FFESTD_stmtidR1103_);
4874 ffestd_stmt_append_ (stmt);
4879 /* ffestd_R1105 -- MODULE statement
4881 ffestd_R1105(name_token);
4883 Make sure ffestd_kind_ identifies an empty block. Make sure name_token
4884 gives a valid name. Implement the beginning of a module. */
4888 ffestd_R1105 (ffelexToken name)
4890 assert (ffestd_block_level_ == 0);
4892 ffestd_check_simple_ ();
4894 ffestd_subr_f90_ ();
4898 fprintf (dmpout, "* MODULE %s\n", ffelex_token_text (name));
4902 /* ffestd_R1106 -- End a MODULE
4904 ffestd_R1106(TRUE); */
4907 ffestd_R1106 (bool ok)
4909 assert (ffestd_block_level_ == 0);
4911 /* Generate any wrap-up code here (unlikely in MODULE!). */
4913 if (ffestw_state (ffestw_stack_top ()) != FFESTV_stateMODULE5)
4914 ffestd_subr_labels_ (TRUE); /* Handle any undefined labels (unlikely). */
4919 fprintf (dmpout, "< END_MODULE %s\n",
4920 ffelex_token_text (ffestw_name (ffestw_stack_top ())));
4924 /* ffestd_R1107_start -- USE statement list begin
4926 ffestd_R1107_start();
4928 Verify that USE is valid here, and begin accepting items in the list. */
4931 ffestd_R1107_start (ffelexToken name, bool only)
4933 ffestd_check_start_ ();
4935 ffestd_subr_f90_ ();
4939 fprintf (dmpout, "* USE %s,", ffelex_token_text (name)); /* NB
4940 _shriek_begin_uses_. */
4942 fputs ("only: ", dmpout);
4946 /* ffestd_R1107_item -- USE statement for name
4948 ffestd_R1107_item(local_token,use_token);
4950 Make sure name_token identifies a valid object to be USEed. local_token
4951 may be NULL if _start_ was called with only==TRUE. */
4954 ffestd_R1107_item (ffelexToken local, ffelexToken use)
4956 ffestd_check_item_ ();
4957 assert (use != NULL);
4963 fprintf (dmpout, "%s=>", ffelex_token_text (local));
4964 fprintf (dmpout, "%s,", ffelex_token_text (use));
4968 /* ffestd_R1107_finish -- USE statement list complete
4970 ffestd_R1107_finish();
4972 Just wrap up any local activities. */
4975 ffestd_R1107_finish ()
4977 ffestd_check_finish_ ();
4982 fputc ('\n', dmpout);
4987 /* ffestd_R1111 -- BLOCK DATA statement
4989 ffestd_R1111(name_token);
4991 Make sure ffestd_kind_ identifies no current program unit. If not
4992 NULL, make sure name_token gives a valid name. Implement the beginning
4993 of a block data program unit. */
4996 ffestd_R1111 (ffesymbol s, ffelexToken name UNUSED)
4998 assert (ffestd_block_level_ == 0);
4999 ffestd_is_reachable_ = TRUE;
5001 ffestd_check_simple_ ();
5003 ffecom_notify_primary_entry (s);
5004 ffestw_set_sym (ffestw_stack_top (), s);
5006 #if FFECOM_targetCURRENT == FFECOM_targetFFE
5008 fputs ("< BLOCK_DATA_unnamed\n", dmpout);
5010 fprintf (dmpout, "< BLOCK_DATA %s\n", ffelex_token_text (name));
5011 #elif FFECOM_targetCURRENT == FFECOM_targetGCC
5017 /* ffestd_R1112 -- End a BLOCK DATA
5019 ffestd_R1112(TRUE); */
5022 ffestd_R1112 (bool ok UNUSED)
5024 assert (ffestd_block_level_ == 0);
5026 /* Generate any return-like code here (not likely for BLOCK DATA!). */
5028 if (ffestw_state (ffestw_stack_top ()) != FFESTV_stateBLOCKDATA5)
5029 ffestd_subr_labels_ (TRUE); /* Handle any undefined labels. */
5037 stmt = ffestd_stmt_new_ (FFESTD_stmtidR1112_);
5038 ffestd_stmt_append_ (stmt);
5043 /* ffestd_R1202 -- INTERFACE statement
5045 ffestd_R1202(operator,defined_name);
5047 Make sure ffestd_kind_ identifies an INTERFACE block.
5048 Implement the end of the current interface.
5051 Allow no operator or name to mean INTERFACE by itself; missed this
5052 valid form when originally doing syntactic analysis code. */
5056 ffestd_R1202 (ffestpDefinedOperator operator, ffelexToken name)
5058 ffestd_check_simple_ ();
5060 ffestd_subr_f90_ ();
5066 case FFESTP_definedoperatorNone:
5068 fputs ("* INTERFACE_unnamed\n", dmpout);
5070 fprintf (dmpout, "* INTERFACE %s\n", ffelex_token_text (name));
5073 case FFESTP_definedoperatorOPERATOR:
5074 fprintf (dmpout, "* INTERFACE_OPERATOR (.%s.)\n", ffelex_token_text (name));
5077 case FFESTP_definedoperatorASSIGNMENT:
5078 fputs ("* INTERFACE_ASSIGNMENT (=)\n", dmpout);
5081 case FFESTP_definedoperatorPOWER:
5082 fputs ("* INTERFACE_OPERATOR (**)\n", dmpout);
5085 case FFESTP_definedoperatorMULT:
5086 fputs ("* INTERFACE_OPERATOR (*)\n", dmpout);
5089 case FFESTP_definedoperatorADD:
5090 fputs ("* INTERFACE_OPERATOR (+)\n", dmpout);
5093 case FFESTP_definedoperatorCONCAT:
5094 fputs ("* INTERFACE_OPERATOR (//)\n", dmpout);
5097 case FFESTP_definedoperatorDIVIDE:
5098 fputs ("* INTERFACE_OPERATOR (/)\n", dmpout);
5101 case FFESTP_definedoperatorSUBTRACT:
5102 fputs ("* INTERFACE_OPERATOR (-)\n", dmpout);
5105 case FFESTP_definedoperatorNOT:
5106 fputs ("* INTERFACE_OPERATOR (.not.)\n", dmpout);
5109 case FFESTP_definedoperatorAND:
5110 fputs ("* INTERFACE_OPERATOR (.and.)\n", dmpout);
5113 case FFESTP_definedoperatorOR:
5114 fputs ("* INTERFACE_OPERATOR (.or.)\n", dmpout);
5117 case FFESTP_definedoperatorEQV:
5118 fputs ("* INTERFACE_OPERATOR (.eqv.)\n", dmpout);
5121 case FFESTP_definedoperatorNEQV:
5122 fputs ("* INTERFACE_OPERATOR (.neqv.)\n", dmpout);
5125 case FFESTP_definedoperatorEQ:
5126 fputs ("* INTERFACE_OPERATOR (==)\n", dmpout);
5129 case FFESTP_definedoperatorNE:
5130 fputs ("* INTERFACE_OPERATOR (/=)\n", dmpout);
5133 case FFESTP_definedoperatorLT:
5134 fputs ("* INTERFACE_OPERATOR (<)\n", dmpout);
5137 case FFESTP_definedoperatorLE:
5138 fputs ("* INTERFACE_OPERATOR (<=)\n", dmpout);
5141 case FFESTP_definedoperatorGT:
5142 fputs ("* INTERFACE_OPERATOR (>)\n", dmpout);
5145 case FFESTP_definedoperatorGE:
5146 fputs ("* INTERFACE_OPERATOR (>=)\n", dmpout);
5156 /* ffestd_R1203 -- End an INTERFACE
5158 ffestd_R1203(TRUE); */
5161 ffestd_R1203 (bool ok)
5166 fputs ("* END_INTERFACE\n", dmpout);
5170 /* ffestd_R1205_start -- MODULE PROCEDURE statement list begin
5172 ffestd_R1205_start();
5174 Verify that MODULE PROCEDURE is valid here, and begin accepting items in
5178 ffestd_R1205_start ()
5180 ffestd_check_start_ ();
5185 fputs ("* MODULE_PROCEDURE ", dmpout);
5189 /* ffestd_R1205_item -- MODULE PROCEDURE statement for name
5191 ffestd_R1205_item(name_token);
5193 Make sure name_token identifies a valid object to be MODULE PROCEDUREed. */
5196 ffestd_R1205_item (ffelexToken name)
5198 ffestd_check_item_ ();
5199 assert (name != NULL);
5204 fprintf (dmpout, "%s,", ffelex_token_text (name));
5208 /* ffestd_R1205_finish -- MODULE PROCEDURE statement list complete
5210 ffestd_R1205_finish();
5212 Just wrap up any local activities. */
5215 ffestd_R1205_finish ()
5217 ffestd_check_finish_ ();
5222 fputc ('\n', dmpout);
5227 /* ffestd_R1207_start -- EXTERNAL statement list begin
5229 ffestd_R1207_start();
5231 Verify that EXTERNAL is valid here, and begin accepting items in the list. */
5234 ffestd_R1207_start ()
5236 ffestd_check_start_ ();
5238 #if FFECOM_targetCURRENT == FFECOM_targetFFE
5239 fputs ("* EXTERNAL (", dmpout);
5240 #elif FFECOM_targetCURRENT == FFECOM_targetGCC
5246 /* ffestd_R1207_item -- EXTERNAL statement for name
5248 ffestd_R1207_item(name_token);
5250 Make sure name_token identifies a valid object to be EXTERNALd. */
5253 ffestd_R1207_item (ffelexToken name)
5255 ffestd_check_item_ ();
5256 assert (name != NULL);
5258 #if FFECOM_targetCURRENT == FFECOM_targetFFE
5259 fprintf (dmpout, "%s,", ffelex_token_text (name));
5260 #elif FFECOM_targetCURRENT == FFECOM_targetGCC
5266 /* ffestd_R1207_finish -- EXTERNAL statement list complete
5268 ffestd_R1207_finish();
5270 Just wrap up any local activities. */
5273 ffestd_R1207_finish ()
5275 ffestd_check_finish_ ();
5277 #if FFECOM_targetCURRENT == FFECOM_targetFFE
5278 fputs (")\n", dmpout);
5279 #elif FFECOM_targetCURRENT == FFECOM_targetGCC
5285 /* ffestd_R1208_start -- INTRINSIC statement list begin
5287 ffestd_R1208_start();
5289 Verify that INTRINSIC is valid here, and begin accepting items in the list. */
5292 ffestd_R1208_start ()
5294 ffestd_check_start_ ();
5296 #if FFECOM_targetCURRENT == FFECOM_targetFFE
5297 fputs ("* INTRINSIC (", dmpout);
5298 #elif FFECOM_targetCURRENT == FFECOM_targetGCC
5304 /* ffestd_R1208_item -- INTRINSIC statement for name
5306 ffestd_R1208_item(name_token);
5308 Make sure name_token identifies a valid object to be INTRINSICd. */
5311 ffestd_R1208_item (ffelexToken name)
5313 ffestd_check_item_ ();
5314 assert (name != NULL);
5316 #if FFECOM_targetCURRENT == FFECOM_targetFFE
5317 fprintf (dmpout, "%s,", ffelex_token_text (name));
5318 #elif FFECOM_targetCURRENT == FFECOM_targetGCC
5324 /* ffestd_R1208_finish -- INTRINSIC statement list complete
5326 ffestd_R1208_finish();
5328 Just wrap up any local activities. */
5331 ffestd_R1208_finish ()
5333 ffestd_check_finish_ ();
5335 #if FFECOM_targetCURRENT == FFECOM_targetFFE
5336 fputs (")\n", dmpout);
5337 #elif FFECOM_targetCURRENT == FFECOM_targetGCC
5343 /* ffestd_R1212 -- CALL statement
5345 ffestd_R1212(expr,expr_token);
5347 Make sure statement is valid here; implement. */
5350 ffestd_R1212 (ffebld expr)
5352 ffestd_check_simple_ ();
5355 ffestd_subr_line_now_ ();
5356 ffeste_R1212 (expr);
5361 stmt = ffestd_stmt_new_ (FFESTD_stmtidR1212_);
5362 ffestd_stmt_append_ (stmt);
5363 ffestd_subr_line_save_ (stmt);
5364 stmt->u.R1212.pool = ffesta_output_pool;
5365 stmt->u.R1212.expr = expr;
5366 ffesta_set_outpooldisp (FFESTA_pooldispPRESERVE);
5371 /* ffestd_R1213 -- Defined assignment statement
5373 ffestd_R1213(dest_expr,source_expr,source_token);
5375 Make sure the assignment is valid. */
5379 ffestd_R1213 (ffebld dest, ffebld source)
5381 ffestd_check_simple_ ();
5383 ffestd_subr_f90_ ();
5387 fputs ("+ let_defined ", dmpout);
5389 fputs ("=", dmpout);
5390 ffebld_dump (source);
5391 fputc ('\n', dmpout);
5396 /* ffestd_R1219 -- FUNCTION statement
5398 ffestd_R1219(funcname,arglist,ending_token,kind,kindt,len,lent,
5401 Make sure statement is valid here, register arguments for the
5402 function name, and so on.
5405 Added the kind, len, and recursive arguments. */
5408 ffestd_R1219 (ffesymbol s, ffelexToken funcname UNUSED,
5409 ffesttTokenList args UNUSED, ffestpType type UNUSED,
5410 ffebld kind UNUSED, ffelexToken kindt UNUSED,
5411 ffebld len UNUSED, ffelexToken lent UNUSED,
5412 bool recursive UNUSED, ffelexToken result UNUSED,
5413 bool separate_result UNUSED)
5415 #if FFECOM_targetCURRENT == FFECOM_targetFFE
5419 assert (ffestd_block_level_ == 0);
5420 ffestd_is_reachable_ = TRUE;
5422 ffestd_check_simple_ ();
5424 ffecom_notify_primary_entry (s);
5425 ffestw_set_sym (ffestw_stack_top (), s);
5427 #if FFECOM_targetCURRENT == FFECOM_targetFFE
5430 case FFESTP_typeINTEGER:
5434 case FFESTP_typeBYTE:
5438 case FFESTP_typeWORD:
5442 case FFESTP_typeREAL:
5446 case FFESTP_typeCOMPLEX:
5450 case FFESTP_typeLOGICAL:
5454 case FFESTP_typeCHARACTER:
5458 case FFESTP_typeDBLPRCSN:
5459 a = "DOUBLE PRECISION";
5462 case FFESTP_typeDBLCMPLX:
5463 a = "DOUBLE COMPLEX";
5467 case FFESTP_typeTYPE:
5472 case FFESTP_typeNone:
5481 fprintf (dmpout, "< FUNCTION %s ", ffelex_token_text (funcname));
5483 fputs ("RECURSIVE ", dmpout);
5484 fprintf (dmpout, "%s(", a);
5487 fputs ("kind=", dmpout);
5489 fputs (ffelex_token_text (kindt), dmpout);
5493 fputc (',', dmpout);
5497 fputs ("len=", dmpout);
5499 fputs (ffelex_token_text (lent), dmpout);
5503 fprintf (dmpout, ")");
5506 fputs (" (", dmpout);
5507 ffestt_tokenlist_dump (args);
5508 fputc (')', dmpout);
5511 fprintf (dmpout, " result(%s)", ffelex_token_text (result));
5512 fputc ('\n', dmpout);
5513 #elif FFECOM_targetCURRENT == FFECOM_targetGCC
5519 /* ffestd_R1221 -- End a FUNCTION
5521 ffestd_R1221(TRUE); */
5524 ffestd_R1221 (bool ok UNUSED)
5526 assert (ffestd_block_level_ == 0);
5528 if (FFESTD_IS_END_OPTIMIZED_ && ffestd_is_reachable_)
5529 ffestd_R1227 (NULL); /* Generate RETURN. */
5531 if (ffestw_state (ffestw_stack_top ()) != FFESTV_stateFUNCTION5)
5532 ffestd_subr_labels_ (FALSE);/* Handle any undefined labels. */
5540 stmt = ffestd_stmt_new_ (FFESTD_stmtidR1221_);
5541 ffestd_stmt_append_ (stmt);
5546 /* ffestd_R1223 -- SUBROUTINE statement
5548 ffestd_R1223(subrname,arglist,ending_token,recursive_token);
5550 Make sure statement is valid here, register arguments for the
5551 subroutine name, and so on.
5554 Added the recursive argument. */
5557 ffestd_R1223 (ffesymbol s, ffelexToken subrname UNUSED,
5558 ffesttTokenList args UNUSED, ffelexToken final UNUSED,
5559 bool recursive UNUSED)
5561 assert (ffestd_block_level_ == 0);
5562 ffestd_is_reachable_ = TRUE;
5564 ffestd_check_simple_ ();
5566 ffecom_notify_primary_entry (s);
5567 ffestw_set_sym (ffestw_stack_top (), s);
5569 #if FFECOM_targetCURRENT == FFECOM_targetFFE
5570 fprintf (dmpout, "< SUBROUTINE %s ", ffelex_token_text (subrname));
5572 fputs ("recursive ", dmpout);
5575 fputc ('(', dmpout);
5576 ffestt_tokenlist_dump (args);
5577 fputc (')', dmpout);
5579 fputc ('\n', dmpout);
5580 #elif FFECOM_targetCURRENT == FFECOM_targetGCC
5586 /* ffestd_R1225 -- End a SUBROUTINE
5588 ffestd_R1225(TRUE); */
5591 ffestd_R1225 (bool ok UNUSED)
5593 assert (ffestd_block_level_ == 0);
5595 if (FFESTD_IS_END_OPTIMIZED_ && ffestd_is_reachable_)
5596 ffestd_R1227 (NULL); /* Generate RETURN. */
5598 if (ffestw_state (ffestw_stack_top ()) != FFESTV_stateSUBROUTINE5)
5599 ffestd_subr_labels_ (FALSE);/* Handle any undefined labels. */
5607 stmt = ffestd_stmt_new_ (FFESTD_stmtidR1225_);
5608 ffestd_stmt_append_ (stmt);
5613 /* ffestd_R1226 -- ENTRY statement
5615 ffestd_R1226(entryname,arglist,ending_token);
5617 Make sure we're in a SUBROUTINE or FUNCTION, register arguments for the
5618 entry point name, and so on. */
5621 ffestd_R1226 (ffesymbol entry)
5623 ffestd_check_simple_ ();
5625 #if (FFECOM_targetCURRENT == FFECOM_targetFFE) || FFECOM_ONEPASS
5626 ffestd_subr_line_now_ ();
5627 ffeste_R1226 (entry);
5629 if (!ffesta_seen_first_exec || ffecom_2pass_advise_entrypoint (entry))
5633 stmt = ffestd_stmt_new_ (FFESTD_stmtidR1226_);
5634 ffestd_stmt_append_ (stmt);
5635 ffestd_subr_line_save_ (stmt);
5636 stmt->u.R1226.entry = entry;
5637 stmt->u.R1226.entrynum = ++ffestd_2pass_entrypoints_;
5641 ffestd_is_reachable_ = TRUE;
5644 /* ffestd_R1227 -- RETURN statement
5648 Make sure statement is valid here; implement. expr and expr_token are
5649 both NULL if there was no expression. */
5652 ffestd_R1227 (ffebld expr)
5654 ffestd_check_simple_ ();
5657 ffestd_subr_line_now_ ();
5658 ffeste_R1227 (ffestw_stack_top (), expr);
5663 stmt = ffestd_stmt_new_ (FFESTD_stmtidR1227_);
5664 ffestd_stmt_append_ (stmt);
5665 ffestd_subr_line_save_ (stmt);
5666 stmt->u.R1227.pool = ffesta_output_pool;
5667 stmt->u.R1227.block = ffestw_stack_top ();
5668 stmt->u.R1227.expr = expr;
5669 ffesta_set_outpooldisp (FFESTA_pooldispPRESERVE);
5673 if (ffestd_block_level_ == 0)
5674 ffestd_is_reachable_ = FALSE;
5677 /* ffestd_R1228 -- CONTAINS statement
5685 assert (ffestd_block_level_ == 0);
5687 ffestd_check_simple_ ();
5689 /* Generate RETURN/STOP code here */
5691 ffestd_subr_labels_ (ffestw_state (ffestw_stack_top ())
5692 == FFESTV_stateMODULE5); /* Handle any undefined
5695 ffestd_subr_f90_ ();
5699 fputs ("- CONTAINS\n", dmpout);
5704 /* ffestd_R1229_start -- STMTFUNCTION statement begin
5706 ffestd_R1229_start(func_name,func_arg_list,close_paren);
5708 This function does not really need to do anything, since _finish_
5709 gets all the info needed, and ffestc_R1229_start has already
5710 done all the stuff that makes a two-phase operation (start and
5711 finish) for handling statement functions necessary.
5714 Do nothing, now that _finish_ does everything. */
5717 ffestd_R1229_start (ffelexToken name UNUSED, ffesttTokenList args UNUSED)
5719 ffestd_check_start_ ();
5721 #if FFECOM_targetCURRENT == FFECOM_targetFFE
5722 #elif FFECOM_targetCURRENT == FFECOM_targetGCC
5728 /* ffestd_R1229_finish -- STMTFUNCTION statement list complete
5730 ffestd_R1229_finish(s);
5732 The statement function's symbol is passed. Its list of dummy args is
5733 accessed via ffesymbol_dummyargs and its expansion expression (expr)
5734 is accessed via ffesymbol_sfexpr.
5736 If sfexpr is NULL, an error occurred parsing the expansion expression, so
5737 just cancel the effects of ffestd_R1229_start and pretend nothing
5738 happened. Otherwise, install the expression as the expansion for the
5739 statement function, then clean up.
5742 Takes sfunc sym instead of just the expansion expression as an
5743 argument, so this function can do all the work, and _start_ is just
5744 a nicety than can do nothing in a back end. */
5747 ffestd_R1229_finish (ffesymbol s)
5749 #if FFECOM_targetCURRENT == FFECOM_targetFFE
5750 ffebld args = ffesymbol_dummyargs (s);
5752 ffebld expr = ffesymbol_sfexpr (s);
5754 ffestd_check_finish_ ();
5757 return; /* Nothing to do, definition didn't work. */
5759 #if FFECOM_targetCURRENT == FFECOM_targetFFE
5760 fprintf (dmpout, "* stmtfunction %s(", ffesymbol_text (s));
5761 for (; args != NULL; args = ffebld_trail (args))
5762 fprintf (dmpout, "%s,", ffesymbol_text (ffebld_symter (ffebld_head (args))));
5763 fputs (")=", dmpout);
5765 fputc ('\n', dmpout);
5766 #if 0 /* Normally no need to preserve the
5768 ffesymbol_set_sfexpr (s, NULL); /* Except expr.c sees NULL
5769 as recursive reference!
5770 So until we can use something
5771 convenient, like a "permanent"
5772 expression, don't worry about
5773 wasting some memory in the
5776 ffesta_set_outpooldisp (FFESTA_pooldispPRESERVE);
5778 #elif FFECOM_targetCURRENT == FFECOM_targetGCC
5779 /* With gcc, cannot do anything here, because the backend hasn't even
5780 (necessarily) been notified that we're compiling a program unit! */
5782 #if 0 /* Must preserve the expression for gcc. */
5783 ffesymbol_set_sfexpr (s, NULL);
5785 ffesta_set_outpooldisp (FFESTA_pooldispPRESERVE);
5792 /* ffestd_S3P4 -- INCLUDE line
5794 ffestd_S3P4(filename,filename_token);
5796 Make sure INCLUDE not preceded by any semicolons or a label def; implement. */
5799 ffestd_S3P4 (ffebld filename)
5802 ffetargetCharacterDefault buildname;
5805 ffestd_check_simple_ ();
5807 assert (filename != NULL);
5808 if (ffebld_op (filename) != FFEBLD_opANY)
5810 assert (ffebld_op (filename) == FFEBLD_opCONTER);
5811 assert (ffeinfo_basictype (ffebld_info (filename))
5812 == FFEINFO_basictypeCHARACTER);
5813 assert (ffeinfo_kindtype (ffebld_info (filename))
5814 == FFEINFO_kindtypeCHARACTERDEFAULT);
5815 buildname = ffebld_constant_characterdefault (ffebld_conter (filename));
5816 wf = ffewhere_file_new (ffetarget_text_characterdefault (buildname),
5817 ffetarget_length_characterdefault (buildname));
5818 fi = ffecom_open_include (ffewhere_file_name (wf),
5819 ffelex_token_where_line (ffesta_tokens[0]),
5820 ffelex_token_where_column (ffesta_tokens[0]));
5822 ffewhere_file_kill (wf);
5824 ffelex_set_include (wf, (ffelex_token_type (ffesta_tokens[0])
5825 == FFELEX_typeNAME), fi);
5829 /* ffestd_V003_start -- STRUCTURE statement list begin
5831 ffestd_V003_start(structure_name);
5833 Verify that STRUCTURE is valid here, and begin accepting items in the list. */
5837 ffestd_V003_start (ffelexToken structure_name)
5839 ffestd_check_start_ ();
5841 #if FFECOM_targetCURRENT == FFECOM_targetFFE
5842 if (structure_name == NULL)
5843 fputs ("* STRUCTURE_unnamed ", dmpout);
5845 fprintf (dmpout, "* STRUCTURE %s ", ffelex_token_text (structure_name));
5846 #elif FFECOM_targetCURRENT == FFECOM_targetGCC
5847 ffestd_subr_vxt_ ();
5853 /* ffestd_V003_item -- STRUCTURE statement for object-name
5855 ffestd_V003_item(name_token,dim_list);
5857 Make sure name_token identifies a valid object to be STRUCTUREd. */
5860 ffestd_V003_item (ffelexToken name, ffesttDimList dims)
5862 ffestd_check_item_ ();
5864 #if FFECOM_targetCURRENT == FFECOM_targetFFE
5865 fputs (ffelex_token_text (name), dmpout);
5868 fputc ('(', dmpout);
5869 ffestt_dimlist_dump (dims);
5870 fputc (')', dmpout);
5872 fputc (',', dmpout);
5873 #elif FFECOM_targetCURRENT == FFECOM_targetGCC
5879 /* ffestd_V003_finish -- STRUCTURE statement list complete
5881 ffestd_V003_finish();
5883 Just wrap up any local activities. */
5886 ffestd_V003_finish ()
5888 ffestd_check_finish_ ();
5890 #if FFECOM_targetCURRENT == FFECOM_targetFFE
5891 fputc ('\n', dmpout);
5892 #elif FFECOM_targetCURRENT == FFECOM_targetGCC
5898 /* ffestd_V004 -- End a STRUCTURE
5900 ffestd_V004(TRUE); */
5903 ffestd_V004 (bool ok)
5905 #if FFECOM_targetCURRENT == FFECOM_targetFFE
5906 fputs ("* END_STRUCTURE\n", dmpout);
5907 #elif FFECOM_targetCURRENT == FFECOM_targetGCC
5913 /* ffestd_V009 -- UNION statement
5920 ffestd_check_simple_ ();
5922 #if FFECOM_targetCURRENT == FFECOM_targetFFE
5923 fputs ("* UNION\n", dmpout);
5924 #elif FFECOM_targetCURRENT == FFECOM_targetGCC
5930 /* ffestd_V010 -- End a UNION
5932 ffestd_V010(TRUE); */
5935 ffestd_V010 (bool ok)
5937 #if FFECOM_targetCURRENT == FFECOM_targetFFE
5938 fputs ("* END_UNION\n", dmpout);
5939 #elif FFECOM_targetCURRENT == FFECOM_targetGCC
5945 /* ffestd_V012 -- MAP statement
5952 ffestd_check_simple_ ();
5954 #if FFECOM_targetCURRENT == FFECOM_targetFFE
5955 fputs ("* MAP\n", dmpout);
5956 #elif FFECOM_targetCURRENT == FFECOM_targetGCC
5962 /* ffestd_V013 -- End a MAP
5964 ffestd_V013(TRUE); */
5967 ffestd_V013 (bool ok)
5969 #if FFECOM_targetCURRENT == FFECOM_targetFFE
5970 fputs ("* END_MAP\n", dmpout);
5971 #elif FFECOM_targetCURRENT == FFECOM_targetGCC
5978 /* ffestd_V014_start -- VOLATILE statement list begin
5980 ffestd_V014_start();
5982 Verify that VOLATILE is valid here, and begin accepting items in the list. */
5985 ffestd_V014_start ()
5987 ffestd_check_start_ ();
5989 #if FFECOM_targetCURRENT == FFECOM_targetFFE
5990 fputs ("* VOLATILE (", dmpout);
5991 #elif FFECOM_targetCURRENT == FFECOM_targetGCC
5992 ffestd_subr_vxt_ ();
5998 /* ffestd_V014_item_object -- VOLATILE statement for object-name
6000 ffestd_V014_item_object(name_token);
6002 Make sure name_token identifies a valid object to be VOLATILEd. */
6005 ffestd_V014_item_object (ffelexToken name UNUSED)
6007 ffestd_check_item_ ();
6009 #if FFECOM_targetCURRENT == FFECOM_targetFFE
6010 fprintf (dmpout, "%s,", ffelex_token_text (name));
6011 #elif FFECOM_targetCURRENT == FFECOM_targetGCC
6017 /* ffestd_V014_item_cblock -- VOLATILE statement for common-block-name
6019 ffestd_V014_item_cblock(name_token);
6021 Make sure name_token identifies a valid common block to be VOLATILEd. */
6024 ffestd_V014_item_cblock (ffelexToken name UNUSED)
6026 ffestd_check_item_ ();
6028 #if FFECOM_targetCURRENT == FFECOM_targetFFE
6029 fprintf (dmpout, "/%s/,", ffelex_token_text (name));
6030 #elif FFECOM_targetCURRENT == FFECOM_targetGCC
6036 /* ffestd_V014_finish -- VOLATILE statement list complete
6038 ffestd_V014_finish();
6040 Just wrap up any local activities. */
6043 ffestd_V014_finish ()
6045 ffestd_check_finish_ ();
6047 #if FFECOM_targetCURRENT == FFECOM_targetFFE
6048 fputs (")\n", dmpout);
6049 #elif FFECOM_targetCURRENT == FFECOM_targetGCC
6055 /* ffestd_V016_start -- RECORD statement list begin
6057 ffestd_V016_start();
6059 Verify that RECORD is valid here, and begin accepting items in the list. */
6063 ffestd_V016_start ()
6065 ffestd_check_start_ ();
6067 #if FFECOM_targetCURRENT == FFECOM_targetFFE
6068 fputs ("* RECORD ", dmpout);
6069 #elif FFECOM_targetCURRENT == FFECOM_targetGCC
6070 ffestd_subr_vxt_ ();
6076 /* ffestd_V016_item_structure -- RECORD statement for common-block-name
6078 ffestd_V016_item_structure(name_token);
6080 Make sure name_token identifies a valid structure to be RECORDed. */
6083 ffestd_V016_item_structure (ffelexToken name)
6085 ffestd_check_item_ ();
6087 #if FFECOM_targetCURRENT == FFECOM_targetFFE
6088 fprintf (dmpout, "/%s/,", ffelex_token_text (name));
6089 #elif FFECOM_targetCURRENT == FFECOM_targetGCC
6095 /* ffestd_V016_item_object -- RECORD statement for object-name
6097 ffestd_V016_item_object(name_token,dim_list);
6099 Make sure name_token identifies a valid object to be RECORDd. */
6102 ffestd_V016_item_object (ffelexToken name, ffesttDimList dims)
6104 ffestd_check_item_ ();
6106 #if FFECOM_targetCURRENT == FFECOM_targetFFE
6107 fputs (ffelex_token_text (name), dmpout);
6110 fputc ('(', dmpout);
6111 ffestt_dimlist_dump (dims);
6112 fputc (')', dmpout);
6114 fputc (',', dmpout);
6115 #elif FFECOM_targetCURRENT == FFECOM_targetGCC
6121 /* ffestd_V016_finish -- RECORD statement list complete
6123 ffestd_V016_finish();
6125 Just wrap up any local activities. */
6128 ffestd_V016_finish ()
6130 ffestd_check_finish_ ();
6132 #if FFECOM_targetCURRENT == FFECOM_targetFFE
6133 fputc ('\n', dmpout);
6134 #elif FFECOM_targetCURRENT == FFECOM_targetGCC
6140 /* ffestd_V018_start -- REWRITE(...) statement list begin
6142 ffestd_V018_start();
6144 Verify that REWRITE is valid here, and begin accepting items in the
6148 ffestd_V018_start (ffestvFormat format)
6150 ffestd_check_start_ ();
6152 #if FFECOM_targetCURRENT == FFECOM_targetFFE
6155 ffestd_subr_line_now_ ();
6156 ffeste_V018_start (&ffestp_file.rewrite, format);
6161 stmt = ffestd_stmt_new_ (FFESTD_stmtidV018_);
6162 ffestd_stmt_append_ (stmt);
6163 ffestd_subr_line_save_ (stmt);
6164 stmt->u.V018.pool = ffesta_output_pool;
6165 stmt->u.V018.params = ffestd_subr_copy_rewrite_ ();
6166 stmt->u.V018.format = format;
6167 stmt->u.V018.list = NULL;
6168 ffestd_expr_list_ = &stmt->u.V018.list;
6169 ffesta_set_outpooldisp (FFESTA_pooldispPRESERVE);
6174 #if FFECOM_targetCURRENT == FFECOM_targetGCC
6175 ffestd_subr_vxt_ ();
6179 /* ffestd_V018_item -- REWRITE statement i/o item
6181 ffestd_V018_item(expr,expr_token);
6183 Implement output-list expression. */
6186 ffestd_V018_item (ffebld expr)
6188 ffestd_check_item_ ();
6190 #if FFECOM_targetCURRENT == FFECOM_targetFFE
6193 ffeste_V018_item (expr);
6196 ffestdExprItem_ item
6197 = (ffestdExprItem_) malloc_new_kp (ffesta_output_pool, "ffestdExprItem_",
6202 *ffestd_expr_list_ = item;
6203 ffestd_expr_list_ = &item->next;
6208 #if FFECOM_targetCURRENT == FFECOM_targetGCC
6212 /* ffestd_V018_finish -- REWRITE statement list complete
6214 ffestd_V018_finish();
6216 Just wrap up any local activities. */
6219 ffestd_V018_finish ()
6221 ffestd_check_finish_ ();
6223 #if FFECOM_targetCURRENT == FFECOM_targetFFE
6226 ffeste_V018_finish ();
6228 /* Nothing to do, it's implicit. */
6232 #if FFECOM_targetCURRENT == FFECOM_targetGCC
6236 /* ffestd_V019_start -- ACCEPT statement list begin
6238 ffestd_V019_start();
6240 Verify that ACCEPT is valid here, and begin accepting items in the
6244 ffestd_V019_start (ffestvFormat format)
6246 ffestd_check_start_ ();
6248 #if FFECOM_targetCURRENT == FFECOM_targetFFE
6251 ffestd_subr_line_now_ ();
6252 ffeste_V019_start (&ffestp_file.accept, format);
6257 stmt = ffestd_stmt_new_ (FFESTD_stmtidV019_);
6258 ffestd_stmt_append_ (stmt);
6259 ffestd_subr_line_save_ (stmt);
6260 stmt->u.V019.pool = ffesta_output_pool;
6261 stmt->u.V019.params = ffestd_subr_copy_accept_ ();
6262 stmt->u.V019.format = format;
6263 stmt->u.V019.list = NULL;
6264 ffestd_expr_list_ = &stmt->u.V019.list;
6265 ffesta_set_outpooldisp (FFESTA_pooldispPRESERVE);
6270 #if FFECOM_targetCURRENT == FFECOM_targetGCC
6271 ffestd_subr_vxt_ ();
6275 /* ffestd_V019_item -- ACCEPT statement i/o item
6277 ffestd_V019_item(expr,expr_token);
6279 Implement output-list expression. */
6282 ffestd_V019_item (ffebld expr)
6284 ffestd_check_item_ ();
6286 #if FFECOM_targetCURRENT == FFECOM_targetFFE
6289 ffeste_V019_item (expr);
6292 ffestdExprItem_ item
6293 = (ffestdExprItem_) malloc_new_kp (ffesta_output_pool, "ffestdExprItem_",
6298 *ffestd_expr_list_ = item;
6299 ffestd_expr_list_ = &item->next;
6304 #if FFECOM_targetCURRENT == FFECOM_targetGCC
6308 /* ffestd_V019_finish -- ACCEPT statement list complete
6310 ffestd_V019_finish();
6312 Just wrap up any local activities. */
6315 ffestd_V019_finish ()
6317 ffestd_check_finish_ ();
6319 #if FFECOM_targetCURRENT == FFECOM_targetFFE
6322 ffeste_V019_finish ();
6324 /* Nothing to do, it's implicit. */
6328 #if FFECOM_targetCURRENT == FFECOM_targetGCC
6333 /* ffestd_V020_start -- TYPE statement list begin
6335 ffestd_V020_start();
6337 Verify that TYPE is valid here, and begin accepting items in the
6341 ffestd_V020_start (ffestvFormat format UNUSED)
6343 ffestd_check_start_ ();
6345 #if FFECOM_targetCURRENT == FFECOM_targetFFE
6348 ffestd_subr_line_now_ ();
6349 ffeste_V020_start (&ffestp_file.type, format);
6354 stmt = ffestd_stmt_new_ (FFESTD_stmtidV020_);
6355 ffestd_stmt_append_ (stmt);
6356 ffestd_subr_line_save_ (stmt);
6357 stmt->u.V020.pool = ffesta_output_pool;
6358 stmt->u.V020.params = ffestd_subr_copy_type_ ();
6359 stmt->u.V020.format = format;
6360 stmt->u.V020.list = NULL;
6361 ffestd_expr_list_ = &stmt->u.V020.list;
6362 ffesta_set_outpooldisp (FFESTA_pooldispPRESERVE);
6367 #if FFECOM_targetCURRENT == FFECOM_targetGCC
6368 ffestd_subr_vxt_ ();
6372 /* ffestd_V020_item -- TYPE statement i/o item
6374 ffestd_V020_item(expr,expr_token);
6376 Implement output-list expression. */
6379 ffestd_V020_item (ffebld expr UNUSED)
6381 ffestd_check_item_ ();
6383 #if FFECOM_targetCURRENT == FFECOM_targetFFE
6386 ffeste_V020_item (expr);
6389 ffestdExprItem_ item
6390 = (ffestdExprItem_) malloc_new_kp (ffesta_output_pool, "ffestdExprItem_",
6395 *ffestd_expr_list_ = item;
6396 ffestd_expr_list_ = &item->next;
6401 #if FFECOM_targetCURRENT == FFECOM_targetGCC
6405 /* ffestd_V020_finish -- TYPE statement list complete
6407 ffestd_V020_finish();
6409 Just wrap up any local activities. */
6412 ffestd_V020_finish ()
6414 ffestd_check_finish_ ();
6416 #if FFECOM_targetCURRENT == FFECOM_targetFFE
6419 ffeste_V020_finish ();
6421 /* Nothing to do, it's implicit. */
6425 #if FFECOM_targetCURRENT == FFECOM_targetGCC
6429 /* ffestd_V021 -- DELETE statement
6433 Make sure a DELETE is valid in the current context, and implement it. */
6439 ffestd_check_simple_ ();
6441 #if FFECOM_targetCURRENT == FFECOM_targetFFE
6444 ffestd_subr_line_now_ ();
6445 ffeste_V021 (&ffestp_file.delete);
6450 stmt = ffestd_stmt_new_ (FFESTD_stmtidV021_);
6451 ffestd_stmt_append_ (stmt);
6452 ffestd_subr_line_save_ (stmt);
6453 stmt->u.V021.pool = ffesta_output_pool;
6454 stmt->u.V021.params = ffestd_subr_copy_delete_ ();
6455 ffesta_set_outpooldisp (FFESTA_pooldispPRESERVE);
6460 #if FFECOM_targetCURRENT == FFECOM_targetGCC
6461 ffestd_subr_vxt_ ();
6465 /* ffestd_V022 -- UNLOCK statement
6469 Make sure a UNLOCK is valid in the current context, and implement it. */
6474 ffestd_check_simple_ ();
6476 #if FFECOM_targetCURRENT == FFECOM_targetFFE
6479 ffestd_subr_line_now_ ();
6480 ffeste_V022 (&ffestp_file.beru);
6485 stmt = ffestd_stmt_new_ (FFESTD_stmtidV022_);
6486 ffestd_stmt_append_ (stmt);
6487 ffestd_subr_line_save_ (stmt);
6488 stmt->u.V022.pool = ffesta_output_pool;
6489 stmt->u.V022.params = ffestd_subr_copy_beru_ ();
6490 ffesta_set_outpooldisp (FFESTA_pooldispPRESERVE);
6495 #if FFECOM_targetCURRENT == FFECOM_targetGCC
6496 ffestd_subr_vxt_ ();
6500 /* ffestd_V023_start -- ENCODE(...) statement list begin
6502 ffestd_V023_start();
6504 Verify that ENCODE is valid here, and begin accepting items in the
6508 ffestd_V023_start ()
6510 ffestd_check_start_ ();
6512 #if FFECOM_targetCURRENT == FFECOM_targetFFE
6515 ffestd_subr_line_now_ ();
6516 ffeste_V023_start (&ffestp_file.vxtcode);
6521 stmt = ffestd_stmt_new_ (FFESTD_stmtidV023_);
6522 ffestd_stmt_append_ (stmt);
6523 ffestd_subr_line_save_ (stmt);
6524 stmt->u.V023.pool = ffesta_output_pool;
6525 stmt->u.V023.params = ffestd_subr_copy_vxtcode_ ();
6526 stmt->u.V023.list = NULL;
6527 ffestd_expr_list_ = &stmt->u.V023.list;
6528 ffesta_set_outpooldisp (FFESTA_pooldispPRESERVE);
6533 #if FFECOM_targetCURRENT == FFECOM_targetGCC
6534 ffestd_subr_vxt_ ();
6538 /* ffestd_V023_item -- ENCODE statement i/o item
6540 ffestd_V023_item(expr,expr_token);
6542 Implement output-list expression. */
6545 ffestd_V023_item (ffebld expr)
6547 ffestd_check_item_ ();
6549 #if FFECOM_targetCURRENT == FFECOM_targetFFE
6552 ffeste_V023_item (expr);
6555 ffestdExprItem_ item
6556 = (ffestdExprItem_) malloc_new_kp (ffesta_output_pool, "ffestdExprItem_",
6561 *ffestd_expr_list_ = item;
6562 ffestd_expr_list_ = &item->next;
6567 #if FFECOM_targetCURRENT == FFECOM_targetGCC
6571 /* ffestd_V023_finish -- ENCODE statement list complete
6573 ffestd_V023_finish();
6575 Just wrap up any local activities. */
6578 ffestd_V023_finish ()
6580 ffestd_check_finish_ ();
6582 #if FFECOM_targetCURRENT == FFECOM_targetFFE
6585 ffeste_V023_finish ();
6587 /* Nothing to do, it's implicit. */
6591 #if FFECOM_targetCURRENT == FFECOM_targetGCC
6595 /* ffestd_V024_start -- DECODE(...) statement list begin
6597 ffestd_V024_start();
6599 Verify that DECODE is valid here, and begin accepting items in the
6603 ffestd_V024_start ()
6605 ffestd_check_start_ ();
6607 #if FFECOM_targetCURRENT == FFECOM_targetFFE
6610 ffestd_subr_line_now_ ();
6611 ffeste_V024_start (&ffestp_file.vxtcode);
6616 stmt = ffestd_stmt_new_ (FFESTD_stmtidV024_);
6617 ffestd_stmt_append_ (stmt);
6618 ffestd_subr_line_save_ (stmt);
6619 stmt->u.V024.pool = ffesta_output_pool;
6620 stmt->u.V024.params = ffestd_subr_copy_vxtcode_ ();
6621 stmt->u.V024.list = NULL;
6622 ffestd_expr_list_ = &stmt->u.V024.list;
6623 ffesta_set_outpooldisp (FFESTA_pooldispPRESERVE);
6628 #if FFECOM_targetCURRENT == FFECOM_targetGCC
6629 ffestd_subr_vxt_ ();
6633 /* ffestd_V024_item -- DECODE statement i/o item
6635 ffestd_V024_item(expr,expr_token);
6637 Implement output-list expression. */
6640 ffestd_V024_item (ffebld expr)
6642 ffestd_check_item_ ();
6644 #if FFECOM_targetCURRENT == FFECOM_targetFFE
6647 ffeste_V024_item (expr);
6650 ffestdExprItem_ item
6651 = (ffestdExprItem_) malloc_new_kp (ffesta_output_pool, "ffestdExprItem_",
6656 *ffestd_expr_list_ = item;
6657 ffestd_expr_list_ = &item->next;
6662 #if FFECOM_targetCURRENT == FFECOM_targetGCC
6666 /* ffestd_V024_finish -- DECODE statement list complete
6668 ffestd_V024_finish();
6670 Just wrap up any local activities. */
6673 ffestd_V024_finish ()
6675 ffestd_check_finish_ ();
6677 #if FFECOM_targetCURRENT == FFECOM_targetFFE
6680 ffeste_V024_finish ();
6682 /* Nothing to do, it's implicit. */
6686 #if FFECOM_targetCURRENT == FFECOM_targetGCC
6690 /* ffestd_V025_start -- DEFINEFILE statement list begin
6692 ffestd_V025_start();
6694 Verify that DEFINEFILE is valid here, and begin accepting items in the
6698 ffestd_V025_start ()
6700 ffestd_check_start_ ();
6702 #if FFECOM_targetCURRENT == FFECOM_targetFFE
6705 ffestd_subr_line_now_ ();
6706 ffeste_V025_start ();
6711 stmt = ffestd_stmt_new_ (FFESTD_stmtidV025start_);
6712 ffestd_stmt_append_ (stmt);
6713 ffestd_subr_line_save_ (stmt);
6714 ffesta_set_outpooldisp (FFESTA_pooldispPRESERVE);
6719 #if FFECOM_targetCURRENT == FFECOM_targetGCC
6720 ffestd_subr_vxt_ ();
6724 /* ffestd_V025_item -- DEFINE FILE statement item
6726 ffestd_V025_item(u,ut,m,mt,n,nt,asv,asvt);
6728 Implement item. Treat each item kind of like a separate statement,
6729 since there's really no need to treat them as an aggregate. */
6732 ffestd_V025_item (ffebld u, ffebld m, ffebld n, ffebld asv)
6734 ffestd_check_item_ ();
6736 #if FFECOM_targetCURRENT == FFECOM_targetFFE
6739 ffeste_V025_item (u, m, n, asv);
6744 stmt = ffestd_stmt_new_ (FFESTD_stmtidV025item_);
6745 ffestd_stmt_append_ (stmt);
6746 stmt->u.V025item.u = u;
6747 stmt->u.V025item.m = m;
6748 stmt->u.V025item.n = n;
6749 stmt->u.V025item.asv = asv;
6754 #if FFECOM_targetCURRENT == FFECOM_targetGCC
6758 /* ffestd_V025_finish -- DEFINE FILE statement list complete
6760 ffestd_V025_finish();
6762 Just wrap up any local activities. */
6765 ffestd_V025_finish ()
6767 ffestd_check_finish_ ();
6769 #if FFECOM_targetCURRENT == FFECOM_targetFFE
6772 ffeste_V025_finish ();
6777 stmt = ffestd_stmt_new_ (FFESTD_stmtidV025finish_);
6778 stmt->u.V025finish.pool = ffesta_output_pool;
6779 ffestd_stmt_append_ (stmt);
6784 #if FFECOM_targetCURRENT == FFECOM_targetGCC
6788 /* ffestd_V026 -- FIND statement
6792 Make sure a FIND is valid in the current context, and implement it. */
6797 ffestd_check_simple_ ();
6799 #if FFECOM_targetCURRENT == FFECOM_targetFFE
6802 ffestd_subr_line_now_ ();
6803 ffeste_V026 (&ffestp_file.find);
6808 stmt = ffestd_stmt_new_ (FFESTD_stmtidV026_);
6809 ffestd_stmt_append_ (stmt);
6810 ffestd_subr_line_save_ (stmt);
6811 stmt->u.V026.pool = ffesta_output_pool;
6812 stmt->u.V026.params = ffestd_subr_copy_find_ ();
6813 ffesta_set_outpooldisp (FFESTA_pooldispPRESERVE);
6818 #if FFECOM_targetCURRENT == FFECOM_targetGCC
6819 ffestd_subr_vxt_ ();
6824 /* ffestd_V027_start -- VXT PARAMETER statement list begin
6826 ffestd_V027_start();
6828 Verify that PARAMETER is valid here, and begin accepting items in the list. */
6831 ffestd_V027_start ()
6833 ffestd_check_start_ ();
6835 #if FFECOM_targetCURRENT == FFECOM_targetFFE
6836 fputs ("* PARAMETER_vxt ", dmpout);
6838 #if FFECOM_targetCURRENT == FFECOM_targetGCC
6839 ffestd_subr_vxt_ ();
6844 /* ffestd_V027_item -- VXT PARAMETER statement assignment
6846 ffestd_V027_item(dest,dest_token,source,source_token);
6848 Make sure the source is a valid source for the destination; make the
6852 ffestd_V027_item (ffelexToken dest_token UNUSED, ffebld source UNUSED)
6854 ffestd_check_item_ ();
6856 #if FFECOM_targetCURRENT == FFECOM_targetFFE
6857 fputs (ffelex_token_text (dest_token), dmpout);
6858 fputc ('=', dmpout);
6859 ffebld_dump (source);
6860 fputc (',', dmpout);
6861 #elif FFECOM_targetCURRENT == FFECOM_targetGCC
6867 /* ffestd_V027_finish -- VXT PARAMETER statement list complete
6869 ffestd_V027_finish();
6871 Just wrap up any local activities. */
6874 ffestd_V027_finish ()
6876 ffestd_check_finish_ ();
6878 #if FFECOM_targetCURRENT == FFECOM_targetFFE
6879 fputc ('\n', dmpout);
6880 #elif FFECOM_targetCURRENT == FFECOM_targetGCC
6886 /* Any executable statement. */
6891 ffestd_check_simple_ ();
6894 ffestd_subr_line_now_ ();
6900 stmt = ffestd_stmt_new_ (FFESTD_stmtidR841_);
6901 ffestd_stmt_append_ (stmt);
6902 ffestd_subr_line_save_ (stmt);