1 /* Pass manager for Fortran front end.
2 Copyright (C) 2010 Free Software Foundation, Inc.
3 Contributed by Thomas König.
5 This file is part of GCC.
7 GCC is free software; you can redistribute it and/or modify it under
8 the terms of the GNU General Public License as published by the Free
9 Software Foundation; either version 3, or (at your option) any later
12 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
13 WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
17 You should have received a copy of the GNU General Public License
18 along with GCC; see the file COPYING3. If not see
19 <http://www.gnu.org/licenses/>. */
26 #include "dependency.h"
27 #include "constructor.h"
30 /* Forward declarations. */
32 static void strip_function_call (gfc_expr *);
33 static void optimize_namespace (gfc_namespace *);
34 static void optimize_assignment (gfc_code *);
35 static bool optimize_op (gfc_expr *);
36 static bool optimize_comparison (gfc_expr *, gfc_intrinsic_op);
37 static bool optimize_trim (gfc_expr *);
39 /* How deep we are inside an argument list. */
41 static int count_arglist;
43 /* Pointer to an array of gfc_expr ** we operate on, plus its size
46 static gfc_expr ***expr_array;
47 static int expr_size, expr_count;
49 /* Pointer to the gfc_code we currently work on - to be able to insert
50 a statement before. */
52 static gfc_code **current_code;
54 /* The namespace we are currently dealing with. */
56 gfc_namespace *current_ns;
58 /* Entry point - run all passes for a namespace. So far, only an
59 optimization pass is run. */
62 gfc_run_passes (gfc_namespace *ns)
67 expr_array = XNEWVEC(gfc_expr **, expr_size);
69 optimize_namespace (ns);
70 if (gfc_option.dump_fortran_optimized)
71 gfc_dump_parse_tree (ns, stdout);
73 /* FIXME: The following should be XDELETEVEC(expr_array);
74 but we cannot do that because it depends on free. */
75 gfc_free (expr_array);
79 /* Callback for each gfc_code node invoked through gfc_code_walker
80 from optimize_namespace. */
83 optimize_code (gfc_code **c, int *walk_subtrees ATTRIBUTE_UNUSED,
84 void *data ATTRIBUTE_UNUSED)
91 if (op == EXEC_CALL || op == EXEC_COMPCALL || op == EXEC_ASSIGN_CALL
92 || op == EXEC_CALL_PPC)
97 if (op == EXEC_ASSIGN)
98 optimize_assignment (*c);
102 /* Callback for each gfc_expr node invoked through gfc_code_walker
103 from optimize_namespace. */
106 optimize_expr (gfc_expr **e, int *walk_subtrees ATTRIBUTE_UNUSED,
107 void *data ATTRIBUTE_UNUSED)
111 if ((*e)->expr_type == EXPR_FUNCTION)
114 function_expr = true;
117 function_expr = false;
119 if (optimize_trim (*e))
120 gfc_simplify_expr (*e, 0);
122 if ((*e)->expr_type == EXPR_OP && optimize_op (*e))
123 gfc_simplify_expr (*e, 0);
132 /* Callback function for common function elimination, called from cfe_expr_0.
133 Put all eligible function expressions into expr_array. We can't do
134 allocatable functions. */
137 cfe_register_funcs (gfc_expr **e, int *walk_subtrees ATTRIBUTE_UNUSED,
138 void *data ATTRIBUTE_UNUSED)
140 if ((*e)->expr_type != EXPR_FUNCTION)
143 /* We don't do character functions (yet). */
144 if ((*e)->ts.type == BT_CHARACTER)
147 /* If we don't know the shape at compile time, we do not create a temporary
148 variable to hold the intermediate result. FIXME: Change this later when
149 allocation on assignment works for intrinsics. */
151 if ((*e)->rank > 0 && (*e)->shape == NULL)
154 /* Skip the test for pure functions if -faggressive-function-elimination
156 if ((*e)->value.function.esym)
158 if ((*e)->value.function.esym->attr.allocatable)
161 /* Don't create an array temporary for elemental functions. */
162 if ((*e)->value.function.esym->attr.elemental && (*e)->rank > 0)
165 /* Only eliminate potentially impure functions if the
166 user specifically requested it. */
167 if (!gfc_option.flag_aggressive_function_elimination
168 && !(*e)->value.function.esym->attr.pure
169 && !(*e)->value.function.esym->attr.implicit_pure)
173 if ((*e)->value.function.isym)
175 /* Conversions are handled on the fly by the middle end,
176 transpose during trans-* stages. */
177 if ((*e)->value.function.isym->id == GFC_ISYM_CONVERSION
178 || (*e)->value.function.isym->id == GFC_ISYM_TRANSPOSE)
181 /* Don't create an array temporary for elemental functions,
182 as this would be wasteful of memory.
183 FIXME: Create a scalar temporary during scalarization. */
184 if ((*e)->value.function.isym->elemental && (*e)->rank > 0)
187 if (!(*e)->value.function.isym->pure)
191 if (expr_count >= expr_size)
193 expr_size += expr_size;
194 expr_array = XRESIZEVEC(gfc_expr **, expr_array, expr_size);
196 expr_array[expr_count] = e;
201 /* Returns a new expression (a variable) to be used in place of the old one,
202 with an an assignment statement before the current statement to set
203 the value of the variable. */
206 create_var (gfc_expr * e)
208 char name[GFC_MAX_SYMBOL_LEN +1];
210 gfc_symtree *symtree;
216 sprintf(name, "__var_%d",num++);
217 if (gfc_get_sym_tree (name, current_ns, &symtree, false) != 0)
220 symbol = symtree->n.sym;
222 symbol->as = gfc_get_array_spec ();
223 symbol->as->rank = e->rank;
224 symbol->as->type = AS_EXPLICIT;
225 for (i=0; i<e->rank; i++)
229 p = gfc_get_constant_expr (BT_INTEGER, gfc_default_integer_kind,
231 mpz_set_si (p->value.integer, 1);
232 symbol->as->lower[i] = p;
234 q = gfc_get_constant_expr (BT_INTEGER, gfc_index_integer_kind,
236 mpz_set (q->value.integer, e->shape[i]);
237 symbol->as->upper[i] = q;
240 symbol->attr.flavor = FL_VARIABLE;
241 symbol->attr.referenced = 1;
242 symbol->attr.dimension = e->rank > 0;
243 gfc_commit_symbol (symbol);
245 result = gfc_get_expr ();
246 result->expr_type = EXPR_VARIABLE;
248 result->rank = e->rank;
249 result->shape = gfc_copy_shape (e->shape, e->rank);
250 result->symtree = symtree;
251 result->where = e->where;
254 result->ref = gfc_get_ref ();
255 result->ref->type = REF_ARRAY;
256 result->ref->u.ar.type = AR_FULL;
257 result->ref->u.ar.where = e->where;
258 result->ref->u.ar.as = symbol->as;
259 if (gfc_option.warn_array_temp)
260 gfc_warning ("Creating array temporary at %L", &(e->where));
263 /* Generate the new assignment. */
264 n = XCNEW (gfc_code);
266 n->loc = (*current_code)->loc;
267 n->next = *current_code;
268 n->expr1 = gfc_copy_expr (result);
275 /* Callback function for the code walker for doing common function
276 elimination. This builds up the list of functions in the expression
277 and goes through them to detect duplicates, which it then replaces
281 cfe_expr_0 (gfc_expr **e, int *walk_subtrees,
282 void *data ATTRIBUTE_UNUSED)
289 gfc_expr_walker (e, cfe_register_funcs, NULL);
291 /* Walk backwards through all the functions to make sure we
292 catch the leaf functions first. */
293 for (i=expr_count-1; i>=1; i--)
295 /* Skip if the function has been replaced by a variable already. */
296 if ((*(expr_array[i]))->expr_type == EXPR_VARIABLE)
300 for (j=i-1; j>=0; j--)
302 if (gfc_dep_compare_functions(*(expr_array[i]),
303 *(expr_array[j]), true) == 0)
306 newvar = create_var (*(expr_array[i]));
307 gfc_free (*(expr_array[j]));
308 *(expr_array[j]) = gfc_copy_expr (newvar);
312 *(expr_array[i]) = newvar;
315 /* We did all the necessary walking in this function. */
320 /* Callback function for common function elimination, called from
321 gfc_code_walker. This keeps track of the current code, in order
322 to insert statements as needed. */
325 cfe_code (gfc_code **c, int *walk_subtrees ATTRIBUTE_UNUSED,
326 void *data ATTRIBUTE_UNUSED)
332 /* Optimize a namespace, including all contained namespaces. */
335 optimize_namespace (gfc_namespace *ns)
340 gfc_code_walker (&ns->code, cfe_code, cfe_expr_0, NULL);
341 gfc_code_walker (&ns->code, optimize_code, optimize_expr, NULL);
343 for (ns = ns->contained; ns; ns = ns->sibling)
344 optimize_namespace (ns);
350 a = matmul(b,c) ; a = a + d
351 where the array function is not elemental and not allocatable
352 and does not depend on the left-hand side.
356 optimize_binop_array_assignment (gfc_code *c, gfc_expr **rhs, bool seen_op)
361 if (e->expr_type == EXPR_OP)
363 switch (e->value.op.op)
365 /* Unary operators and exponentiation: Only look at a single
368 case INTRINSIC_UPLUS:
369 case INTRINSIC_UMINUS:
370 case INTRINSIC_PARENTHESES:
371 case INTRINSIC_POWER:
372 if (optimize_binop_array_assignment (c, &e->value.op.op1, seen_op))
377 /* Binary operators. */
378 if (optimize_binop_array_assignment (c, &e->value.op.op1, true))
381 if (optimize_binop_array_assignment (c, &e->value.op.op2, true))
387 else if (seen_op && e->expr_type == EXPR_FUNCTION && e->rank > 0
388 && ! (e->value.function.esym
389 && (e->value.function.esym->attr.elemental
390 || e->value.function.esym->attr.allocatable
391 || e->value.function.esym->ts.type != c->expr1->ts.type
392 || e->value.function.esym->ts.kind != c->expr1->ts.kind))
393 && ! (e->value.function.isym
394 && (e->value.function.isym->elemental
395 || e->ts.type != c->expr1->ts.type
396 || e->ts.kind != c->expr1->ts.kind)))
402 /* Insert a new assignment statement after the current one. */
403 n = XCNEW (gfc_code);
409 n->expr1 = gfc_copy_expr (c->expr1);
411 new_expr = gfc_copy_expr (c->expr1);
419 /* Nothing to optimize. */
423 /* Optimizations for an assignment. */
426 optimize_assignment (gfc_code * c)
433 /* Optimize away a = trim(b), where a is a character variable. */
435 if (lhs->ts.type == BT_CHARACTER)
437 if (rhs->expr_type == EXPR_FUNCTION &&
438 rhs->value.function.isym &&
439 rhs->value.function.isym->id == GFC_ISYM_TRIM)
441 strip_function_call (rhs);
442 optimize_assignment (c);
447 if (lhs->rank > 0 && gfc_check_dependency (lhs, rhs, true) == 0)
448 optimize_binop_array_assignment (c, &rhs, false);
452 /* Remove an unneeded function call, modifying the expression.
453 This replaces the function call with the value of its
454 first argument. The rest of the argument list is freed. */
457 strip_function_call (gfc_expr *e)
460 gfc_actual_arglist *a;
462 a = e->value.function.actual;
464 /* We should have at least one argument. */
465 gcc_assert (a->expr != NULL);
469 /* Free the remaining arglist, if any. */
471 gfc_free_actual_arglist (a->next);
473 /* Graft the argument expression onto the original function. */
479 /* Recursive optimization of operators. */
482 optimize_op (gfc_expr *e)
484 gfc_intrinsic_op op = e->value.op.op;
489 case INTRINSIC_EQ_OS:
491 case INTRINSIC_GE_OS:
493 case INTRINSIC_LE_OS:
495 case INTRINSIC_NE_OS:
497 case INTRINSIC_GT_OS:
499 case INTRINSIC_LT_OS:
500 return optimize_comparison (e, op);
509 /* Optimize expressions for equality. */
512 optimize_comparison (gfc_expr *e, gfc_intrinsic_op op)
519 op1 = e->value.op.op1;
520 op2 = e->value.op.op2;
522 /* Strip off unneeded TRIM calls from string comparisons. */
526 if (op1->expr_type == EXPR_FUNCTION
527 && op1->value.function.isym
528 && op1->value.function.isym->id == GFC_ISYM_TRIM)
530 strip_function_call (op1);
534 if (op2->expr_type == EXPR_FUNCTION
535 && op2->value.function.isym
536 && op2->value.function.isym->id == GFC_ISYM_TRIM)
538 strip_function_call (op2);
544 optimize_comparison (e, op);
548 /* An expression of type EXPR_CONSTANT is only valid for scalars. */
549 /* TODO: A scalar constant may be acceptable in some cases (the scalarizer
550 handles them well). However, there are also cases that need a non-scalar
551 argument. For example the any intrinsic. See PR 45380. */
555 /* Don't compare REAL or COMPLEX expressions when honoring NaNs. */
557 if (flag_finite_math_only
558 || (op1->ts.type != BT_REAL && op2->ts.type != BT_REAL
559 && op1->ts.type != BT_COMPLEX && op2->ts.type != BT_COMPLEX))
561 eq = gfc_dep_compare_expr (op1, op2);
564 /* Replace A // B < A // C with B < C, and A // B < C // B
566 if (op1->ts.type == BT_CHARACTER && op2->ts.type == BT_CHARACTER
567 && op1->value.op.op == INTRINSIC_CONCAT
568 && op2->value.op.op == INTRINSIC_CONCAT)
570 gfc_expr *op1_left = op1->value.op.op1;
571 gfc_expr *op2_left = op2->value.op.op1;
572 gfc_expr *op1_right = op1->value.op.op2;
573 gfc_expr *op2_right = op2->value.op.op2;
575 if (gfc_dep_compare_expr (op1_left, op2_left) == 0)
577 /* Watch out for 'A ' // x vs. 'A' // x. */
579 if (op1_left->expr_type == EXPR_CONSTANT
580 && op2_left->expr_type == EXPR_CONSTANT
581 && op1_left->value.character.length
582 != op2_left->value.character.length)
588 e->value.op.op1 = op1_right;
589 e->value.op.op2 = op2_right;
590 optimize_comparison (e, op);
594 if (gfc_dep_compare_expr (op1_right, op2_right) == 0)
596 gfc_free (op1_right);
597 gfc_free (op2_right);
598 e->value.op.op1 = op1_left;
599 e->value.op.op2 = op2_left;
600 optimize_comparison (e, op);
607 /* eq can only be -1, 0 or 1 at this point. */
611 case INTRINSIC_EQ_OS:
616 case INTRINSIC_GE_OS:
621 case INTRINSIC_LE_OS:
626 case INTRINSIC_NE_OS:
631 case INTRINSIC_GT_OS:
636 case INTRINSIC_LT_OS:
641 gfc_internal_error ("illegal OP in optimize_comparison");
645 /* Replace the expression by a constant expression. The typespec
646 and where remains the way it is. */
649 e->expr_type = EXPR_CONSTANT;
650 e->value.logical = result;
658 /* Optimize a trim function by replacing it with an equivalent substring
659 involving a call to len_trim. This only works for expressions where
660 variables are trimmed. Return true if anything was modified. */
663 optimize_trim (gfc_expr *e)
668 gfc_actual_arglist *actual_arglist, *next;
671 /* Don't do this optimization within an argument list, because
672 otherwise aliasing issues may occur. */
674 if (count_arglist != 1)
677 if (e->ts.type != BT_CHARACTER || e->expr_type != EXPR_FUNCTION
678 || e->value.function.isym == NULL
679 || e->value.function.isym->id != GFC_ISYM_TRIM)
682 a = e->value.function.actual->expr;
684 if (a->expr_type != EXPR_VARIABLE)
687 /* Follow all references to find the correct place to put the newly
688 created reference. FIXME: Also handle substring references and
689 array references. Array references cause strange regressions at
694 for (rr = &(a->ref); *rr; rr = &((*rr)->next))
696 if ((*rr)->type == REF_SUBSTRING || (*rr)->type == REF_ARRAY)
701 strip_function_call (e);
706 /* Create the reference. */
708 ref = gfc_get_ref ();
709 ref->type = REF_SUBSTRING;
711 /* Set the start of the reference. */
713 ref->u.ss.start = gfc_get_int_expr (gfc_default_integer_kind, NULL, 1);
715 /* Build the function call to len_trim(x, gfc_defaul_integer_kind). */
717 fcn = gfc_get_expr ();
718 fcn->expr_type = EXPR_FUNCTION;
719 fcn->value.function.isym =
720 gfc_intrinsic_function_by_id (GFC_ISYM_LEN_TRIM);
721 actual_arglist = gfc_get_actual_arglist ();
722 actual_arglist->expr = gfc_copy_expr (e);
723 next = gfc_get_actual_arglist ();
724 next->expr = gfc_get_int_expr (gfc_default_integer_kind, NULL,
725 gfc_default_integer_kind);
726 actual_arglist->next = next;
727 fcn->value.function.actual = actual_arglist;
729 /* Set the end of the reference to the call to len_trim. */
732 gcc_assert (*rr == NULL);
737 #define WALK_SUBEXPR(NODE) \
740 result = gfc_expr_walker (&(NODE), exprfn, data); \
745 #define WALK_SUBEXPR_TAIL(NODE) e = &(NODE); continue
747 /* Walk expression *E, calling EXPRFN on each expression in it. */
750 gfc_expr_walker (gfc_expr **e, walk_expr_fn_t exprfn, void *data)
754 int walk_subtrees = 1;
755 gfc_actual_arglist *a;
759 int result = exprfn (e, &walk_subtrees, data);
763 switch ((*e)->expr_type)
766 WALK_SUBEXPR ((*e)->value.op.op1);
767 WALK_SUBEXPR_TAIL ((*e)->value.op.op2);
770 for (a = (*e)->value.function.actual; a; a = a->next)
771 WALK_SUBEXPR (a->expr);
775 WALK_SUBEXPR ((*e)->value.compcall.base_object);
776 for (a = (*e)->value.compcall.actual; a; a = a->next)
777 WALK_SUBEXPR (a->expr);
782 for (c = gfc_constructor_first ((*e)->value.constructor); c;
783 c = gfc_constructor_next (c))
785 WALK_SUBEXPR (c->expr);
786 if (c->iterator != NULL)
788 WALK_SUBEXPR (c->iterator->var);
789 WALK_SUBEXPR (c->iterator->start);
790 WALK_SUBEXPR (c->iterator->end);
791 WALK_SUBEXPR (c->iterator->step);
795 if ((*e)->expr_type != EXPR_ARRAY)
798 /* Fall through to the variable case in order to walk the
803 for (r = (*e)->ref; r; r = r->next)
812 if (ar->type == AR_SECTION || ar->type == AR_ELEMENT)
814 for (i=0; i< ar->dimen; i++)
816 WALK_SUBEXPR (ar->start[i]);
817 WALK_SUBEXPR (ar->end[i]);
818 WALK_SUBEXPR (ar->stride[i]);
825 WALK_SUBEXPR (r->u.ss.start);
826 WALK_SUBEXPR (r->u.ss.end);
842 #define WALK_SUBCODE(NODE) \
845 result = gfc_code_walker (&(NODE), codefn, exprfn, data); \
851 /* Walk code *C, calling CODEFN on each gfc_code node in it and calling EXPRFN
852 on each expression in it. If any of the hooks returns non-zero, that
853 value is immediately returned. If the hook sets *WALK_SUBTREES to 0,
854 no subcodes or subexpressions are traversed. */
857 gfc_code_walker (gfc_code **c, walk_code_fn_t codefn, walk_expr_fn_t exprfn,
860 for (; *c; c = &(*c)->next)
862 int walk_subtrees = 1;
863 int result = codefn (c, &walk_subtrees, data);
870 gfc_actual_arglist *a;
875 WALK_SUBEXPR ((*c)->ext.iterator->var);
876 WALK_SUBEXPR ((*c)->ext.iterator->start);
877 WALK_SUBEXPR ((*c)->ext.iterator->end);
878 WALK_SUBEXPR ((*c)->ext.iterator->step);
882 case EXEC_ASSIGN_CALL:
883 for (a = (*c)->ext.actual; a; a = a->next)
884 WALK_SUBEXPR (a->expr);
888 WALK_SUBEXPR ((*c)->expr1);
889 for (a = (*c)->ext.actual; a; a = a->next)
890 WALK_SUBEXPR (a->expr);
894 WALK_SUBEXPR ((*c)->expr1);
895 for (b = (*c)->block; b; b = b->block)
898 for (cp = b->ext.block.case_list; cp; cp = cp->next)
900 WALK_SUBEXPR (cp->low);
901 WALK_SUBEXPR (cp->high);
903 WALK_SUBCODE (b->next);
908 case EXEC_DEALLOCATE:
911 for (a = (*c)->ext.alloc.list; a; a = a->next)
912 WALK_SUBEXPR (a->expr);
918 gfc_forall_iterator *fa;
919 for (fa = (*c)->ext.forall_iterator; fa; fa = fa->next)
921 WALK_SUBEXPR (fa->var);
922 WALK_SUBEXPR (fa->start);
923 WALK_SUBEXPR (fa->end);
924 WALK_SUBEXPR (fa->stride);
930 WALK_SUBEXPR ((*c)->ext.open->unit);
931 WALK_SUBEXPR ((*c)->ext.open->file);
932 WALK_SUBEXPR ((*c)->ext.open->status);
933 WALK_SUBEXPR ((*c)->ext.open->access);
934 WALK_SUBEXPR ((*c)->ext.open->form);
935 WALK_SUBEXPR ((*c)->ext.open->recl);
936 WALK_SUBEXPR ((*c)->ext.open->blank);
937 WALK_SUBEXPR ((*c)->ext.open->position);
938 WALK_SUBEXPR ((*c)->ext.open->action);
939 WALK_SUBEXPR ((*c)->ext.open->delim);
940 WALK_SUBEXPR ((*c)->ext.open->pad);
941 WALK_SUBEXPR ((*c)->ext.open->iostat);
942 WALK_SUBEXPR ((*c)->ext.open->iomsg);
943 WALK_SUBEXPR ((*c)->ext.open->convert);
944 WALK_SUBEXPR ((*c)->ext.open->decimal);
945 WALK_SUBEXPR ((*c)->ext.open->encoding);
946 WALK_SUBEXPR ((*c)->ext.open->round);
947 WALK_SUBEXPR ((*c)->ext.open->sign);
948 WALK_SUBEXPR ((*c)->ext.open->asynchronous);
949 WALK_SUBEXPR ((*c)->ext.open->id);
950 WALK_SUBEXPR ((*c)->ext.open->newunit);
954 WALK_SUBEXPR ((*c)->ext.close->unit);
955 WALK_SUBEXPR ((*c)->ext.close->status);
956 WALK_SUBEXPR ((*c)->ext.close->iostat);
957 WALK_SUBEXPR ((*c)->ext.close->iomsg);
964 WALK_SUBEXPR ((*c)->ext.filepos->unit);
965 WALK_SUBEXPR ((*c)->ext.filepos->iostat);
966 WALK_SUBEXPR ((*c)->ext.filepos->iomsg);
970 WALK_SUBEXPR ((*c)->ext.inquire->unit);
971 WALK_SUBEXPR ((*c)->ext.inquire->file);
972 WALK_SUBEXPR ((*c)->ext.inquire->iomsg);
973 WALK_SUBEXPR ((*c)->ext.inquire->iostat);
974 WALK_SUBEXPR ((*c)->ext.inquire->exist);
975 WALK_SUBEXPR ((*c)->ext.inquire->opened);
976 WALK_SUBEXPR ((*c)->ext.inquire->number);
977 WALK_SUBEXPR ((*c)->ext.inquire->named);
978 WALK_SUBEXPR ((*c)->ext.inquire->name);
979 WALK_SUBEXPR ((*c)->ext.inquire->access);
980 WALK_SUBEXPR ((*c)->ext.inquire->sequential);
981 WALK_SUBEXPR ((*c)->ext.inquire->direct);
982 WALK_SUBEXPR ((*c)->ext.inquire->form);
983 WALK_SUBEXPR ((*c)->ext.inquire->formatted);
984 WALK_SUBEXPR ((*c)->ext.inquire->unformatted);
985 WALK_SUBEXPR ((*c)->ext.inquire->recl);
986 WALK_SUBEXPR ((*c)->ext.inquire->nextrec);
987 WALK_SUBEXPR ((*c)->ext.inquire->blank);
988 WALK_SUBEXPR ((*c)->ext.inquire->position);
989 WALK_SUBEXPR ((*c)->ext.inquire->action);
990 WALK_SUBEXPR ((*c)->ext.inquire->read);
991 WALK_SUBEXPR ((*c)->ext.inquire->write);
992 WALK_SUBEXPR ((*c)->ext.inquire->readwrite);
993 WALK_SUBEXPR ((*c)->ext.inquire->delim);
994 WALK_SUBEXPR ((*c)->ext.inquire->encoding);
995 WALK_SUBEXPR ((*c)->ext.inquire->pad);
996 WALK_SUBEXPR ((*c)->ext.inquire->iolength);
997 WALK_SUBEXPR ((*c)->ext.inquire->convert);
998 WALK_SUBEXPR ((*c)->ext.inquire->strm_pos);
999 WALK_SUBEXPR ((*c)->ext.inquire->asynchronous);
1000 WALK_SUBEXPR ((*c)->ext.inquire->decimal);
1001 WALK_SUBEXPR ((*c)->ext.inquire->pending);
1002 WALK_SUBEXPR ((*c)->ext.inquire->id);
1003 WALK_SUBEXPR ((*c)->ext.inquire->sign);
1004 WALK_SUBEXPR ((*c)->ext.inquire->size);
1005 WALK_SUBEXPR ((*c)->ext.inquire->round);
1009 WALK_SUBEXPR ((*c)->ext.wait->unit);
1010 WALK_SUBEXPR ((*c)->ext.wait->iostat);
1011 WALK_SUBEXPR ((*c)->ext.wait->iomsg);
1012 WALK_SUBEXPR ((*c)->ext.wait->id);
1017 WALK_SUBEXPR ((*c)->ext.dt->io_unit);
1018 WALK_SUBEXPR ((*c)->ext.dt->format_expr);
1019 WALK_SUBEXPR ((*c)->ext.dt->rec);
1020 WALK_SUBEXPR ((*c)->ext.dt->advance);
1021 WALK_SUBEXPR ((*c)->ext.dt->iostat);
1022 WALK_SUBEXPR ((*c)->ext.dt->size);
1023 WALK_SUBEXPR ((*c)->ext.dt->iomsg);
1024 WALK_SUBEXPR ((*c)->ext.dt->id);
1025 WALK_SUBEXPR ((*c)->ext.dt->pos);
1026 WALK_SUBEXPR ((*c)->ext.dt->asynchronous);
1027 WALK_SUBEXPR ((*c)->ext.dt->blank);
1028 WALK_SUBEXPR ((*c)->ext.dt->decimal);
1029 WALK_SUBEXPR ((*c)->ext.dt->delim);
1030 WALK_SUBEXPR ((*c)->ext.dt->pad);
1031 WALK_SUBEXPR ((*c)->ext.dt->round);
1032 WALK_SUBEXPR ((*c)->ext.dt->sign);
1033 WALK_SUBEXPR ((*c)->ext.dt->extra_comma);
1037 case EXEC_OMP_PARALLEL:
1038 case EXEC_OMP_PARALLEL_DO:
1039 case EXEC_OMP_PARALLEL_SECTIONS:
1040 case EXEC_OMP_PARALLEL_WORKSHARE:
1041 case EXEC_OMP_SECTIONS:
1042 case EXEC_OMP_SINGLE:
1043 case EXEC_OMP_WORKSHARE:
1044 case EXEC_OMP_END_SINGLE:
1046 if ((*c)->ext.omp_clauses)
1048 WALK_SUBEXPR ((*c)->ext.omp_clauses->if_expr);
1049 WALK_SUBEXPR ((*c)->ext.omp_clauses->num_threads);
1050 WALK_SUBEXPR ((*c)->ext.omp_clauses->chunk_size);
1057 WALK_SUBEXPR ((*c)->expr1);
1058 WALK_SUBEXPR ((*c)->expr2);
1059 WALK_SUBEXPR ((*c)->expr3);
1060 for (b = (*c)->block; b; b = b->block)
1062 WALK_SUBEXPR (b->expr1);
1063 WALK_SUBEXPR (b->expr2);
1064 WALK_SUBCODE (b->next);