diff -Nrcpad gcc-4.3.2/gcc/fortran/ChangeLog gcc-4.3.3/gcc/fortran/ChangeLog *** gcc-4.3.2/gcc/fortran/ChangeLog Wed Aug 27 18:01:56 2008 --- gcc-4.3.3/gcc/fortran/ChangeLog Sat Jan 24 10:15:54 2009 *************** *** 1,3 **** --- 1,405 ---- + 2009-01-24 Release Manager + + * GCC 4.3.3 released. + + 2009-01-17 Paul Thomas + + PR fortran/38657 + * module.c (write_common_0): Revert patch of 2009-01-10. + + 2009-01-14 Mikael Morin + + PR fortran/35681 + * ChangeLog: Fix function name. + + PR fortran/38487 + * dependency.c (gfc_check_argument_var_dependency): + Move the check for pointerness inside the if block + so that it doesn't affect the return value. + + PR fortran/38669 + * trans-stmt.c (gfc_trans_call): + Add the dependency code after the loop bounds calculation one. + + 2009-01-11 Paul Thomas + + PR fortran/38763 + Backport from mainline: + * target-memory.c (encode_derived): Encode NULL. + + PR fortran/38765 + Backport from mainline: + * resolve.c (check_host_association): Use the symtree name to + search for a potential contained procedure, since this is the + name by which it would be referenced. + + 2009-01-10 Paul Thomas + + PR fortran/38657 + * module.c (write_common_0): Use the name of the symtree rather + than the common block, to determine if the common has been + written. + + 2009-01-10 Paul Thomas + + PR fortran/38665 + * gfortran.h : Add bit to gfc_expr 'user_operator' + * interface.c (gfc_extend_expr): Set the above if the operator + is substituted by a function. + * resolve.c (check_host_association): Return if above is set. + + 2009-01-01 John David Anglin + + PR fortran/38675 + Backport from mainline: + 2008-12-09 Mikael Morin + + PR fortran/37469 + * expr.c (find_array_element): Simplify array bounds. + Assert that both bounds are constant expressions. + + 2008-10-31 Mikael Morin + + * expr.c (gfc_reduce_init_expr): New function, containing checking code + from gfc_match_init_expr, so that checking can be deferred. + (gfc_match_init_expr): Use gfc_reduce_init_expr. + * match.h (gfc_reduce_init_expr): Prototype added. + + 2008-12-22 Paul Thomas + + PR fortran/38602 + * trans-decl.c (init_intent_out_dt): Allow for optional args. + + 2008-12-21 Mikael Morin + + PR fortran/38487 + * dependency.c (gfc_is_data_pointer): New function. + (gfc_check_argument_var_dependency): Disable the warning + in the pointer case. + (gfc_check_dependency): Use gfc_is_data_pointer. + + 2008-12-21 Mikael Morin + + PR fortran/38113 + * error.c (show_locus): Start counting columns at 0. + * primary.c (match_actual_arg): Eat spaces + before copying the current locus. + (match_variable): Copy the locus before matching. + + 2008-12-21 Mikael Morin + + PR fortran/35983 + * trans-expr.c (gfc_trans_subcomponent_assign): + Add se's pre and post blocks to current block. + (gfc_trans_structure_assign): Remove specific handling + of C_NULL_PTR and C_NULL_FUNPTR. + + 2008-12-14 Paul Thomas + + PR fortran/35937 + * trans-expr.c (gfc_finish_interface_mapping): Fold convert the + character length to gfc_charlen_type_node. + + 2008-12-04 Janis Johnson + + Backport from mainline: + 2008-10-18 Jakub Jelinek + Janis Johnson + + * Make-lang.in (check-f95-subtargets, check-fortran-subtargets): New + aliases for check-gfortran-subtargets. + (lang_checks_parallelized): Add check-gfortran. + (check_gfortran_parallelize): New variable. + + 2008-11-24 Paul Thomas + + PR fortran/34820 + * trans-expr.c (gfc_conv_function_call): Remove all code to + deallocate intent out derived types with allocatable + components. + (gfc_trans_assignment_1): An assignment from a scalar to an + array of derived types with allocatable components, requires + a deep copy to each array element and deallocation of the + converted rhs expression afterwards. + * trans-array.c : Minor whitespace. + * trans-decl.c (init_intent_out_dt): Add code to deallocate + allocatable components of derived types with intent out. + (generate_local_decl): If these types are unused, set them + referenced anyway but allow the uninitialized warning. + + PR fortran/34143 + * trans-expr.c (gfc_trans_subcomponent_assign): If a conversion + expression has a null data pointer argument, nullify the + allocatable component. + + PR fortran/32795 + * trans-expr.c (gfc_trans_subcomponent_assign): Only nullify + the data pointer if the source is not a variable. + + 2008-11-29 Paul Thomas + + PR fortran/37735 + * trans-array.c (structure_alloc_comps): Do not duplicate the + descriptor if this is a descriptorless array! + + 2008-11-27 Paul Thomas + + PR fortran/36526 + * interface.c (check_intents): Correct error where the actual + arg was checked for a pointer argument, rather than the formal. + + 2008-11-24 Paul Thomas + + PR fortran/38033 + * trans-array.c (gfc_trans_create_temp_array): Stabilize the + 'to' expression. + (gfc_conv_loop_setup): Use the end expression for the loop 'to' + if it is available. + + 2008-11-24 Paul Thomas + + PR fortran/37926 + * trans-expr.c (gfc_free_interface_mapping): Null sym->formal + (gfc_add_interface_mapping): Copy the pointer to the formal + arglist and set attr.always_explicit if this is a procedure. + + 2008-11-24 Steven G. Kargl + + PR fortran/37792 + * fortran/resolve.c (resolve_fl_variable): Simplify the + initializer if there is one. + + 2008-11-24 Mikael Morin + + PR fortran/35681 + * dependency.c (gfc_check_argument_var_dependency): Add + elemental check flag. Issue a warning if we find a dependency + but don't generate a temporary. Add the case of an elemental + function call as actual argument to an elemental procedure. + Add the case of an operator expression as actual argument + to an elemental procedure. + (gfc_check_argument_dependency): Add elemental check flag. + Update calls to gfc_check_argument_var_dependency. + (gfc_check_fncall_dependency): Add elemental check flag. + Update call to gfc_check_argument_dependency. + * trans-stmt.c (gfc_trans_call): Make call to + gfc_conv_elemental_dependencies unconditional, but with a flag + whether we should check dependencies between variables. + (gfc_conv_elemental_dependencies): Add elemental check flag. + Update call to gfc_check_fncall_dependency. + * trans-expr.c (gfc_trans_arrayfunc_assign): Update call to + gfc_check_fncall_dependency. + * resolve.c (find_noncopying_intrinsics): Update call to + gfc_check_fncall_dependency. + * dependency.h (enum gfc_dep_check): New enum. + (gfc_check_fncall_dependency): Update prototype. + + 2008-11-19 Paul Thomas + + PR fortran/38171 + * module.c (load_equiv): Regression fix; check that equivalence + members come from the same module only. + + 2008-11-14 Paul Thomas + + PR fortran/37836 + * intrinsic.c (add_functions): Reference gfc_simplify._minval + and gfc_simplify_maxval. + * intrinsic.h : Add prototypes for gfc_simplify._minval and + gfc_simplify_maxval. + * simplify.c (min_max_choose): New function extracted from + simplify_min_max. + (simplify_min_max): Call it. + (simplify_minval_maxval, gfc_simplify_minval, + gfc_simplify_maxval): New functions. + + 2008-11-08 Paul Thomas + + PR fortran/37597 + * parse.c (gfc_fixup_sibling_symbols ): Fixup contained, even + when symbol not found. + + 2008-11-08 Mikael Morin + + PR fortran/35820 + * resolve.c (gfc_count_forall_iterators): New function. + (gfc_resolve_forall): Use gfc_count_forall_iterators to evaluate + the needed memory amount to allocate. Don't forget to free allocated + memory. Add an assertion to check for memory leaks. + + 2008-11-08 Paul Thomas + + PR fortran/37445 + * resolve.c (resolve_call): Check host association is correct. + (resolve_actual_arglist ): Remove return is old_sym is use + associated. Only reparse expression if old and new symbols + have different types. + + PR fortran/PR35769 + * resolve.c (gfc_resolve_assign_in_forall): Change error to a + warning. + + 2008-11-01 Mikael Morin + + PR fortran/37903 + * trans-array.c (gfc_trans_create_temp_array): If n is less + than the temporary dimension, assert that loop->from is + zero (reverts to earlier versions). If there is at least one + null loop->to[n], it is a callee allocated array so set the + size to NULL and break. + (gfc_trans_constant_array_constructor): Set the offset to zero. + (gfc_trans_array_constructor): Remove loop shifting around the + temporary creation. + (gfc_conv_loop_setup): Prefer zero-based descriptors if + possible. Calculate the translation from loop variables to + array indices if an array constructor. + + 2008-11-01 Mikael Morin + + PR fortran/37749 + * trans-array.c (gfc_trans_create_temp_array): If size is NULL + use the array bounds for loop->to. + + 2008-10-19 Paul Thomas + + PR fortran/37723 + * dependency.c (gfc_dep_resolver ): If we find equal array + element references, go on to the next reference. + + 2008-10-19 Paul Thomas + + PR fortran/37787 + * dependency.c (gfc_are_equivalenced_arrays): Look in symbol + namespace rather than current namespace, if it is available. + + 2008-10-11 Paul Thomas + + PR fortran/37794 + * module.c (check_for_ambiguous): Remove redundant code. + + 2008-10-11 Paul Thomas + + PR fortran/35680 + * gfortran.h : Add 'error' bit field to gfc_expr structure. + * expr.c (check_inquiry): When checking a restricted expression + check that arguments are either variables or restricted. + (check_restricted): Do not emit error if the expression has + 'error' set. Clean up detection of host-associated variable. + + 2008-10-05 Paul Thomas + + PR fortran/37706 + * module.c (load_equiv): Check the module before negating the + unused flag. + + 2008-09-26 Tobias Burnus + + PR fortran/37580 + * expr.c (gfc_check_pointer_assign): Add checks for pointer + remapping. + + 2008-09-26 Tobias Burnus + + PR fortran/37504 + * expr.c (gfc_check_pointer_assign): Allow assignment of + protected pointers. + + 2008-09-25 Tobias Burnus + + PR fortran/37626 + * trans-array.c (gfc_trans_deferred_array): Don't auto-deallocate + result variable. + + 2008-09-24 Paul Thomas + + PR fortran/35945 + * resolve.c (resolve_fl_variable_derived): Remove derived type + comparison for use associated derived types. Host association + of a derived type will not arise if there is a local derived type + whose use name is the same. + + PR fortran/36700 + * match.c (gfc_match_call): Use the existing symbol even if + it is a function. + + 2008-09-24 Paul Thomas + + PR fortran/37583 + * decl.c (gfc_match_entry): Both subroutines and functions can + give a true for get_proc_mame's last argument so remove the + && gfc_current_ns->proc_name->attr.function. + resolve.c (resolve_actual_arglist): Add check for recursion by + reference to procedure as actual argument. + + 2008-09-23 Paul Thomas + + PR fortran/37274 + PR fortran/36374 + * module.c (check_for_ambiguous): New function to test loaded + symbol for ambiguity with fixup symbol. + (read_module): Call check_for_ambiguous. + (write_symtree): Do not write the symtree for symbols coming + from an interface body. + + PR fortran/36374 + * resolve.c (count_specific_procs ): New function to count the + number of specific procedures with the same name as the generic + and emit appropriate errors for and actual argument reference. + (resolve_assumed_size_actual): Add new argument no_formal_args. + Correct logic around passing generic procedures as arguments. + Call count_specific_procs from two locations. + (resolve_function): Evaluate and pass no_formal_args. + (resolve call): The same and clean up a bit by using csym more + widely. + + PR fortran/36454 + * symbol.c (gfc_add_access): Access can be updated if use + associated and not private. + + 2008-09-13 Daniel Kraft + + PR fortran/35770 + * primary.c (gfc_match_varspec): Added missing type-spec clearing + after wrong implicit character typing. + + 2008-09-11 Daniel Kraft + + PR fortran/36214 + * simplify.c (simplify_cmplx): Added linebreak to long line. + * target-memory.c (gfc_convert_boz): Fix indentation. + (gfc_interpret_float): Set mpfr precision to right value before + calling mpfr_init. + + 2008-09-08 Daniel Kraft + + PR fortran/37199 + * trans-expr.c (gfc_add_interface_mapping): Set new_sym->as. + (gfc_map_intrinsic_function): Added checks against NULL bounds in + array specs. + + 2008-09-05 Daniel Kraft + + PR fortran/35837 + * resolve.c (resolve_types): Restore gfc_current_ns on exit. + * symbol.c (gfc_save_all): Removed blank line. + + 2008-09-04 Daniel Kraft + + * PR fortran/37099 + * expr.c (simplify_const_ref): Update expression's character length + when pulling out a substring reference. + + 2008-08-30 Daniel Kraft + + PR fortran/37193 + * module.c (read_module): Initialize use_only flag on used symbols. + + 2008-06-24 Paul Thomas + + PR fortran/36371 + * expr.c (gfc_check_assign): Change message and locus for + error when conform == 0. + 2008-08-27 Release Manager * GCC 4.3.2 released. diff -Nrcpad gcc-4.3.2/gcc/fortran/Make-lang.in gcc-4.3.3/gcc/fortran/Make-lang.in *** gcc-4.3.2/gcc/fortran/Make-lang.in Tue Apr 1 18:49:36 2008 --- gcc-4.3.3/gcc/fortran/Make-lang.in Thu Dec 4 23:00:19 2008 *************** fortran.srcextra: *** 141,147 **** --- 141,154 ---- check-f95 : check-gfortran check-fortran : check-gfortran + check-f95-subtargets : check-gfortran-subtargets + check-fortran-subtargets : check-gfortran-subtargets lang_checks += check-gfortran + lang_checks_parallelized += check-gfortran + # For description see comment above check_gcc_parallelize in gcc/Makefile.in. + check_gfortran_parallelize = dg.exp=gfortran.dg/\[a-cA-C\]* \ + dg.exp=gfortran.dg/\[d-mD-M\]* \ + dg.exp=gfortran.dg/\[n-zN-Z0-9\]* # GFORTRAN documentation. GFORTRAN_TEXI = \ diff -Nrcpad gcc-4.3.2/gcc/fortran/decl.c gcc-4.3.3/gcc/fortran/decl.c *** gcc-4.3.2/gcc/fortran/decl.c Wed Jan 30 06:56:10 2008 --- gcc-4.3.3/gcc/fortran/decl.c Wed Sep 24 08:04:26 2008 *************** gfc_match_entry (void) *** 4504,4511 **** created symbols attached to the current namespace. */ if (get_proc_name (name, &entry, gfc_current_ns->parent != NULL ! && module_procedure ! && gfc_current_ns->proc_name->attr.function)) return MATCH_ERROR; proc = gfc_current_block (); --- 4504,4510 ---- created symbols attached to the current namespace. */ if (get_proc_name (name, &entry, gfc_current_ns->parent != NULL ! && module_procedure)) return MATCH_ERROR; proc = gfc_current_block (); diff -Nrcpad gcc-4.3.2/gcc/fortran/dependency.c gcc-4.3.3/gcc/fortran/dependency.c *** gcc-4.3.2/gcc/fortran/dependency.c Mon Oct 29 14:13:44 2007 --- gcc-4.3.3/gcc/fortran/dependency.c Wed Jan 14 20:53:18 2009 *************** gfc_ref_needs_temporary_p (gfc_ref *ref) *** 422,427 **** --- 422,445 ---- } + static int + gfc_is_data_pointer (gfc_expr *e) + { + gfc_ref *ref; + + if (e->expr_type != EXPR_VARIABLE) + return 0; + + if (e->symtree->n.sym->attr.pointer) + return 1; + for (ref = e->ref; ref; ref = ref->next) + if (ref->type == REF_COMPONENT && ref->u.c.component->pointer) + return 1; + + return 0; + } + + /* Return true if array variable VAR could be passed to the same function as argument EXPR without interfering with EXPR. INTENT is the intent of VAR. *************** gfc_ref_needs_temporary_p (gfc_ref *ref) *** 432,456 **** static int gfc_check_argument_var_dependency (gfc_expr *var, sym_intent intent, ! gfc_expr *expr) { gcc_assert (var->expr_type == EXPR_VARIABLE); gcc_assert (var->rank > 0); switch (expr->expr_type) { case EXPR_VARIABLE: ! return (gfc_ref_needs_temporary_p (expr->ref) ! || gfc_check_dependency (var, expr, 1)); case EXPR_ARRAY: return gfc_check_dependency (var, expr, 1); case EXPR_FUNCTION: ! if (intent != INTENT_IN && expr->inline_noncopying_intrinsic) { ! expr = gfc_get_noncopying_intrinsic_argument (expr); ! return gfc_check_argument_var_dependency (var, intent, expr); } return 0; --- 450,534 ---- static int gfc_check_argument_var_dependency (gfc_expr *var, sym_intent intent, ! gfc_expr *expr, gfc_dep_check elemental) { + gfc_expr *arg; + gcc_assert (var->expr_type == EXPR_VARIABLE); gcc_assert (var->rank > 0); switch (expr->expr_type) { case EXPR_VARIABLE: ! /* In case of elemental subroutines, there is no dependency ! between two same-range array references. */ ! if (gfc_ref_needs_temporary_p (expr->ref) ! || gfc_check_dependency (var, expr, !elemental)) ! { ! if (elemental == ELEM_DONT_CHECK_VARIABLE) ! { ! /* Too many false positive with pointers. */ ! if (!gfc_is_data_pointer (var) && !gfc_is_data_pointer (expr)) ! { ! /* Elemental procedures forbid unspecified intents, ! and we don't check dependencies for INTENT_IN args. */ ! gcc_assert (intent == INTENT_OUT || intent == INTENT_INOUT); ! ! /* We are told not to check dependencies. ! We do it, however, and issue a warning in case we find one. ! If a dependency is found in the case ! elemental == ELEM_CHECK_VARIABLE, we will generate ! a temporary, so we don't need to bother the user. */ ! gfc_warning ("INTENT(%s) actual argument at %L might " ! "interfere with actual argument at %L.", ! intent == INTENT_OUT ? "OUT" : "INOUT", ! &var->where, &expr->where); ! } ! return 0; ! } ! else ! return 1; ! } ! return 0; case EXPR_ARRAY: return gfc_check_dependency (var, expr, 1); case EXPR_FUNCTION: ! if (intent != INTENT_IN && expr->inline_noncopying_intrinsic ! && (arg = gfc_get_noncopying_intrinsic_argument (expr)) ! && gfc_check_argument_var_dependency (var, intent, arg, elemental)) ! return 1; ! if (elemental) { ! if ((expr->value.function.esym ! && expr->value.function.esym->attr.elemental) ! || (expr->value.function.isym ! && expr->value.function.isym->elemental)) ! return gfc_check_fncall_dependency (var, intent, NULL, ! expr->value.function.actual, ! ELEM_CHECK_VARIABLE); ! } ! return 0; ! ! case EXPR_OP: ! /* In case of non-elemental procedures, there is no need to catch ! dependencies, as we will make a temporary anyway. */ ! if (elemental) ! { ! /* If the actual arg EXPR is an expression, we need to catch ! a dependency between variables in EXPR and VAR, ! an intent((IN)OUT) variable. */ ! if (expr->value.op.op1 ! && gfc_check_argument_var_dependency (var, intent, ! expr->value.op.op1, ! ELEM_CHECK_VARIABLE)) ! return 1; ! else if (expr->value.op.op2 ! && gfc_check_argument_var_dependency (var, intent, ! expr->value.op.op2, ! ELEM_CHECK_VARIABLE)) ! return 1; } return 0; *************** gfc_check_argument_var_dependency (gfc_e *** 465,482 **** static int gfc_check_argument_dependency (gfc_expr *other, sym_intent intent, ! gfc_expr *expr) { switch (other->expr_type) { case EXPR_VARIABLE: ! return gfc_check_argument_var_dependency (other, intent, expr); case EXPR_FUNCTION: if (other->inline_noncopying_intrinsic) { other = gfc_get_noncopying_intrinsic_argument (other); ! return gfc_check_argument_dependency (other, INTENT_IN, expr); } return 0; --- 543,561 ---- static int gfc_check_argument_dependency (gfc_expr *other, sym_intent intent, ! gfc_expr *expr, gfc_dep_check elemental) { switch (other->expr_type) { case EXPR_VARIABLE: ! return gfc_check_argument_var_dependency (other, intent, expr, elemental); case EXPR_FUNCTION: if (other->inline_noncopying_intrinsic) { other = gfc_get_noncopying_intrinsic_argument (other); ! return gfc_check_argument_dependency (other, INTENT_IN, expr, ! elemental); } return 0; *************** gfc_check_argument_dependency (gfc_expr *** 491,497 **** int gfc_check_fncall_dependency (gfc_expr *other, sym_intent intent, ! gfc_symbol *fnsym, gfc_actual_arglist *actual) { gfc_formal_arglist *formal; gfc_expr *expr; --- 570,577 ---- int gfc_check_fncall_dependency (gfc_expr *other, sym_intent intent, ! gfc_symbol *fnsym, gfc_actual_arglist *actual, ! gfc_dep_check elemental) { gfc_formal_arglist *formal; gfc_expr *expr; *************** gfc_check_fncall_dependency (gfc_expr *o *** 514,520 **** && formal->sym->attr.intent == INTENT_IN) continue; ! if (gfc_check_argument_dependency (other, intent, expr)) return 1; } --- 594,600 ---- && formal->sym->attr.intent == INTENT_IN) continue; ! if (gfc_check_argument_dependency (other, intent, expr, elemental)) return 1; } *************** gfc_are_equivalenced_arrays (gfc_expr *e *** 547,556 **** || !e2->symtree->n.sym->attr.in_equivalence|| !e1->rank || !e2->rank) return 0; /* Go through the equiv_lists and return 1 if the variables e1 and e2 are members of the same group and satisfy the requirement on their relative offsets. */ ! for (l = gfc_current_ns->equiv_lists; l; l = l->next) { fl1 = NULL; fl2 = NULL; --- 627,642 ---- || !e2->symtree->n.sym->attr.in_equivalence|| !e1->rank || !e2->rank) return 0; + if (e1->symtree->n.sym->ns + && e1->symtree->n.sym->ns != gfc_current_ns) + l = e1->symtree->n.sym->ns->equiv_lists; + else + l = gfc_current_ns->equiv_lists; + /* Go through the equiv_lists and return 1 if the variables e1 and e2 are members of the same group and satisfy the requirement on their relative offsets. */ ! for (; l; l = l->next) { fl1 = NULL; fl2 = NULL; *************** gfc_check_dependency (gfc_expr *expr1, g *** 600,606 **** { gfc_actual_arglist *actual; gfc_constructor *c; - gfc_ref *ref; int n; gcc_assert (expr1->expr_type == EXPR_VARIABLE); --- 686,691 ---- *************** gfc_check_dependency (gfc_expr *expr1, g *** 636,652 **** /* If either variable is a pointer, assume the worst. */ /* TODO: -fassume-no-pointer-aliasing */ ! if (expr1->symtree->n.sym->attr.pointer) ! return 1; ! for (ref = expr1->ref; ref; ref = ref->next) ! if (ref->type == REF_COMPONENT && ref->u.c.component->pointer) ! return 1; ! ! if (expr2->symtree->n.sym->attr.pointer) return 1; - for (ref = expr2->ref; ref; ref = ref->next) - if (ref->type == REF_COMPONENT && ref->u.c.component->pointer) - return 1; /* Otherwise distinct symbols have no dependencies. */ return 0; --- 721,728 ---- /* If either variable is a pointer, assume the worst. */ /* TODO: -fassume-no-pointer-aliasing */ ! if (gfc_is_data_pointer (expr1) || gfc_is_data_pointer (expr2)) return 1; /* Otherwise distinct symbols have no dependencies. */ return 0; *************** gfc_dep_resolver (gfc_ref *lref, gfc_ref *** 1246,1251 **** --- 1322,1335 ---- if (this_dep > fin_dep) fin_dep = this_dep; } + + /* If this is an equal element, we have to keep going until we find + the "real" array reference. */ + if (lref->u.ar.type == AR_ELEMENT + && rref->u.ar.type == AR_ELEMENT + && fin_dep == GFC_DEP_EQUAL) + break; + /* Exactly matching and forward overlapping ranges don't cause a dependency. */ if (fin_dep < GFC_DEP_OVERLAP) diff -Nrcpad gcc-4.3.2/gcc/fortran/dependency.h gcc-4.3.3/gcc/fortran/dependency.h *** gcc-4.3.2/gcc/fortran/dependency.h Wed Aug 1 16:29:36 2007 --- gcc-4.3.3/gcc/fortran/dependency.h Mon Nov 24 12:13:59 2008 *************** You should have received a copy of the G *** 19,31 **** along with GCC; see the file COPYING3. If not see . */ bool gfc_ref_needs_temporary_p (gfc_ref *); bool gfc_full_array_ref_p (gfc_ref *); gfc_expr *gfc_get_noncopying_intrinsic_argument (gfc_expr *); int gfc_check_fncall_dependency (gfc_expr *, sym_intent, gfc_symbol *, ! gfc_actual_arglist *); int gfc_check_dependency (gfc_expr *, gfc_expr *, bool); int gfc_is_same_range (gfc_array_ref *, gfc_array_ref *, int, int); int gfc_expr_is_one (gfc_expr *, int); --- 19,42 ---- along with GCC; see the file COPYING3. If not see . */ + /****************************** Enums *********************************/ + typedef enum + { + NOT_ELEMENTAL, /* Not elemental case: normal dependency check. */ + ELEM_CHECK_VARIABLE, /* Test whether variables overlap. */ + ELEM_DONT_CHECK_VARIABLE /* Test whether variables overlap only if used + in an expression. */ + } + gfc_dep_check; + + /*********************** Functions prototypes **************************/ bool gfc_ref_needs_temporary_p (gfc_ref *); bool gfc_full_array_ref_p (gfc_ref *); gfc_expr *gfc_get_noncopying_intrinsic_argument (gfc_expr *); int gfc_check_fncall_dependency (gfc_expr *, sym_intent, gfc_symbol *, ! gfc_actual_arglist *, gfc_dep_check); int gfc_check_dependency (gfc_expr *, gfc_expr *, bool); int gfc_is_same_range (gfc_array_ref *, gfc_array_ref *, int, int); int gfc_expr_is_one (gfc_expr *, int); diff -Nrcpad gcc-4.3.2/gcc/fortran/error.c gcc-4.3.3/gcc/fortran/error.c *** gcc-4.3.2/gcc/fortran/error.c Sun Dec 16 17:16:15 2007 --- gcc-4.3.3/gcc/fortran/error.c Sun Dec 21 15:45:52 2008 *************** show_locus (locus *loc, int c1, int c2) *** 222,235 **** offset = 0; - /* When the loci is not associated with a column, it will have a - value of zero. We adjust this to 1 so that it will appear. */ - - if (c1 == 0) - c1 = 1; - if (c2 == 0) - c2 = 1; - /* If the two loci would appear in the same column, we shift '2' one column to the right, so as to print '12' rather than just '1'. We do this here so it will be accounted for in the --- 222,227 ---- *************** show_locus (locus *loc, int c1, int c2) *** 289,295 **** c1 -= offset; c2 -= offset; ! for (i = 1; i <= cmax; i++) { if (i == c1) error_char ('1'); --- 281,287 ---- c1 -= offset; c2 -= offset; ! for (i = 0; i <= cmax; i++) { if (i == c1) error_char ('1'); diff -Nrcpad gcc-4.3.2/gcc/fortran/expr.c gcc-4.3.3/gcc/fortran/expr.c *** gcc-4.3.2/gcc/fortran/expr.c Thu May 1 07:31:28 2008 --- gcc-4.3.3/gcc/fortran/expr.c Thu Jan 1 17:42:00 2009 *************** find_array_element (gfc_constructor *con *** 1018,1038 **** mpz_init_set_ui (span, 1); for (i = 0; i < ar->dimen; i++) { e = gfc_copy_expr (ar->start[i]); if (e->expr_type != EXPR_CONSTANT) { cons = NULL; goto depart; } ! /* Check the bounds. */ if ((ar->as->upper[i] ! && ar->as->upper[i]->expr_type == EXPR_CONSTANT ! && mpz_cmp (e->value.integer, ! ar->as->upper[i]->value.integer) > 0) ! || ! (ar->as->lower[i]->expr_type == EXPR_CONSTANT ! && mpz_cmp (e->value.integer, ! ar->as->lower[i]->value.integer) < 0)) { gfc_error ("Index in dimension %d is out of bounds " "at %L", i + 1, &ar->c_where[i]); --- 1018,1047 ---- mpz_init_set_ui (span, 1); for (i = 0; i < ar->dimen; i++) { + if (gfc_reduce_init_expr (ar->as->lower[i]) == FAILURE + || gfc_reduce_init_expr (ar->as->upper[i]) == FAILURE) + { + t = FAILURE; + cons = NULL; + goto depart; + } + e = gfc_copy_expr (ar->start[i]); if (e->expr_type != EXPR_CONSTANT) { cons = NULL; goto depart; } ! ! gcc_assert (ar->as->upper[i]->expr_type == EXPR_CONSTANT ! && ar->as->lower[i]->expr_type == EXPR_CONSTANT); ! ! /* Check the bounds. */ if ((ar->as->upper[i] ! && mpz_cmp (e->value.integer, ! ar->as->upper[i]->value.integer) > 0) ! || (mpz_cmp (e->value.integer, ! ar->as->lower[i]->value.integer) < 0)) { gfc_error ("Index in dimension %d is out of bounds " "at %L", i + 1, &ar->c_where[i]); *************** simplify_const_ref (gfc_expr *p) *** 1443,1448 **** --- 1452,1491 ---- { cons->expr->ref = copy_ref (p->ref->next); simplify_const_ref (cons->expr); + if (simplify_const_ref (cons->expr) == FAILURE) + return FAILURE; + } + + /* If this is a CHARACTER array and we possibly took a + substring out of it, update the type-spec's character + length according to the first element (as all should have + the same length). */ + if (p->ts.type == BT_CHARACTER) + { + int string_len; + + gcc_assert (p->ref->next); + gcc_assert (!p->ref->next->next); + gcc_assert (p->ref->next->type == REF_SUBSTRING); + + if (p->value.constructor) + { + const gfc_expr* first = p->value.constructor->expr; + gcc_assert (first->expr_type == EXPR_CONSTANT); + gcc_assert (first->ts.type == BT_CHARACTER); + string_len = first->value.character.length; + } + else + string_len = 0; + + if (!p->ts.cl) + { + p->ts.cl = gfc_get_charlen (); + p->ts.cl->next = NULL; + p->ts.cl->length = NULL; + } + gfc_free_expr (p->ts.cl->length); + p->ts.cl->length = gfc_int_expr (string_len); } } gfc_free_ref_list (p->ref); *************** check_init_expr_arguments (gfc_expr *e) *** 1968,1973 **** --- 2011,2019 ---- return MATCH_YES; } + + static try check_restricted (gfc_expr *); + /* F95, 7.1.6.1, Initialization expressions, (7) F2003, 7.1.7 Initialization expression, (8) */ *************** check_inquiry (gfc_expr *e, int not_rest *** 2047,2052 **** --- 2093,2103 ---- } else if (not_restricted && check_init_expr (ap->expr) == FAILURE) return MATCH_ERROR; + + if (not_restricted == 0 + && ap->expr->expr_type != EXPR_VARIABLE + && check_restricted (ap->expr) == FAILURE) + return MATCH_ERROR; } return MATCH_YES; *************** check_init_expr (gfc_expr *e) *** 2319,2338 **** } ! /* Match an initialization expression. We work by first matching an ! expression, then reducing it to a constant. */ ! ! match ! gfc_match_init_expr (gfc_expr **result) { - gfc_expr *expr; - match m; try t; - m = gfc_match_expr (&expr); - if (m != MATCH_YES) - return m; - gfc_init_expr = 1; t = gfc_resolve_expr (expr); if (t == SUCCESS) --- 2370,2384 ---- } ! /* Reduces a general expression to an initialization expression (a constant). ! This used to be part of gfc_match_init_expr. ! Note that this function doesn't free the given expression on FAILURE. */ ! ! try ! gfc_reduce_init_expr (gfc_expr *expr) { try t; gfc_init_expr = 1; t = gfc_resolve_expr (expr); if (t == SUCCESS) *************** gfc_match_init_expr (gfc_expr **result) *** 2340,2357 **** gfc_init_expr = 0; if (t == FAILURE) ! { ! gfc_free_expr (expr); ! return MATCH_ERROR; ! } if (expr->expr_type == EXPR_ARRAY && (gfc_check_constructor_type (expr) == FAILURE ! || gfc_expand_constructor (expr) == FAILURE)) ! { ! gfc_free_expr (expr); ! return MATCH_ERROR; ! } /* Not all inquiry functions are simplified to constant expressions so it is necessary to call check_inquiry again. */ --- 2386,2397 ---- gfc_init_expr = 0; if (t == FAILURE) ! return FAILURE; if (expr->expr_type == EXPR_ARRAY && (gfc_check_constructor_type (expr) == FAILURE ! || gfc_expand_constructor (expr) == FAILURE)) ! return FAILURE; /* Not all inquiry functions are simplified to constant expressions so it is necessary to call check_inquiry again. */ *************** gfc_match_init_expr (gfc_expr **result) *** 2359,2364 **** --- 2399,2431 ---- && !gfc_in_match_data ()) { gfc_error ("Initialization expression didn't reduce %C"); + return FAILURE; + } + + return SUCCESS; + } + + + /* Match an initialization expression. We work by first matching an + expression, then reducing it to a constant. */ + + match + gfc_match_init_expr (gfc_expr **result) + { + gfc_expr *expr; + match m; + try t; + + expr = NULL; + + m = gfc_match_expr (&expr); + if (m != MATCH_YES) + return m; + + t = gfc_reduce_init_expr (expr); + if (t != SUCCESS) + { + gfc_free_expr (expr); return MATCH_ERROR; } *************** gfc_match_init_expr (gfc_expr **result) *** 2368,2375 **** } - static try check_restricted (gfc_expr *); - /* Given an actual argument list, test to see that each argument is a restricted expression and optionally if the expression type is integer or character. */ --- 2435,2440 ---- *************** check_restricted (gfc_expr *e) *** 2508,2521 **** that host associated dummy array indices are accepted (PR23446). This mechanism also does the same for the specification expressions of array-valued functions. */ ! if (sym->attr.in_common ! || sym->attr.use_assoc ! || sym->attr.dummy ! || sym->attr.implied_index ! || sym->ns != gfc_current_ns ! || (sym->ns->proc_name != NULL ! && sym->ns->proc_name->attr.flavor == FL_MODULE) ! || (gfc_is_formal_arg () && (sym->ns == gfc_current_ns))) { t = SUCCESS; break; --- 2573,2589 ---- that host associated dummy array indices are accepted (PR23446). This mechanism also does the same for the specification expressions of array-valued functions. */ ! if (e->error ! || sym->attr.in_common ! || sym->attr.use_assoc ! || sym->attr.dummy ! || sym->attr.implied_index ! || (sym->ns && sym->ns == gfc_current_ns->parent) ! || (sym->ns && gfc_current_ns->parent ! && sym->ns == gfc_current_ns->parent->parent) ! || (sym->ns->proc_name != NULL ! && sym->ns->proc_name->attr.flavor == FL_MODULE) ! || (gfc_is_formal_arg () && (sym->ns == gfc_current_ns))) { t = SUCCESS; break; *************** check_restricted (gfc_expr *e) *** 2523,2529 **** gfc_error ("Variable '%s' cannot appear in the expression at %L", sym->name, &e->where); ! break; case EXPR_NULL: --- 2591,2598 ---- gfc_error ("Variable '%s' cannot appear in the expression at %L", sym->name, &e->where); ! /* Prevent a repetition of the error. */ ! e->error = 1; break; case EXPR_NULL: *************** gfc_check_assign (gfc_expr *lvalue, gfc_ *** 2825,2830 **** --- 2894,2900 ---- if (gfc_compare_types (&lvalue->ts, &rvalue->ts)) return SUCCESS; + /* Only DATA Statements come here. */ if (!conform) { /* Numeric can be converted to any other numeric. And Hollerith can be *************** gfc_check_assign (gfc_expr *lvalue, gfc_ *** 2837,2843 **** return SUCCESS; gfc_error ("Incompatible types in assignment at %L, %s to %s", ! &rvalue->where, gfc_typename (&rvalue->ts), gfc_typename (&lvalue->ts)); return FAILURE; --- 2907,2913 ---- return SUCCESS; gfc_error ("Incompatible types in assignment at %L, %s to %s", ! &lvalue->where, gfc_typename (&rvalue->ts), gfc_typename (&lvalue->ts)); return FAILURE; *************** gfc_check_pointer_assign (gfc_expr *lval *** 2888,2893 **** --- 2958,2989 ---- if (ref->type == REF_COMPONENT && ref->u.c.component->pointer) pointer = 1; + + if (ref->type == REF_ARRAY && ref->next == NULL) + { + if (ref->u.ar.type == AR_FULL) + break; + + if (ref->u.ar.type != AR_SECTION) + { + gfc_error ("Expected bounds specification for '%s' at %L", + lvalue->symtree->n.sym->name, &lvalue->where); + return FAILURE; + } + + if (gfc_notify_std (GFC_STD_F2003,"Fortran 2003: Bounds " + "specification for '%s' in pointer assignment " + "at %L", lvalue->symtree->n.sym->name, + &lvalue->where) == FAILURE) + return FAILURE; + + gfc_error ("Pointer bounds remapping at %L is not yet implemented " + "in gfortran", &lvalue->where); + /* TODO: See PR 29785. Add checks that all lbounds are specified and + either never or always the upper-bound; strides shall not be + present. */ + return FAILURE; + } } if (check_intent_in && lvalue->symtree->n.sym->attr.intent == INTENT_IN) *************** gfc_check_pointer_assign (gfc_expr *lval *** 2978,2986 **** return FAILURE; } ! if (attr.protected && attr.use_assoc) { ! gfc_error ("Pointer assigment target has PROTECTED " "attribute at %L", &rvalue->where); return FAILURE; } --- 3074,3082 ---- return FAILURE; } ! if (attr.protected && attr.use_assoc && !attr.pointer) { ! gfc_error ("Pointer assignment target has PROTECTED " "attribute at %L", &rvalue->where); return FAILURE; } diff -Nrcpad gcc-4.3.2/gcc/fortran/gfortran.h gcc-4.3.3/gcc/fortran/gfortran.h *** gcc-4.3.2/gcc/fortran/gfortran.h Wed Jan 30 06:56:10 2008 --- gcc-4.3.3/gcc/fortran/gfortran.h Sat Jan 10 21:01:14 2009 *************** typedef struct gfc_expr *** 1432,1437 **** --- 1432,1445 ---- and if we have decided not to allocate temporary data for that array. */ unsigned int inline_noncopying_intrinsic : 1, is_boz : 1; + /* Sometimes, when an error has been emitted, it is necessary to prevent + it from recurring. */ + unsigned int error : 1; + + /* Mark and expression where a user operator has been substituted by + a function call in interface.c(gfc_extend_expr). */ + unsigned int user_operator : 1; + /* Used to quickly find a given constructor by its offset. */ splay_tree con_by_offset; diff -Nrcpad gcc-4.3.2/gcc/fortran/gfortran.info gcc-4.3.3/gcc/fortran/gfortran.info *** gcc-4.3.2/gcc/fortran/gfortran.info Wed Aug 27 19:32:48 2008 --- gcc-4.3.3/gcc/fortran/gfortran.info Sat Jan 24 11:53:16 2009 *************** *** 1,7 **** ! This is doc/gfortran.info, produced by makeinfo version 4.8 from ! /scratch/joseph/4.3.2/gcc-4.3.2/gcc-4.3.2/gcc/fortran/gfortran.texi. ! Copyright (C) 1999-2007 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or --- 1,7 ---- ! This is doc/gfortran.info, produced by makeinfo version 4.12 from ! /abuild/rguenther/tmp/gcc-4.3.3/gcc-4.3.3/gcc/fortran/gfortran.texi. ! Copyright (C) 1999-2007 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or *************** extension are also run through preproces *** 221,227 **** This manual specifically documents the Fortran front end, which handles the programming language's syntax and semantics. The aspects of GCC which relate to the optimization passes and the back-end code ! generation are documented in the GCC manual; see *Note Introduction: (gcc)Top. The two manuals together provide a complete reference for the GNU Fortran compiler. --- 221,227 ---- This manual specifically documents the Fortran front end, which handles the programming language's syntax and semantics. The aspects of GCC which relate to the optimization passes and the back-end code ! generation are documented in the GCC manual; see *note Introduction: (gcc)Top. The two manuals together provide a complete reference for the GNU Fortran compiler. *************** f95'. *** 244,250 **** If the GNU Fortran invoked the preprocessor, `__GFORTRAN__' is defined and `__GNUC__', `__GNUC_MINOR__' and `__GNUC_PATCHLEVEL__' can ! be used to determine the version of the compiler. See *Note Overview: (cpp)Top. for details. While CPP is the de-facto standard for preprocessing Fortran code, --- 244,250 ---- If the GNU Fortran invoked the preprocessor, `__GFORTRAN__' is defined and `__GNUC__', `__GNUC_MINOR__' and `__GNUC_PATCHLEVEL__' can ! be used to determine the version of the compiler. See *note Overview: (cpp)Top. for details. While CPP is the de-facto standard for preprocessing Fortran code, *************** operator in C, except the address is cas *** 1810,1816 **** ipt = loc(ar) ! Makes arpte is an alias for ar arpte(1) = 1.0 ! Sets ar(1) to 1.0 The pointer can also be set by a call to the `MALLOC' intrinsic (see ! *Note MALLOC::). Cray pointees often are used to alias an existing variable. For example: --- 1810,1816 ---- ipt = loc(ar) ! Makes arpte is an alias for ar arpte(1) = 1.0 ! Sets ar(1) to 1.0 The pointer can also be set by a call to the `MALLOC' intrinsic (see ! *note MALLOC::). Cray pointees often are used to alias an existing variable. For example: *************** free-form source code; the `c$omp', `*$o *** 1931,1937 **** fixed form; the `!$' conditional compilation sentinels in free form; and the `c$', `*$' and `!$' sentinels in fixed form, `gfortran' needs to be invoked with the `-fopenmp'. This also arranges for automatic ! linking of the GNU OpenMP runtime library *Note libgomp: (libgomp)Top. The OpenMP Fortran runtime library routines are provided both in a form of a Fortran 90 module named `omp_lib' and in a form of a Fortran --- 1931,1937 ---- fixed form; the `!$' conditional compilation sentinels in free form; and the `c$', `*$' and `!$' sentinels in fixed form, `gfortran' needs to be invoked with the `-fopenmp'. This also arranges for automatic ! linking of the GNU OpenMP runtime library *note libgomp: (libgomp)Top. The OpenMP Fortran runtime library routines are provided both in a form of a Fortran 90 module named `omp_lib' and in a form of a Fortran *************** _Example_: *** 2424,2430 **** end program test_abort _See also_: ! *Note EXIT::, *Note KILL::  --- 2424,2430 ---- end program test_abort _See also_: ! *note EXIT::, *note KILL::  *************** _Example_: *** 2562,2572 **** end program test_achar _Note_: ! See *Note ICHAR:: for a discussion of converting between numerical values and formatted string representations. _See also_: ! *Note CHAR::, *Note IACHAR::, *Note ICHAR::  --- 2562,2572 ---- end program test_achar _Note_: ! See *note ICHAR:: for a discussion of converting between numerical values and formatted string representations. _See also_: ! *note CHAR::, *note IACHAR::, *note ICHAR::  *************** _Specific names_: *** 2606,2612 **** `DACOS(X)' `REAL(8) X' `REAL(8)' F77 and later _See also_: ! Inverse function: *Note COS::  --- 2606,2612 ---- `DACOS(X)' `REAL(8) X' `REAL(8)' F77 and later _See also_: ! Inverse function: *note COS::  *************** _Specific names_: *** 2647,2653 **** `DACOSH(X)' `REAL(8) X' `REAL(8)' GNU extension _See also_: ! Inverse function: *Note COSH::  File: gfortran.info, Node: ADJUSTL, Next: ADJUSTR, Prev: ACOSH, Up: Intrinsic Procedures --- 2647,2653 ---- `DACOSH(X)' `REAL(8) X' `REAL(8)' GNU extension _See also_: ! Inverse function: *note COSH::  File: gfortran.info, Node: ADJUSTL, Next: ADJUSTR, Prev: ACOSH, Up: Intrinsic Procedures *************** _Example_: *** 2684,2690 **** end program test_adjustl _See also_: ! *Note ADJUSTR::, *Note TRIM::  File: gfortran.info, Node: ADJUSTR, Next: AIMAG, Prev: ADJUSTL, Up: Intrinsic Procedures --- 2684,2690 ---- end program test_adjustl _See also_: ! *note ADJUSTR::, *note TRIM::  File: gfortran.info, Node: ADJUSTR, Next: AIMAG, Prev: ADJUSTL, Up: Intrinsic Procedures *************** _Example_: *** 2721,2727 **** end program test_adjustr _See also_: ! *Note ADJUSTL::, *Note TRIM::  File: gfortran.info, Node: AIMAG, Next: AINT, Prev: ADJUSTR, Up: Intrinsic Procedures --- 2721,2727 ---- end program test_adjustr _See also_: ! *note ADJUSTL::, *note TRIM::  File: gfortran.info, Node: AIMAG, Next: AINT, Prev: ADJUSTR, Up: Intrinsic Procedures *************** _Syntax_: *** 2790,2797 **** _Arguments_: X The type of the argument shall be `REAL(*)'. KIND (Optional) An `INTEGER(*)' initialization ! expression indicating the ! kind parameter of the result. _Return value_: The return value is of type real with the kind type parameter of --- 2790,2797 ---- _Arguments_: X The type of the argument shall be `REAL(*)'. KIND (Optional) An `INTEGER(*)' initialization ! expression indicating the kind ! parameter of the result. _Return value_: The return value is of type real with the kind type parameter of *************** _Description_: *** 2967,2973 **** This intrinsic routine is provided for backwards compatibility with GNU Fortran 77. For integer arguments, programmers should consider ! the use of the *Note IAND:: intrinsic defined by the Fortran standard. _Standard_: --- 2967,2973 ---- This intrinsic routine is provided for backwards compatibility with GNU Fortran 77. For integer arguments, programmers should consider ! the use of the *note IAND:: intrinsic defined by the Fortran standard. _Standard_: *************** _Example_: *** 3000,3006 **** END PROGRAM _See also_: ! F95 elemental function: *Note IAND::  File: gfortran.info, Node: ANINT, Next: ANY, Prev: AND, Up: Intrinsic Procedures --- 3000,3006 ---- END PROGRAM _See also_: ! F95 elemental function: *note IAND::  File: gfortran.info, Node: ANINT, Next: ANY, Prev: AND, Up: Intrinsic Procedures *************** _Syntax_: *** 3024,3031 **** _Arguments_: X The type of the argument shall be `REAL(*)'. KIND (Optional) An `INTEGER(*)' initialization ! expression indicating the ! kind parameter of the result. _Return value_: The return value is of type real with the kind type parameter of --- 3024,3031 ---- _Arguments_: X The type of the argument shall be `REAL(*)'. KIND (Optional) An `INTEGER(*)' initialization ! expression indicating the kind ! parameter of the result. _Return value_: The return value is of type real with the kind type parameter of *************** _Specific names_: *** 3147,3153 **** `DASIN(X)' `REAL(8) X' `REAL(8)' F77 and later _See also_: ! Inverse function: *Note SIN::  --- 3147,3153 ---- `DASIN(X)' `REAL(8) X' `REAL(8)' F77 and later _See also_: ! Inverse function: *note SIN::  *************** _Specific names_: *** 3188,3194 **** `DASINH(X)' `REAL(8) X' `REAL(8)' GNU extension. _See also_: ! Inverse function: *Note SINH::  File: gfortran.info, Node: ASSOCIATED, Next: ATAN, Prev: ASINH, Up: Intrinsic Procedures --- 3188,3194 ---- `DASINH(X)' `REAL(8) X' `REAL(8)' GNU extension. _See also_: ! Inverse function: *note SINH::  File: gfortran.info, Node: ASSOCIATED, Next: ATAN, Prev: ASINH, Up: Intrinsic Procedures *************** _Example_: *** 3260,3266 **** end program test_associated _See also_: ! *Note NULL::  File: gfortran.info, Node: ATAN, Next: ATAN2, Prev: ASSOCIATED, Up: Intrinsic Procedures --- 3260,3266 ---- end program test_associated _See also_: ! *note NULL::  File: gfortran.info, Node: ATAN, Next: ATAN2, Prev: ASSOCIATED, Up: Intrinsic Procedures *************** _Specific names_: *** 3298,3304 **** `DATAN(X)' `REAL(8) X' `REAL(8)' F77 and later _See also_: ! Inverse function: *Note TAN::  --- 3298,3304 ---- `DATAN(X)' `REAL(8) X' `REAL(8)' F77 and later _See also_: ! Inverse function: *note TAN::  *************** _Specific names_: *** 3381,3387 **** `DATANH(X)' `REAL(8) X' `REAL(8)' GNU extension _See also_: ! Inverse function: *Note TANH::  File: gfortran.info, Node: BESJ0, Next: BESJ1, Prev: ATANH, Up: Intrinsic Procedures --- 3381,3387 ---- `DATANH(X)' `REAL(8) X' `REAL(8)' GNU extension _See also_: ! Inverse function: *note TANH::  File: gfortran.info, Node: BESJ0, Next: BESJ1, Prev: ATANH, Up: Intrinsic Procedures *************** _Example_: *** 3723,3729 **** end subroutine association_test _See also_: ! *Note C_LOC::, *Note C_FUNLOC::  File: gfortran.info, Node: C_FUNLOC, Next: C_LOC, Prev: C_F_PROCPOINTER, Up: Intrinsic Procedures --- 3723,3729 ---- end subroutine association_test _See also_: ! *note C_LOC::, *note C_FUNLOC::  File: gfortran.info, Node: C_FUNLOC, Next: C_LOC, Prev: C_F_PROCPOINTER, Up: Intrinsic Procedures *************** _Example_: *** 3775,3781 **** end program main _See also_: ! *Note C_ASSOCIATED::, *Note C_LOC::, *Note C_F_POINTER::, *Note C_F_PROCPOINTER::  --- 3775,3781 ---- end program main _See also_: ! *note C_ASSOCIATED::, *note C_LOC::, *note C_F_POINTER::, *note C_F_PROCPOINTER::  *************** _Syntax_: *** 3802,3808 **** _Arguments_: CPTR scalar of the type `C_FUNPTR'. It is ! `INTENT(IN)'. FPTR procedure pointer interoperable with CPTR. It is `INTENT(OUT)'. --- 3802,3808 ---- _Arguments_: CPTR scalar of the type `C_FUNPTR'. It is ! `INTENT(IN)'. FPTR procedure pointer interoperable with CPTR. It is `INTENT(OUT)'. *************** _Example_: *** 3830,3836 **** end program main _See also_: ! *Note C_LOC::, *Note C_F_POINTER::  File: gfortran.info, Node: C_F_POINTER, Next: C_F_PROCPOINTER, Prev: C_ASSOCIATED, Up: Intrinsic Procedures --- 3830,3836 ---- end program main _See also_: ! *note C_LOC::, *note C_F_POINTER::  File: gfortran.info, Node: C_F_POINTER, Next: C_F_PROCPOINTER, Prev: C_ASSOCIATED, Up: Intrinsic Procedures *************** _Syntax_: *** 3853,3866 **** _Arguments_: CPTR scalar of the type `C_PTR'. It is ! `INTENT(IN)'. FPTR pointer interoperable with CPTR. It is ! `INTENT(OUT)'. SHAPE (Optional) Rank-one array of type `INTEGER' ! with `INTENT(IN)'. It ! shall be present if and only if FPTR is ! an array. The size must be equal to the ! rank of FPTR. _Example_: program main --- 3853,3866 ---- _Arguments_: CPTR scalar of the type `C_PTR'. It is ! `INTENT(IN)'. FPTR pointer interoperable with CPTR. It is ! `INTENT(OUT)'. SHAPE (Optional) Rank-one array of type `INTEGER' ! with `INTENT(IN)'. It shall ! be present if and only if ! FPTR is an array. The size ! must be equal to the rank of FPTR. _Example_: program main *************** _Example_: *** 3879,3885 **** end program main _See also_: ! *Note C_LOC::, *Note C_F_PROCPOINTER::  File: gfortran.info, Node: C_LOC, Next: CEILING, Prev: C_FUNLOC, Up: Intrinsic Procedures --- 3879,3885 ---- end program main _See also_: ! *note C_LOC::, *note C_F_PROCPOINTER::  File: gfortran.info, Node: C_LOC, Next: CEILING, Prev: C_FUNLOC, Up: Intrinsic Procedures *************** _Syntax_: *** 3901,3908 **** _Arguments_: X Associated scalar pointer or interoperable ! scalar or allocated allocatable variable ! with `TARGET' attribute. _Return value_: The return value is of type `C_PTR' and contains the C address of --- 3901,3908 ---- _Arguments_: X Associated scalar pointer or interoperable ! scalar or allocated allocatable ! variable with `TARGET' attribute. _Return value_: The return value is of type `C_PTR' and contains the C address of *************** _Example_: *** 3919,3925 **** end subroutine association_test _See also_: ! *Note C_ASSOCIATED::, *Note C_FUNLOC::, *Note C_F_POINTER::, *Note C_F_PROCPOINTER::  --- 3919,3925 ---- end subroutine association_test _See also_: ! *note C_ASSOCIATED::, *note C_FUNLOC::, *note C_F_POINTER::, *note C_F_PROCPOINTER::  *************** _Syntax_: *** 3943,3950 **** _Arguments_: X The type shall be `REAL(*)'. KIND (Optional) An `INTEGER(*)' initialization ! expression indicating the ! kind parameter of the result. _Return value_: The return value is of type `INTEGER(KIND)' --- 3943,3950 ---- _Arguments_: X The type shall be `REAL(*)'. KIND (Optional) An `INTEGER(*)' initialization ! expression indicating the kind ! parameter of the result. _Return value_: The return value is of type `INTEGER(KIND)' *************** _Example_: *** 3958,3964 **** end program test_ceiling _See also_: ! *Note FLOOR::, *Note NINT::  --- 3958,3964 ---- end program test_ceiling _See also_: ! *note FLOOR::, *note NINT::  *************** _Syntax_: *** 3983,3990 **** _Arguments_: I The type shall be `INTEGER(*)'. KIND (Optional) An `INTEGER(*)' initialization ! expression indicating the ! kind parameter of the result. _Return value_: The return value is of type `CHARACTER(1)' --- 3983,3990 ---- _Arguments_: I The type shall be `INTEGER(*)'. KIND (Optional) An `INTEGER(*)' initialization ! expression indicating the kind ! parameter of the result. _Return value_: The return value is of type `CHARACTER(1)' *************** _Example_: *** 3998,4008 **** end program test_char _Note_: ! See *Note ICHAR:: for a discussion of converting between numerical values and formatted string representations. _See also_: ! *Note ACHAR::, *Note IACHAR::, *Note ICHAR::  --- 3998,4008 ---- end program test_char _Note_: ! See *note ICHAR:: for a discussion of converting between numerical values and formatted string representations. _See also_: ! *note ACHAR::, *note IACHAR::, *note ICHAR::  *************** _Syntax_: *** 4029,4036 **** _Arguments_: NAME The type shall be `CHARACTER(*)' and shall ! specify a valid path ! within the file system. STATUS (Optional) `INTEGER' status flag of the default kind. Returns 0 on success, and a system specific --- 4029,4036 ---- _Arguments_: NAME The type shall be `CHARACTER(*)' and shall ! specify a valid path within ! the file system. STATUS (Optional) `INTEGER' status flag of the default kind. Returns 0 on success, and a system specific *************** _Example_: *** 4047,4053 **** END PROGRAM _See also_: ! *Note GETCWD::  File: gfortran.info, Node: CHMOD, Next: CMPLX, Prev: CHDIR, Up: Intrinsic Procedures --- 4047,4053 ---- END PROGRAM _See also_: ! *note GETCWD::  File: gfortran.info, Node: CHMOD, Next: CMPLX, Prev: CHDIR, Up: Intrinsic Procedures *************** _Arguments_: *** 4134,4141 **** `COMPLEX(*)'.) May be `INTEGER(*)' or `REAL(*)'. KIND (Optional) An `INTEGER(*)' initialization ! expression indicating the ! kind parameter of the result. _Return value_: The return value is of `COMPLEX' type, with a kind equal to KIND --- 4134,4141 ---- `COMPLEX(*)'.) May be `INTEGER(*)' or `REAL(*)'. KIND (Optional) An `INTEGER(*)' initialization ! expression indicating the kind ! parameter of the result. _Return value_: The return value is of `COMPLEX' type, with a kind equal to KIND *************** _Example_: *** 4152,4158 **** end program test_cmplx _See also_: ! *Note COMPLEX::  File: gfortran.info, Node: COMMAND_ARGUMENT_COUNT, Next: COMPLEX, Prev: CMPLX, Up: Intrinsic Procedures --- 4152,4158 ---- end program test_cmplx _See also_: ! *note COMPLEX::  File: gfortran.info, Node: COMMAND_ARGUMENT_COUNT, Next: COMPLEX, Prev: CMPLX, Up: Intrinsic Procedures *************** _Example_: *** 4187,4193 **** end program test_command_argument_count _See also_: ! *Note GET_COMMAND::, *Note GET_COMMAND_ARGUMENT::  File: gfortran.info, Node: COMPLEX, Next: CONJG, Prev: COMMAND_ARGUMENT_COUNT, Up: Intrinsic Procedures --- 4187,4193 ---- end program test_command_argument_count _See also_: ! *note GET_COMMAND::, *note GET_COMMAND_ARGUMENT::  File: gfortran.info, Node: COMPLEX, Next: CONJG, Prev: COMMAND_ARGUMENT_COUNT, Up: Intrinsic Procedures *************** _Example_: *** 4229,4235 **** end program test_complex _See also_: ! *Note CMPLX::  File: gfortran.info, Node: CONJG, Next: COS, Prev: COMPLEX, Up: Intrinsic Procedures --- 4229,4235 ---- end program test_complex _See also_: ! *note CMPLX::  File: gfortran.info, Node: CONJG, Next: COS, Prev: COMPLEX, Up: Intrinsic Procedures *************** _Specific names_: *** 4313,4319 **** X' _See also_: ! Inverse function: *Note ACOS::  --- 4313,4319 ---- X' _See also_: ! Inverse function: *note ACOS::  *************** _Specific names_: *** 4352,4358 **** `DCOSH(X)' `REAL(8) X' `REAL(8)' F77 and later _See also_: ! Inverse function: *Note ACOSH::  --- 4352,4358 ---- `DCOSH(X)' `REAL(8) X' `REAL(8)' F77 and later _See also_: ! Inverse function: *note ACOSH::  *************** _Example_: *** 4456,4462 **** end program test_cpu_time _See also_: ! *Note SYSTEM_CLOCK::, *Note DATE_AND_TIME::  File: gfortran.info, Node: CSHIFT, Next: CTIME, Prev: CPU_TIME, Up: Intrinsic Procedures --- 4456,4462 ---- end program test_cpu_time _See also_: ! *note SYSTEM_CLOCK::, *note DATE_AND_TIME::  File: gfortran.info, Node: CSHIFT, Next: CTIME, Prev: CPU_TIME, Up: Intrinsic Procedures *************** _Example_: *** 4549,4555 **** end program test_ctime _See Also_: ! *Note GMTIME::, *Note LTIME::, *Note TIME::, *Note TIME8::  File: gfortran.info, Node: DATE_AND_TIME, Next: DBLE, Prev: CTIME, Up: Intrinsic Procedures --- 4549,4555 ---- end program test_ctime _See Also_: ! *note GMTIME::, *note LTIME::, *note TIME::, *note TIME8::  File: gfortran.info, Node: DATE_AND_TIME, Next: DBLE, Prev: CTIME, Up: Intrinsic Procedures *************** _Example_: *** 4615,4621 **** end program test_time_and_date _See also_: ! *Note CPU_TIME::, *Note SYSTEM_CLOCK::  File: gfortran.info, Node: DBLE, Next: DCMPLX, Prev: DATE_AND_TIME, Up: Intrinsic Procedures --- 4615,4621 ---- end program test_time_and_date _See also_: ! *note CPU_TIME::, *note SYSTEM_CLOCK::  File: gfortran.info, Node: DBLE, Next: DCMPLX, Prev: DATE_AND_TIME, Up: Intrinsic Procedures *************** _Example_: *** 4651,4657 **** end program test_dble _See also_: ! *Note DFLOAT::, *Note FLOAT::, *Note REAL::  File: gfortran.info, Node: DCMPLX, Next: DFLOAT, Prev: DBLE, Up: Intrinsic Procedures --- 4651,4657 ---- end program test_dble _See also_: ! *note DFLOAT::, *note FLOAT::, *note REAL::  File: gfortran.info, Node: DCMPLX, Next: DFLOAT, Prev: DBLE, Up: Intrinsic Procedures *************** _Example_: *** 4727,4733 **** end program test_dfloat _See also_: ! *Note DBLE::, *Note FLOAT::, *Note REAL::  File: gfortran.info, Node: DIGITS, Next: DIM, Prev: DFLOAT, Up: Intrinsic Procedures --- 4727,4733 ---- end program test_dfloat _See also_: ! *note DBLE::, *note FLOAT::, *note REAL::  File: gfortran.info, Node: DIGITS, Next: DIM, Prev: DFLOAT, Up: Intrinsic Procedures *************** _Example_: *** 4918,4924 **** end program test_dreal _See also_: ! *Note AIMAG::  --- 4918,4924 ---- end program test_dreal _See also_: ! *note AIMAG::  *************** _Example_: *** 4998,5004 **** end program test_dtime _See also_: ! *Note CPU_TIME::  --- 4998,5004 ---- end program test_dtime _See also_: ! *note CPU_TIME::  *************** _Example_: *** 5228,5234 **** end program test_etime _See also_: ! *Note CPU_TIME::  --- 5228,5234 ---- end program test_etime _See also_: ! *note CPU_TIME::  *************** _Example_: *** 5265,5271 **** end program test_exit _See also_: ! *Note ABORT::, *Note KILL::  File: gfortran.info, Node: EXP, Next: EXPONENT, Prev: EXIT, Up: Intrinsic Procedures --- 5265,5271 ---- end program test_exit _See also_: ! *note ABORT::, *note KILL::  File: gfortran.info, Node: EXP, Next: EXPONENT, Prev: EXIT, Up: Intrinsic Procedures *************** _Example_: *** 5416,5422 **** end program test_float _See also_: ! *Note DBLE::, *Note DFLOAT::, *Note REAL::  File: gfortran.info, Node: FGET, Next: FGETC, Prev: FDATE, Up: Intrinsic Procedures --- 5416,5422 ---- end program test_float _See also_: ! *note DBLE::, *note DFLOAT::, *note REAL::  File: gfortran.info, Node: FGET, Next: FGETC, Prev: FDATE, Up: Intrinsic Procedures *************** _Description_: *** 5437,5443 **** compatibility with `g77'. GNU Fortran provides the Fortran 2003 Stream facility. Programmers should consider the use of new stream IO feature in new code for future portability. See also ! *Note Fortran 2003 status::. _Standard_: GNU extension --- 5437,5443 ---- compatibility with `g77'. GNU Fortran provides the Fortran 2003 Stream facility. Programmers should consider the use of new stream IO feature in new code for future portability. See also ! *note Fortran 2003 status::. _Standard_: GNU extension *************** _Syntax_: *** 5451,5458 **** _Arguments_: C The type shall be `CHARACTER'. STATUS (Optional) status flag of type `INTEGER'. ! Returns 0 on success, -1 ! on end-of-file, and a system specific positive error code otherwise. _Example_: --- 5451,5458 ---- _Arguments_: C The type shall be `CHARACTER'. STATUS (Optional) status flag of type `INTEGER'. ! Returns 0 on success, -1 on ! end-of-file, and a system specific positive error code otherwise. _Example_: *************** _Example_: *** 5471,5477 **** END PROGRAM _See also_: ! *Note FGETC::, *Note FPUT::, *Note FPUTC::  File: gfortran.info, Node: FGETC, Next: FLOAT, Prev: FGET, Up: Intrinsic Procedures --- 5471,5477 ---- END PROGRAM _See also_: ! *note FGETC::, *note FPUT::, *note FPUTC::  File: gfortran.info, Node: FGETC, Next: FLOAT, Prev: FGET, Up: Intrinsic Procedures *************** _Description_: *** 5492,5498 **** compatibility with `g77'. GNU Fortran provides the Fortran 2003 Stream facility. Programmers should consider the use of new stream IO feature in new code for future portability. See also ! *Note Fortran 2003 status::. _Standard_: GNU extension --- 5492,5498 ---- compatibility with `g77'. GNU Fortran provides the Fortran 2003 Stream facility. Programmers should consider the use of new stream IO feature in new code for future portability. See also ! *note Fortran 2003 status::. _Standard_: GNU extension *************** _Example_: *** 5526,5532 **** END PROGRAM _See also_: ! *Note FGET::, *Note FPUT::, *Note FPUTC::  File: gfortran.info, Node: FLOOR, Next: FLUSH, Prev: FLOAT, Up: Intrinsic Procedures --- 5526,5532 ---- END PROGRAM _See also_: ! *note FGET::, *note FPUT::, *note FPUTC::  File: gfortran.info, Node: FLOOR, Next: FLUSH, Prev: FLOAT, Up: Intrinsic Procedures *************** _Syntax_: *** 5549,5556 **** _Arguments_: X The type shall be `REAL(*)'. KIND (Optional) An `INTEGER(*)' initialization ! expression indicating the ! kind parameter of the result. _Return value_: The return value is of type `INTEGER(KIND)' --- 5549,5556 ---- _Arguments_: X The type shall be `REAL(*)'. KIND (Optional) An `INTEGER(*)' initialization ! expression indicating the kind ! parameter of the result. _Return value_: The return value is of type `INTEGER(KIND)' *************** _Example_: *** 5564,5570 **** end program test_floor _See also_: ! *Note CEILING::, *Note NINT::  --- 5564,5570 ---- end program test_floor _See also_: ! *note CEILING::, *note NINT::  *************** _Description_: *** 5648,5654 **** compatibility with `g77'. GNU Fortran provides the Fortran 2003 Stream facility. Programmers should consider the use of new stream IO feature in new code for future portability. See also ! *Note Fortran 2003 status::. _Standard_: GNU extension --- 5648,5654 ---- compatibility with `g77'. GNU Fortran provides the Fortran 2003 Stream facility. Programmers should consider the use of new stream IO feature in new code for future portability. See also ! *note Fortran 2003 status::. _Standard_: GNU extension *************** _Example_: *** 5676,5682 **** END PROGRAM _See also_: ! *Note FPUTC::, *Note FGET::, *Note FGETC::  File: gfortran.info, Node: FPUTC, Next: FRACTION, Prev: FPUT, Up: Intrinsic Procedures --- 5676,5682 ---- END PROGRAM _See also_: ! *note FPUTC::, *note FGET::, *note FGETC::  File: gfortran.info, Node: FPUTC, Next: FRACTION, Prev: FPUT, Up: Intrinsic Procedures *************** _Description_: *** 5697,5703 **** compatibility with `g77'. GNU Fortran provides the Fortran 2003 Stream facility. Programmers should consider the use of new stream IO feature in new code for future portability. See also ! *Note Fortran 2003 status::. _Standard_: GNU extension --- 5697,5703 ---- compatibility with `g77'. GNU Fortran provides the Fortran 2003 Stream facility. Programmers should consider the use of new stream IO feature in new code for future portability. See also ! *note Fortran 2003 status::. _Standard_: GNU extension *************** _Example_: *** 5729,5735 **** END PROGRAM _See also_: ! *Note FPUT::, *Note FGET::, *Note FGETC::  File: gfortran.info, Node: FRACTION, Next: FREE, Prev: FPUTC, Up: Intrinsic Procedures --- 5729,5735 ---- END PROGRAM _See also_: ! *note FPUT::, *note FGET::, *note FGETC::  File: gfortran.info, Node: FRACTION, Next: FREE, Prev: FPUTC, Up: Intrinsic Procedures *************** _Example_: *** 5800,5806 **** See `MALLOC' for an example. _See also_: ! *Note MALLOC::  File: gfortran.info, Node: FSEEK, Next: FSTAT, Prev: FREE, Up: Intrinsic Procedures --- 5800,5806 ---- See `MALLOC' for an example. _See also_: ! *note MALLOC::  File: gfortran.info, Node: FSEEK, Next: FSTAT, Prev: FREE, Up: Intrinsic Procedures *************** _Description_: *** 5827,5833 **** Please note that GNU Fortran provides the Fortran 2003 Stream facility. Programmers should consider the use of new stream IO ! feature in new code for future portability. See also *Note Fortran 2003 status::. _Standard_: --- 5827,5833 ---- Please note that GNU Fortran provides the Fortran 2003 Stream facility. Programmers should consider the use of new stream IO ! feature in new code for future portability. See also *note Fortran 2003 status::. _Standard_: *************** _Example_: *** 5870,5876 **** END PROGRAM _See also_: ! *Note FTELL::  File: gfortran.info, Node: FSTAT, Next: FTELL, Prev: FSEEK, Up: Intrinsic Procedures --- 5870,5876 ---- END PROGRAM _See also_: ! *note FTELL::  File: gfortran.info, Node: FSTAT, Next: FTELL, Prev: FSEEK, Up: Intrinsic Procedures *************** File: gfortran.info, Node: FSTAT, Next *** 5879,5888 **** =============================== _Description_: ! `FSTAT' is identical to *Note STAT::, except that information about an already opened file is obtained. ! The elements in `BUFF' are the same as described by *Note STAT::. This intrinsic is provided in both subroutine and function forms; however, only one form can be used in any given program unit. --- 5879,5888 ---- =============================== _Description_: ! `FSTAT' is identical to *note STAT::, except that information about an already opened file is obtained. ! The elements in `BUFF' are the same as described by *note STAT::. This intrinsic is provided in both subroutine and function forms; however, only one form can be used in any given program unit. *************** _Arguments_: *** 5904,5913 **** and a system specific error code otherwise. _Example_: ! See *Note STAT:: for an example. _See also_: ! To stat a link: *Note LSTAT::, to stat a file: *Note STAT::  File: gfortran.info, Node: FTELL, Next: GAMMA, Prev: FSTAT, Up: Intrinsic Procedures --- 5904,5913 ---- and a system specific error code otherwise. _Example_: ! See *note STAT:: for an example. _See also_: ! To stat a link: *note LSTAT::, to stat a file: *note STAT::  File: gfortran.info, Node: FTELL, Next: GAMMA, Prev: FSTAT, Up: Intrinsic Procedures *************** _Example_: *** 5948,5954 **** END PROGRAM _See also_: ! *Note FSEEK::  File: gfortran.info, Node: GAMMA, Next: GERROR, Prev: FTELL, Up: Intrinsic Procedures --- 5948,5954 ---- END PROGRAM _See also_: ! *note FSEEK::  File: gfortran.info, Node: GAMMA, Next: GERROR, Prev: FTELL, Up: Intrinsic Procedures *************** _Specific names_: *** 5989,5995 **** `DGAMMA(X)' `REAL(8) X' `REAL(8)' GNU Extension _See also_: ! Logarithm of the Gamma function: *Note LGAMMA::  --- 5989,5995 ---- `DGAMMA(X)' `REAL(8) X' `REAL(8)' GNU Extension _See also_: ! Logarithm of the Gamma function: *note LGAMMA::  *************** _Example_: *** 6022,6028 **** END PROGRAM _See also_: ! *Note IERRNO::, *Note PERROR::  File: gfortran.info, Node: GETARG, Next: GET_COMMAND, Prev: GERROR, Up: Intrinsic Procedures --- 6022,6028 ---- END PROGRAM _See also_: ! *note IERRNO::, *note PERROR::  File: gfortran.info, Node: GETARG, Next: GET_COMMAND, Prev: GERROR, Up: Intrinsic Procedures *************** _Description_: *** 6036,6042 **** This intrinsic routine is provided for backwards compatibility with GNU Fortran 77. In new code, programmers should consider the use ! of the *Note GET_COMMAND_ARGUMENT:: intrinsic defined by the Fortran 2003 standard. _Standard_: --- 6036,6042 ---- This intrinsic routine is provided for backwards compatibility with GNU Fortran 77. In new code, programmers should consider the use ! of the *note GET_COMMAND_ARGUMENT:: intrinsic defined by the Fortran 2003 standard. _Standard_: *************** _Example_: *** 6073,6082 **** END PROGRAM _See also_: ! GNU Fortran 77 compatibility function: *Note IARGC:: ! F2003 functions and subroutines: *Note GET_COMMAND::, *Note ! GET_COMMAND_ARGUMENT::, *Note COMMAND_ARGUMENT_COUNT::  File: gfortran.info, Node: GET_COMMAND, Next: GET_COMMAND_ARGUMENT, Prev: GETARG, Up: Intrinsic Procedures --- 6073,6082 ---- END PROGRAM _See also_: ! GNU Fortran 77 compatibility function: *note IARGC:: ! F2003 functions and subroutines: *note GET_COMMAND::, *note ! GET_COMMAND_ARGUMENT::, *note COMMAND_ARGUMENT_COUNT::  File: gfortran.info, Node: GET_COMMAND, Next: GET_COMMAND_ARGUMENT, Prev: GETARG, Up: Intrinsic Procedures *************** _Example_: *** 6112,6118 **** END PROGRAM _See also_: ! *Note GET_COMMAND_ARGUMENT::, *Note COMMAND_ARGUMENT_COUNT::  File: gfortran.info, Node: GET_COMMAND_ARGUMENT, Next: GETCWD, Prev: GET_COMMAND, Up: Intrinsic Procedures --- 6112,6118 ---- END PROGRAM _See also_: ! *note GET_COMMAND_ARGUMENT::, *note COMMAND_ARGUMENT_COUNT::  File: gfortran.info, Node: GET_COMMAND_ARGUMENT, Next: GETCWD, Prev: GET_COMMAND, Up: Intrinsic Procedures *************** _Example_: *** 6161,6167 **** END PROGRAM _See also_: ! *Note GET_COMMAND::, *Note COMMAND_ARGUMENT_COUNT::  File: gfortran.info, Node: GETCWD, Next: GETENV, Prev: GET_COMMAND_ARGUMENT, Up: Intrinsic Procedures --- 6161,6167 ---- END PROGRAM _See also_: ! *note GET_COMMAND::, *note COMMAND_ARGUMENT_COUNT::  File: gfortran.info, Node: GETCWD, Next: GETENV, Prev: GET_COMMAND_ARGUMENT, Up: Intrinsic Procedures *************** _Example_: *** 6198,6204 **** END PROGRAM _See also_: ! *Note CHDIR::  File: gfortran.info, Node: GETENV, Next: GET_ENVIRONMENT_VARIABLE, Prev: GETCWD, Up: Intrinsic Procedures --- 6198,6204 ---- END PROGRAM _See also_: ! *note CHDIR::  File: gfortran.info, Node: GETENV, Next: GET_ENVIRONMENT_VARIABLE, Prev: GETCWD, Up: Intrinsic Procedures *************** _Description_: *** 6211,6217 **** This intrinsic routine is provided for backwards compatibility with GNU Fortran 77. In new code, programmers should consider the use ! of the *Note GET_ENVIRONMENT_VARIABLE:: intrinsic defined by the Fortran 2003 standard. _Standard_: --- 6211,6217 ---- This intrinsic routine is provided for backwards compatibility with GNU Fortran 77. In new code, programmers should consider the use ! of the *note GET_ENVIRONMENT_VARIABLE:: intrinsic defined by the Fortran 2003 standard. _Standard_: *************** _Example_: *** 6240,6246 **** END PROGRAM _See also_: ! *Note GET_ENVIRONMENT_VARIABLE::  File: gfortran.info, Node: GET_ENVIRONMENT_VARIABLE, Next: GETGID, Prev: GETENV, Up: Intrinsic Procedures --- 6240,6246 ---- END PROGRAM _See also_: ! *note GET_ENVIRONMENT_VARIABLE::  File: gfortran.info, Node: GET_ENVIRONMENT_VARIABLE, Next: GETGID, Prev: GETENV, Up: Intrinsic Procedures *************** _Example_: *** 6301,6307 **** See `GETPID' for an example. _See also_: ! *Note GETPID::, *Note GETUID::  File: gfortran.info, Node: GETLOG, Next: GETPID, Prev: GETGID, Up: Intrinsic Procedures --- 6301,6307 ---- See `GETPID' for an example. _See also_: ! *note GETPID::, *note GETUID::  File: gfortran.info, Node: GETLOG, Next: GETPID, Prev: GETGID, Up: Intrinsic Procedures *************** _Example_: *** 6338,6344 **** END PROGRAM _See also_: ! *Note GETUID::  File: gfortran.info, Node: GETPID, Next: GETUID, Prev: GETLOG, Up: Intrinsic Procedures --- 6338,6344 ---- END PROGRAM _See also_: ! *note GETUID::  File: gfortran.info, Node: GETPID, Next: GETUID, Prev: GETLOG, Up: Intrinsic Procedures *************** _Example_: *** 6369,6375 **** end program info _See also_: ! *Note GETGID::, *Note GETUID::  File: gfortran.info, Node: GETUID, Next: GMTIME, Prev: GETPID, Up: Intrinsic Procedures --- 6369,6375 ---- end program info _See also_: ! *note GETGID::, *note GETUID::  File: gfortran.info, Node: GETUID, Next: GMTIME, Prev: GETPID, Up: Intrinsic Procedures *************** _Example_: *** 6396,6402 **** See `GETPID' for an example. _See also_: ! *Note GETPID::, *Note GETLOG::  File: gfortran.info, Node: GMTIME, Next: HOSTNM, Prev: GETUID, Up: Intrinsic Procedures --- 6396,6402 ---- See `GETPID' for an example. _See also_: ! *note GETPID::, *note GETLOG::  File: gfortran.info, Node: GMTIME, Next: HOSTNM, Prev: GETUID, Up: Intrinsic Procedures *************** _Return value_: *** 6450,6456 **** not available. _See also_: ! *Note CTIME::, *Note LTIME::, *Note TIME::, *Note TIME8::  --- 6450,6456 ---- not available. _See also_: ! *note CTIME::, *note LTIME::, *note TIME::, *note TIME8::  *************** _Syntax_: *** 6479,6487 **** _Arguments_: NAME Shall of type `CHARACTER(*)'. STATUS (Optional) status flag of type `INTEGER'. ! Returns 0 on success, or ! a system specific error ! code otherwise. _Return value_: In either syntax, NAME is set to the current hostname if it can be --- 6479,6487 ---- _Arguments_: NAME Shall of type `CHARACTER(*)'. STATUS (Optional) status flag of type `INTEGER'. ! Returns 0 on success, or a ! system specific error ! code otherwise. _Return value_: In either syntax, NAME is set to the current hostname if it can be *************** _Example_: *** 6556,6566 **** end program test_iachar _Note_: ! See *Note ICHAR:: for a discussion of converting between numerical values and formatted string representations. _See also_: ! *Note ACHAR::, *Note CHAR::, *Note ICHAR::  --- 6556,6566 ---- end program test_iachar _Note_: ! See *note ICHAR:: for a discussion of converting between numerical values and formatted string representations. _See also_: ! *note ACHAR::, *note CHAR::, *note ICHAR::  *************** _Example_: *** 6600,6607 **** END PROGRAM _See also_: ! *Note IOR::, *Note IEOR::, *Note IBITS::, *Note IBSET::, *Note ! IBCLR::, *Note NOT::  --- 6600,6607 ---- END PROGRAM _See also_: ! *note IOR::, *note IEOR::, *note IBITS::, *note IBSET::, *note ! IBCLR::, *note NOT::  *************** _Description_: *** 6616,6622 **** This intrinsic routine is provided for backwards compatibility with GNU Fortran 77. In new code, programmers should consider the use ! of the *Note COMMAND_ARGUMENT_COUNT:: intrinsic defined by the Fortran 2003 standard. _Standard_: --- 6616,6622 ---- This intrinsic routine is provided for backwards compatibility with GNU Fortran 77. In new code, programmers should consider the use ! of the *note COMMAND_ARGUMENT_COUNT:: intrinsic defined by the Fortran 2003 standard. _Standard_: *************** _Return value_: *** 6635,6647 **** The number of command line arguments, type `INTEGER(4)'. _Example_: ! See *Note GETARG:: _See also_: ! GNU Fortran 77 compatibility subroutine: *Note GETARG:: ! F2003 functions and subroutines: *Note GET_COMMAND::, *Note ! GET_COMMAND_ARGUMENT::, *Note COMMAND_ARGUMENT_COUNT::  File: gfortran.info, Node: IBCLR, Next: IBITS, Prev: IARGC, Up: Intrinsic Procedures --- 6635,6647 ---- The number of command line arguments, type `INTEGER(4)'. _Example_: ! See *note GETARG:: _See also_: ! GNU Fortran 77 compatibility subroutine: *note GETARG:: ! F2003 functions and subroutines: *note GET_COMMAND::, *note ! GET_COMMAND_ARGUMENT::, *note COMMAND_ARGUMENT_COUNT::  File: gfortran.info, Node: IBCLR, Next: IBITS, Prev: IARGC, Up: Intrinsic Procedures *************** _Return value_: *** 6670,6677 **** The return value is of type `INTEGER(*)' and of the same kind as I. _See also_: ! *Note IBITS::, *Note IBSET::, *Note IAND::, *Note IOR::, *Note ! IEOR::, *Note MVBITS::  --- 6670,6677 ---- The return value is of type `INTEGER(*)' and of the same kind as I. _See also_: ! *note IBITS::, *note IBSET::, *note IAND::, *note IOR::, *note ! IEOR::, *note MVBITS::  *************** _Return value_: *** 6704,6711 **** The return value is of type `INTEGER(*)' and of the same kind as I. _See also_: ! *Note BIT_SIZE::, *Note IBCLR::, *Note IBSET::, *Note IAND::, ! *Note IOR::, *Note IEOR::  File: gfortran.info, Node: IBSET, Next: ICHAR, Prev: IBITS, Up: Intrinsic Procedures --- 6704,6711 ---- The return value is of type `INTEGER(*)' and of the same kind as I. _See also_: ! *note BIT_SIZE::, *note IBCLR::, *note IBSET::, *note IAND::, ! *note IOR::, *note IEOR::  File: gfortran.info, Node: IBSET, Next: ICHAR, Prev: IBITS, Up: Intrinsic Procedures *************** _Return value_: *** 6734,6741 **** The return value is of type `INTEGER(*)' and of the same kind as I. _See also_: ! *Note IBCLR::, *Note IBITS::, *Note IAND::, *Note IOR::, *Note ! IEOR::, *Note MVBITS::  --- 6734,6741 ---- The return value is of type `INTEGER(*)' and of the same kind as I. _See also_: ! *note IBCLR::, *note IBITS::, *note IAND::, *note IOR::, *note ! IEOR::, *note MVBITS::  *************** _Note_: *** 6797,6803 **** end program read_val _See also_: ! *Note ACHAR::, *Note CHAR::, *Note IACHAR::  --- 6797,6803 ---- end program read_val _See also_: ! *note ACHAR::, *note CHAR::, *note IACHAR::  *************** _Return value_: *** 6867,6874 **** as the larger argument.) _See also_: ! *Note IOR::, *Note IAND::, *Note IBITS::, *Note IBSET::, *Note ! IBCLR::, *Note NOT::  File: gfortran.info, Node: IERRNO, Next: INDEX intrinsic, Prev: IEOR, Up: Intrinsic Procedures --- 6867,6874 ---- as the larger argument.) _See also_: ! *note IOR::, *note IAND::, *note IBITS::, *note IBSET::, *note ! IBCLR::, *note NOT::  File: gfortran.info, Node: IERRNO, Next: INDEX intrinsic, Prev: IEOR, Up: Intrinsic Procedures *************** _Return value_: *** 6897,6903 **** kind. _See also_: ! *Note PERROR::  File: gfortran.info, Node: INDEX intrinsic, Next: INT, Prev: IERRNO, Up: Intrinsic Procedures --- 6897,6903 ---- kind. _See also_: ! *note PERROR::  File: gfortran.info, Node: INDEX intrinsic, Next: INT, Prev: IERRNO, Up: Intrinsic Procedures *************** _Return value_: *** 6937,6943 **** absent, the return value is of default integer kind. _See also_: ! *Note SCAN::, *Note VERIFY::  File: gfortran.info, Node: INT, Next: INT2, Prev: INDEX intrinsic, Up: Intrinsic Procedures --- 6937,6943 ---- absent, the return value is of default integer kind. _See also_: ! *note SCAN::, *note VERIFY::  File: gfortran.info, Node: INT, Next: INT2, Prev: INDEX intrinsic, Up: Intrinsic Procedures *************** _Arguments_: *** 6961,6968 **** A Shall be of type `INTEGER(*)', `REAL(*)', or `COMPLEX(*)'. KIND (Optional) An `INTEGER(*)' initialization ! expression indicating the ! kind parameter of the result. _Return value_: These functions return a `INTEGER(*)' variable or array under the --- 6961,6968 ---- A Shall be of type `INTEGER(*)', `REAL(*)', or `COMPLEX(*)'. KIND (Optional) An `INTEGER(*)' initialization ! expression indicating the kind ! parameter of the result. _Return value_: These functions return a `INTEGER(*)' variable or array under the *************** _Return value_: *** 7025,7031 **** The return value is a `INTEGER(2)' variable. _See also_: ! *Note INT::, *Note INT8::, *Note LONG::  File: gfortran.info, Node: INT8, Next: IOR, Prev: INT2, Up: Intrinsic Procedures --- 7025,7031 ---- The return value is a `INTEGER(2)' variable. _See also_: ! *note INT::, *note INT8::, *note LONG::  File: gfortran.info, Node: INT8, Next: IOR, Prev: INT2, Up: Intrinsic Procedures *************** _Return value_: *** 7055,7061 **** The return value is a `INTEGER(8)' variable. _See also_: ! *Note INT::, *Note INT2::, *Note LONG::  File: gfortran.info, Node: IOR, Next: IRAND, Prev: INT8, Up: Intrinsic Procedures --- 7055,7061 ---- The return value is a `INTEGER(8)' variable. _See also_: ! *note INT::, *note INT2::, *note LONG::  File: gfortran.info, Node: IOR, Next: IRAND, Prev: INT8, Up: Intrinsic Procedures *************** _Return value_: *** 7087,7094 **** as the larger argument.) _See also_: ! *Note IEOR::, *Note IAND::, *Note IBITS::, *Note IBSET::, *Note ! IBCLR::, *Note NOT::  File: gfortran.info, Node: IRAND, Next: IS_IOSTAT_END, Prev: IOR, Up: Intrinsic Procedures --- 7087,7094 ---- as the larger argument.) _See also_: ! *note IEOR::, *note IAND::, *note IBITS::, *note IBSET::, *note ! IBCLR::, *note NOT::  File: gfortran.info, Node: IRAND, Next: IS_IOSTAT_END, Prev: IOR, Up: Intrinsic Procedures *************** _Description_: *** 7106,7112 **** This intrinsic routine is provided for backwards compatibility with GNU Fortran 77. It implements a simple modulo generator as provided ! by `g77'. For new code, one should consider the use of *Note RANDOM_NUMBER:: as it implements a superior algorithm. _Standard_: --- 7106,7112 ---- This intrinsic routine is provided for backwards compatibility with GNU Fortran 77. It implements a simple modulo generator as provided ! by `g77'. For new code, one should consider the use of *note RANDOM_NUMBER:: as it implements a superior algorithm. _Standard_: *************** _Example_: *** 7244,7250 **** END PROGRAM _See also_: ! *Note TTYNAM::  File: gfortran.info, Node: ISHFT, Next: ISHFTC, Prev: ISATTY, Up: Intrinsic Procedures --- 7244,7250 ---- END PROGRAM _See also_: ! *note TTYNAM::  File: gfortran.info, Node: ISHFT, Next: ISHFTC, Prev: ISATTY, Up: Intrinsic Procedures *************** _Return value_: *** 7278,7284 **** The return value is of type `INTEGER(*)' and of the same kind as I. _See also_: ! *Note ISHFTC::  File: gfortran.info, Node: ISHFTC, Next: ISNAN, Prev: ISHFT, Up: Intrinsic Procedures --- 7278,7284 ---- The return value is of type `INTEGER(*)' and of the same kind as I. _See also_: ! *note ISHFTC::  File: gfortran.info, Node: ISHFTC, Next: ISNAN, Prev: ISHFT, Up: Intrinsic Procedures *************** _Return value_: *** 7316,7322 **** The return value is of type `INTEGER(*)' and of the same kind as I. _See also_: ! *Note ISHFT::  File: gfortran.info, Node: ISNAN, Next: ITIME, Prev: ISHFTC, Up: Intrinsic Procedures --- 7316,7322 ---- The return value is of type `INTEGER(*)' and of the same kind as I. _See also_: ! *note ISHFT::  File: gfortran.info, Node: ISNAN, Next: ITIME, Prev: ISHFTC, Up: Intrinsic Procedures *************** _Arguments_: *** 7415,7426 **** PID Shall be a scalar `INTEGER', with `INTENT(IN)' SIGNAL Shall be a scalar `INTEGER', with `INTENT(IN)' STATUS (Optional) status flag of type `INTEGER(4)' or ! `INTEGER(8)'. Returns ! 0 on success, or a system-specific error code otherwise. _See also_: ! *Note ABORT::, *Note EXIT::  File: gfortran.info, Node: KIND, Next: LBOUND, Prev: KILL, Up: Intrinsic Procedures --- 7415,7426 ---- PID Shall be a scalar `INTEGER', with `INTENT(IN)' SIGNAL Shall be a scalar `INTEGER', with `INTENT(IN)' STATUS (Optional) status flag of type `INTEGER(4)' or ! `INTEGER(8)'. Returns 0 ! on success, or a system-specific error code otherwise. _See also_: ! *note ABORT::, *note EXIT::  File: gfortran.info, Node: KIND, Next: LBOUND, Prev: KILL, Up: Intrinsic Procedures *************** _Return value_: *** 7495,7501 **** bound is taken to be 1. _See also_: ! *Note UBOUND::  File: gfortran.info, Node: LEN, Next: LEN_TRIM, Prev: LBOUND, Up: Intrinsic Procedures --- 7495,7501 ---- bound is taken to be 1. _See also_: ! *note UBOUND::  File: gfortran.info, Node: LEN, Next: LEN_TRIM, Prev: LBOUND, Up: Intrinsic Procedures *************** _Return value_: *** 7530,7536 **** absent, the return value is of default integer kind. _See also_: ! *Note LEN_TRIM::, *Note ADJUSTL::, *Note ADJUSTR::  File: gfortran.info, Node: LEN_TRIM, Next: LGAMMA, Prev: LEN, Up: Intrinsic Procedures --- 7530,7536 ---- absent, the return value is of default integer kind. _See also_: ! *note LEN_TRIM::, *note ADJUSTL::, *note ADJUSTR::  File: gfortran.info, Node: LEN_TRIM, Next: LGAMMA, Prev: LEN, Up: Intrinsic Procedures *************** _Return value_: *** 7563,7569 **** absent, the return value is of default integer kind. _See also_: ! *Note LEN::, *Note ADJUSTL::, *Note ADJUSTR::  File: gfortran.info, Node: LGAMMA, Next: LGE, Prev: LEN_TRIM, Up: Intrinsic Procedures --- 7563,7569 ---- absent, the return value is of default integer kind. _See also_: ! *note LEN::, *note ADJUSTL::, *note ADJUSTR::  File: gfortran.info, Node: LGAMMA, Next: LGE, Prev: LEN_TRIM, Up: Intrinsic Procedures *************** _Specific names_: *** 7604,7610 **** `DLGAMA(X)' `REAL(8) X' `REAL(8)' GNU Extension _See also_: ! Gamma function: *Note GAMMA::  --- 7604,7610 ---- `DLGAMA(X)' `REAL(8) X' `REAL(8)' GNU Extension _See also_: ! Gamma function: *note GAMMA::  *************** _Return value_: *** 7644,7650 **** otherwise, based on the ASCII ordering. _See also_: ! *Note LGT::, *Note LLE::, *Note LLT::  File: gfortran.info, Node: LGT, Next: LINK, Prev: LGE, Up: Intrinsic Procedures --- 7644,7650 ---- otherwise, based on the ASCII ordering. _See also_: ! *note LGT::, *note LLE::, *note LLT::  File: gfortran.info, Node: LGT, Next: LINK, Prev: LGE, Up: Intrinsic Procedures *************** _Return value_: *** 7683,7689 **** otherwise, based on the ASCII ordering. _See also_: ! *Note LGE::, *Note LLE::, *Note LLT::  File: gfortran.info, Node: LINK, Next: LLE, Prev: LGT, Up: Intrinsic Procedures --- 7683,7689 ---- otherwise, based on the ASCII ordering. _See also_: ! *note LGE::, *note LLE::, *note LLT::  File: gfortran.info, Node: LINK, Next: LLE, Prev: LGT, Up: Intrinsic Procedures *************** _Arguments_: *** 7717,7723 **** STATUS (Optional) Shall be of default `INTEGER' type. _See also_: ! *Note SYMLNK::, *Note UNLINK::  File: gfortran.info, Node: LLE, Next: LLT, Prev: LINK, Up: Intrinsic Procedures --- 7717,7723 ---- STATUS (Optional) Shall be of default `INTEGER' type. _See also_: ! *note SYMLNK::, *note UNLINK::  File: gfortran.info, Node: LLE, Next: LLT, Prev: LINK, Up: Intrinsic Procedures *************** _Return value_: *** 7757,7763 **** otherwise, based on the ASCII ordering. _See also_: ! *Note LGE::, *Note LGT::, *Note LLT::  File: gfortran.info, Node: LLT, Next: LNBLNK, Prev: LLE, Up: Intrinsic Procedures --- 7757,7763 ---- otherwise, based on the ASCII ordering. _See also_: ! *note LGE::, *note LGT::, *note LLT::  File: gfortran.info, Node: LLT, Next: LNBLNK, Prev: LLE, Up: Intrinsic Procedures *************** _Return value_: *** 7796,7802 **** otherwise, based on the ASCII ordering. _See also_: ! *Note LGE::, *Note LGT::, *Note LLE::  File: gfortran.info, Node: LNBLNK, Next: LOC, Prev: LLT, Up: Intrinsic Procedures --- 7796,7802 ---- otherwise, based on the ASCII ordering. _See also_: ! *note LGE::, *note LGT::, *note LLE::  File: gfortran.info, Node: LNBLNK, Next: LOC, Prev: LLT, Up: Intrinsic Procedures *************** _Return value_: *** 7826,7832 **** The return value is of `INTEGER(kind=4)' type. _See also_: ! *Note INDEX intrinsic::, *Note LEN_TRIM::  File: gfortran.info, Node: LOC, Next: LOG, Prev: LNBLNK, Up: Intrinsic Procedures --- 7826,7832 ---- The return value is of `INTEGER(kind=4)' type. _See also_: ! *note INDEX intrinsic::, *note LEN_TRIM::  File: gfortran.info, Node: LOC, Next: LOG, Prev: LNBLNK, Up: Intrinsic Procedures *************** _Syntax_: *** 7962,7969 **** _Arguments_: L The type shall be `LOGICAL(*)'. KIND (Optional) An `INTEGER(*)' initialization ! expression indicating the ! kind parameter of the result. _Return value_: The return value is a `LOGICAL' value equal to L, with a kind --- 7962,7969 ---- _Arguments_: L The type shall be `LOGICAL(*)'. KIND (Optional) An `INTEGER(*)' initialization ! expression indicating the kind ! parameter of the result. _Return value_: The return value is a `LOGICAL' value equal to L, with a kind *************** _Return value_: *** 7971,7977 **** not given. _See also_: ! *Note INT::, *Note REAL::, *Note CMPLX::  File: gfortran.info, Node: LONG, Next: LSHIFT, Prev: LOGICAL, Up: Intrinsic Procedures --- 7971,7977 ---- not given. _See also_: ! *note INT::, *note REAL::, *note CMPLX::  File: gfortran.info, Node: LONG, Next: LSHIFT, Prev: LOGICAL, Up: Intrinsic Procedures *************** _Return value_: *** 8002,8008 **** The return value is a `INTEGER(4)' variable. _See also_: ! *Note INT::, *Note INT2::, *Note INT8::  File: gfortran.info, Node: LSHIFT, Next: LSTAT, Prev: LONG, Up: Intrinsic Procedures --- 8002,8008 ---- The return value is a `INTEGER(4)' variable. _See also_: ! *note INT::, *note INT2::, *note INT8::  File: gfortran.info, Node: LSHIFT, Next: LSTAT, Prev: LONG, Up: Intrinsic Procedures *************** _Return value_: *** 8037,8043 **** The return value is of type `INTEGER(*)' and of the same kind as I. _See also_: ! *Note ISHFT::, *Note ISHFTC::, *Note RSHIFT::  --- 8037,8043 ---- The return value is of type `INTEGER(*)' and of the same kind as I. _See also_: ! *note ISHFT::, *note ISHFTC::, *note RSHIFT::  *************** File: gfortran.info, Node: LSTAT, Next *** 8047,8057 **** ================================ _Description_: ! `LSTAT' is identical to *Note STAT::, except that if path is a symbolic link, then the link itself is statted, not the file that it refers to. ! The elements in `BUFF' are the same as described by *Note STAT::. This intrinsic is provided in both subroutine and function forms; however, only one form can be used in any given program unit. --- 8047,8057 ---- ================================ _Description_: ! `LSTAT' is identical to *note STAT::, except that if path is a symbolic link, then the link itself is statted, not the file that it refers to. ! The elements in `BUFF' are the same as described by *note STAT::. This intrinsic is provided in both subroutine and function forms; however, only one form can be used in any given program unit. *************** _Arguments_: *** 8074,8083 **** and a system specific error code otherwise. _Example_: ! See *Note STAT:: for an example. _See also_: ! To stat an open file: *Note FSTAT::, to stat a file: *Note STAT::  File: gfortran.info, Node: LTIME, Next: MALLOC, Prev: LSTAT, Up: Intrinsic Procedures --- 8074,8083 ---- and a system specific error code otherwise. _Example_: ! See *note STAT:: for an example. _See also_: ! To stat an open file: *note FSTAT::, to stat a file: *note STAT::  File: gfortran.info, Node: LTIME, Next: MALLOC, Prev: LSTAT, Up: Intrinsic Procedures *************** _Return value_: *** 8130,8136 **** not available. _See also_: ! *Note CTIME::, *Note GMTIME::, *Note TIME::, *Note TIME8::  --- 8130,8136 ---- not available. _See also_: ! *note CTIME::, *note GMTIME::, *note TIME::, *note TIME8::  *************** _Example_: *** 8190,8196 **** end program test_malloc _See also_: ! *Note FREE::  File: gfortran.info, Node: MATMUL, Next: MAX, Prev: MALLOC, Up: Intrinsic Procedures --- 8190,8196 ---- end program test_malloc _See also_: ! *note FREE::  File: gfortran.info, Node: MATMUL, Next: MAX, Prev: MALLOC, Up: Intrinsic Procedures *************** _Syntax_: *** 8213,8227 **** _Arguments_: MATRIX_A An array of `INTEGER(*)', `REAL(*)', `COMPLEX(*)', or ! `LOGICAL(*)' type, with a rank of one or two. MATRIX_B An array of `INTEGER(*)', `REAL(*)', or `COMPLEX(*)' type if ! MATRIX_A is of a numeric type; otherwise, ! an array of `LOGICAL(*)' type. The ! rank shall be one or two, and the first (or ! only) dimension of MATRIX_B shall be ! equal to the last (or only) ! dimension of MATRIX_A. _Return value_: The matrix product of MATRIX_A and MATRIX_B. The type and kind of --- 8213,8228 ---- _Arguments_: MATRIX_A An array of `INTEGER(*)', `REAL(*)', `COMPLEX(*)', or ! `LOGICAL(*)' type, with a rank of ! one or two. MATRIX_B An array of `INTEGER(*)', `REAL(*)', or `COMPLEX(*)' type if ! MATRIX_A is of a numeric type; ! otherwise, an array of `LOGICAL(*)' ! type. The rank shall be one or two, and the ! first (or only) dimension of MATRIX_B ! shall be equal to the last (or only) ! dimension of MATRIX_A. _Return value_: The matrix product of MATRIX_A and MATRIX_B. The type and kind of *************** _Arguments_: *** 8253,8260 **** `REAL(*)'. A2, A3, An expression of the same type and kind ... as A1. (As a GNU ! extension, arguments of different ! kinds are permitted.) _Return value_: The return value corresponds to the maximum value among the --- 8254,8262 ---- `REAL(*)'. A2, A3, An expression of the same type and kind ... as A1. (As a GNU ! extension, arguments ! of different kinds are ! permitted.) _Return value_: The return value corresponds to the maximum value among the *************** _Specific names_: *** 8273,8279 **** X' _See also_: ! *Note MAXLOC:: *Note MAXVAL::, *Note MIN::  --- 8275,8281 ---- X' _See also_: ! *note MAXLOC:: *note MAXVAL::, *note MIN::  *************** _Arguments_: *** 8344,8352 **** ARRAY Shall be an array of type `INTEGER(*)', `REAL(*)', or `CHARACTER(*)'. DIM (Optional) Shall be a scalar of type ! `INTEGER(*)', with a value ! between one and the rank of ! ARRAY, inclusive. It may not be an optional dummy argument. MASK Shall be an array of type `LOGICAL(*)', and conformable with ARRAY. --- 8346,8354 ---- ARRAY Shall be an array of type `INTEGER(*)', `REAL(*)', or `CHARACTER(*)'. DIM (Optional) Shall be a scalar of type ! `INTEGER(*)', with a value between ! one and the rank of ARRAY, ! inclusive. It may not be an optional dummy argument. MASK Shall be an array of type `LOGICAL(*)', and conformable with ARRAY. *************** _Return value_: *** 8360,8366 **** scalar. In all cases, the result is of default `INTEGER' type. _See also_: ! *Note MAX::, *Note MAXVAL::  --- 8362,8368 ---- scalar. In all cases, the result is of default `INTEGER' type. _See also_: ! *note MAX::, *note MAXVAL::  *************** _Arguments_: *** 8393,8401 **** ARRAY Shall be an array of type `INTEGER(*)', `REAL(*)', or `CHARACTER(*)'. DIM (Optional) Shall be a scalar of type ! `INTEGER(*)', with a value ! between one and the rank of ! ARRAY, inclusive. It may not be an optional dummy argument. MASK Shall be an array of type `LOGICAL(*)', and conformable with ARRAY. --- 8395,8403 ---- ARRAY Shall be an array of type `INTEGER(*)', `REAL(*)', or `CHARACTER(*)'. DIM (Optional) Shall be a scalar of type ! `INTEGER(*)', with a value between ! one and the rank of ARRAY, ! inclusive. It may not be an optional dummy argument. MASK Shall be an array of type `LOGICAL(*)', and conformable with ARRAY. *************** _Return value_: *** 8408,8414 **** is of the same type and kind as ARRAY. _See also_: ! *Note MAX::, *Note MAXLOC::  File: gfortran.info, Node: MCLOCK, Next: MCLOCK8, Prev: MAXVAL, Up: Intrinsic Procedures --- 8410,8416 ---- is of the same type and kind as ARRAY. _See also_: ! *note MAX::, *note MAXLOC::  File: gfortran.info, Node: MCLOCK, Next: MCLOCK8, Prev: MAXVAL, Up: Intrinsic Procedures *************** _Return value_: *** 8441,8448 **** the system does not support `clock(3)'. _See also_: ! *Note CTIME::, *Note GMTIME::, *Note LTIME::, *Note MCLOCK::, ! *Note TIME::  --- 8443,8450 ---- the system does not support `clock(3)'. _See also_: ! *note CTIME::, *note GMTIME::, *note LTIME::, *note MCLOCK::, ! *note TIME::  *************** _Return value_: *** 8479,8486 **** the system does not support `clock(3)'. _See also_: ! *Note CTIME::, *Note GMTIME::, *Note LTIME::, *Note MCLOCK::, ! *Note TIME8::  --- 8481,8488 ---- the system does not support `clock(3)'. _See also_: ! *note CTIME::, *note GMTIME::, *note LTIME::, *note MCLOCK::, ! *note TIME8::  *************** _Arguments_: *** 8536,8543 **** `REAL(*)'. A2, A3, An expression of the same type and kind ... as A1. (As a GNU ! extension, arguments of different ! kinds are permitted.) _Return value_: The return value corresponds to the maximum value among the --- 8538,8546 ---- `REAL(*)'. A2, A3, An expression of the same type and kind ... as A1. (As a GNU ! extension, arguments ! of different kinds are ! permitted.) _Return value_: The return value corresponds to the maximum value among the *************** _Specific names_: *** 8556,8562 **** X' _See also_: ! *Note MAX::, *Note MINLOC::, *Note MINVAL::  File: gfortran.info, Node: MINEXPONENT, Next: MINLOC, Prev: MIN, Up: Intrinsic Procedures --- 8559,8565 ---- X' _See also_: ! *note MAX::, *note MINLOC::, *note MINVAL::  File: gfortran.info, Node: MINEXPONENT, Next: MINLOC, Prev: MIN, Up: Intrinsic Procedures *************** _Arguments_: *** 8620,8628 **** ARRAY Shall be an array of type `INTEGER(*)', `REAL(*)', or `CHARACTER(*)'. DIM (Optional) Shall be a scalar of type ! `INTEGER(*)', with a value ! between one and the rank of ! ARRAY, inclusive. It may not be an optional dummy argument. MASK Shall be an array of type `LOGICAL(*)', and conformable with ARRAY. --- 8623,8631 ---- ARRAY Shall be an array of type `INTEGER(*)', `REAL(*)', or `CHARACTER(*)'. DIM (Optional) Shall be a scalar of type ! `INTEGER(*)', with a value between ! one and the rank of ARRAY, ! inclusive. It may not be an optional dummy argument. MASK Shall be an array of type `LOGICAL(*)', and conformable with ARRAY. *************** _Return value_: *** 8636,8642 **** scalar. In all cases, the result is of default `INTEGER' type. _See also_: ! *Note MIN::, *Note MINVAL::  --- 8639,8645 ---- scalar. In all cases, the result is of default `INTEGER' type. _See also_: ! *note MIN::, *note MINVAL::  *************** _Arguments_: *** 8669,8677 **** ARRAY Shall be an array of type `INTEGER(*)', `REAL(*)', or `CHARACTER(*)'. DIM (Optional) Shall be a scalar of type ! `INTEGER(*)', with a value ! between one and the rank of ! ARRAY, inclusive. It may not be an optional dummy argument. MASK Shall be an array of type `LOGICAL(*)', and conformable with ARRAY. --- 8672,8680 ---- ARRAY Shall be an array of type `INTEGER(*)', `REAL(*)', or `CHARACTER(*)'. DIM (Optional) Shall be a scalar of type ! `INTEGER(*)', with a value between ! one and the rank of ARRAY, ! inclusive. It may not be an optional dummy argument. MASK Shall be an array of type `LOGICAL(*)', and conformable with ARRAY. *************** _Return value_: *** 8684,8690 **** is of the same type and kind as ARRAY. _See also_: ! *Note MIN::, *Note MINLOC::  --- 8687,8693 ---- is of the same type and kind as ARRAY. _See also_: ! *note MIN::, *note MINLOC::  *************** _Arguments_: *** 8855,8862 **** TOPOS The type shall be `INTEGER(*)'. _See also_: ! *Note IBCLR::, *Note IBSET::, *Note IBITS::, *Note IAND::, *Note ! IOR::, *Note IEOR::  File: gfortran.info, Node: NEAREST, Next: NEW_LINE, Prev: MVBITS, Up: Intrinsic Procedures --- 8858,8865 ---- TOPOS The type shall be `INTEGER(*)'. _See also_: ! *note IBCLR::, *note IBSET::, *note IBITS::, *note IAND::, *note ! IOR::, *note IEOR::  File: gfortran.info, Node: NEAREST, Next: NEW_LINE, Prev: MVBITS, Up: Intrinsic Procedures *************** _Specific names_: *** 8968,8974 **** `IDNINT(X)' `REAL(8)' F95 and later _See also_: ! *Note CEILING::, *Note FLOOR::  --- 8971,8977 ---- `IDNINT(X)' `REAL(8)' F95 and later _See also_: ! *note CEILING::, *note FLOOR::  *************** _Return value_: *** 8996,9003 **** The return type is `INTEGER(*)', of the same kind as the argument. _See also_: ! *Note IAND::, *Note IEOR::, *Note IOR::, *Note IBITS::, *Note ! IBSET::, *Note IBCLR::  --- 8999,9006 ---- The return type is `INTEGER(*)', of the same kind as the argument. _See also_: ! *note IAND::, *note IEOR::, *note IOR::, *note IBITS::, *note ! IBSET::, *note IBCLR::  *************** _Example_: *** 9035,9041 **** REAL, POINTER, DIMENSION(:) :: VEC => NULL () _See also_: ! *Note ASSOCIATED::  File: gfortran.info, Node: OR, Next: PACK, Prev: NULL, Up: Intrinsic Procedures --- 9038,9044 ---- REAL, POINTER, DIMENSION(:) :: VEC => NULL () _See also_: ! *note ASSOCIATED::  File: gfortran.info, Node: OR, Next: PACK, Prev: NULL, Up: Intrinsic Procedures *************** _Description_: *** 9048,9054 **** This intrinsic routine is provided for backwards compatibility with GNU Fortran 77. For integer arguments, programmers should consider ! the use of the *Note IOR:: intrinsic defined by the Fortran standard. _Standard_: --- 9051,9057 ---- This intrinsic routine is provided for backwards compatibility with GNU Fortran 77. For integer arguments, programmers should consider ! the use of the *note IOR:: intrinsic defined by the Fortran standard. _Standard_: *************** _Example_: *** 9081,9087 **** END PROGRAM _See also_: ! F95 elemental function: *Note IOR::  File: gfortran.info, Node: PACK, Next: PERROR, Prev: OR, Up: Intrinsic Procedures --- 9084,9090 ---- END PROGRAM _See also_: ! F95 elemental function: *note IOR::  File: gfortran.info, Node: PACK, Next: PERROR, Prev: OR, Up: Intrinsic Procedures *************** _Example_: *** 9140,9146 **** END PROGRAM _See also_: ! *Note UNPACK::  File: gfortran.info, Node: PERROR, Next: PRECISION, Prev: PACK, Up: Intrinsic Procedures --- 9143,9149 ---- END PROGRAM _See also_: ! *note UNPACK::  File: gfortran.info, Node: PERROR, Next: PRECISION, Prev: PACK, Up: Intrinsic Procedures *************** _Arguments_: *** 9166,9172 **** STRING A scalar of default `CHARACTER' type. _See also_: ! *Note IERRNO::  File: gfortran.info, Node: PRECISION, Next: PRESENT, Prev: PERROR, Up: Intrinsic Procedures --- 9169,9175 ---- STRING A scalar of default `CHARACTER' type. _See also_: ! *note IERRNO::  File: gfortran.info, Node: PRECISION, Next: PRESENT, Prev: PERROR, Up: Intrinsic Procedures *************** _Example_: *** 9288,9294 **** END PROGRAM _See also_: ! *Note SUM::  File: gfortran.info, Node: RADIX, Next: RANDOM_NUMBER, Prev: PRODUCT, Up: Intrinsic Procedures --- 9291,9297 ---- END PROGRAM _See also_: ! *note SUM::  File: gfortran.info, Node: RADIX, Next: RANDOM_NUMBER, Prev: PRODUCT, Up: Intrinsic Procedures *************** File: gfortran.info, Node: RAN, Next: *** 9330,9336 **** _Description_: For compatibility with HP FORTRAN 77/iX, the `RAN' intrinsic is ! provided as an alias for `RAND'. See *Note RAND:: for complete documentation. _Standard_: --- 9333,9339 ---- _Description_: For compatibility with HP FORTRAN 77/iX, the `RAN' intrinsic is ! provided as an alias for `RAND'. See *note RAND:: for complete documentation. _Standard_: *************** _Class_: *** 9340,9346 **** Function _See also_: ! *Note RAND::, *Note RANDOM_NUMBER::  File: gfortran.info, Node: RAND, Next: RANGE, Prev: RANDOM_SEED, Up: Intrinsic Procedures --- 9343,9349 ---- Function _See also_: ! *note RAND::, *note RANDOM_NUMBER::  File: gfortran.info, Node: RAND, Next: RANGE, Prev: RANDOM_SEED, Up: Intrinsic Procedures *************** _Description_: *** 9357,9363 **** This intrinsic routine is provided for backwards compatibility with GNU Fortran 77. It implements a simple modulo generator as provided ! by `g77'. For new code, one should consider the use of *Note RANDOM_NUMBER:: as it implements a superior algorithm. _Standard_: --- 9360,9366 ---- This intrinsic routine is provided for backwards compatibility with GNU Fortran 77. It implements a simple modulo generator as provided ! by `g77'. For new code, one should consider the use of *note RANDOM_NUMBER:: as it implements a superior algorithm. _Standard_: *************** _Example_: *** 9385,9391 **** end program test_rand _See also_: ! *Note SRAND::, *Note RANDOM_NUMBER::  --- 9388,9394 ---- end program test_rand _See also_: ! *note SRAND::, *note RANDOM_NUMBER::  *************** _Example_: *** 9438,9444 **** end program _See also_: ! *Note RANDOM_SEED::  File: gfortran.info, Node: RANDOM_SEED, Next: RAND, Prev: RANDOM_NUMBER, Up: Intrinsic Procedures --- 9441,9447 ---- end program _See also_: ! *note RANDOM_SEED::  File: gfortran.info, Node: RANDOM_SEED, Next: RAND, Prev: RANDOM_NUMBER, Up: Intrinsic Procedures *************** _Example_: *** 9496,9502 **** END SUBROUTINE _See also_: ! *Note RANDOM_NUMBER::  File: gfortran.info, Node: RANGE, Next: RAN, Prev: RAND, Up: Intrinsic Procedures --- 9499,9505 ---- END SUBROUTINE _See also_: ! *note RANDOM_NUMBER::  File: gfortran.info, Node: RANGE, Next: RAN, Prev: RAND, Up: Intrinsic Procedures *************** _Arguments_: *** 9552,9559 **** X Shall be `INTEGER(*)', `REAL(*)', or `COMPLEX(*)'. KIND (Optional) An `INTEGER(*)' initialization ! expression indicating the ! kind parameter of the result. _Return value_: These functions return a `REAL(*)' variable or array under the --- 9555,9562 ---- X Shall be `INTEGER(*)', `REAL(*)', or `COMPLEX(*)'. KIND (Optional) An `INTEGER(*)' initialization ! expression indicating the kind ! parameter of the result. _Return value_: These functions return a `REAL(*)' variable or array under the *************** _Example_: *** 9578,9584 **** end program test_real _See also_: ! *Note DBLE::, *Note DFLOAT::, *Note FLOAT::  --- 9581,9587 ---- end program test_real _See also_: ! *note DBLE::, *note DFLOAT::, *note FLOAT::  *************** _Arguments_: *** 9613,9619 **** STATUS (Optional) Shall be of default `INTEGER' type. _See also_: ! *Note LINK::  --- 9616,9622 ---- STATUS (Optional) Shall be of default `INTEGER' type. _See also_: ! *note LINK::  *************** _Example_: *** 9691,9697 **** END PROGRAM _See also_: ! *Note SHAPE::  File: gfortran.info, Node: RRSPACING, Next: RSHIFT, Prev: RESHAPE, Up: Intrinsic Procedures --- 9694,9700 ---- END PROGRAM _See also_: ! *note SHAPE::  File: gfortran.info, Node: RRSPACING, Next: RSHIFT, Prev: RESHAPE, Up: Intrinsic Procedures *************** _Return value_: *** 9721,9727 **** FLOAT(RADIX(X))**DIGITS(X)'. _See also_: ! *Note SPACING::  File: gfortran.info, Node: RSHIFT, Next: SCALE, Prev: RRSPACING, Up: Intrinsic Procedures --- 9724,9730 ---- FLOAT(RADIX(X))**DIGITS(X)'. _See also_: ! *note SPACING::  File: gfortran.info, Node: RSHIFT, Next: SCALE, Prev: RRSPACING, Up: Intrinsic Procedures *************** _Return value_: *** 9756,9762 **** The return value is of type `INTEGER(*)' and of the same kind as I. _See also_: ! *Note ISHFT::, *Note ISHFTC::, *Note LSHIFT::  --- 9759,9765 ---- The return value is of type `INTEGER(*)' and of the same kind as I. _See also_: ! *note ISHFT::, *note ISHFTC::, *note LSHIFT::  *************** _Example_: *** 9836,9842 **** END PROGRAM _See also_: ! *Note INDEX intrinsic::, *Note VERIFY::  File: gfortran.info, Node: SECNDS, Next: SECOND, Prev: SCAN, Up: Intrinsic Procedures --- 9839,9845 ---- END PROGRAM _See also_: ! *note INDEX intrinsic::, *note VERIFY::  File: gfortran.info, Node: SECNDS, Next: SECOND, Prev: SCAN, Up: Intrinsic Procedures *************** _Return value_: *** 9911,9917 **** seconds. _See also_: ! *Note CPU_TIME::  --- 9914,9920 ---- seconds. _See also_: ! *note CPU_TIME::  *************** _Example_: *** 10081,10087 **** END PROGRAM _See also_: ! *Note RESHAPE::, *Note SIZE::  File: gfortran.info, Node: SIGN, Next: SIGNAL, Prev: SHAPE, Up: Intrinsic Procedures --- 10084,10090 ---- END PROGRAM _See also_: ! *note RESHAPE::, *note SIZE::  File: gfortran.info, Node: SIGN, Next: SIGNAL, Prev: SHAPE, Up: Intrinsic Procedures *************** _Specific names_: *** 10214,10220 **** X' _See also_: ! *Note ASIN::  File: gfortran.info, Node: SINH, Next: SIZE, Prev: SIN, Up: Intrinsic Procedures --- 10217,10223 ---- X' _See also_: ! *note ASIN::  File: gfortran.info, Node: SINH, Next: SIZE, Prev: SIN, Up: Intrinsic Procedures *************** _Specific names_: *** 10251,10257 **** `DSINH(X)' `REAL(8) X' `REAL(8)' F95 and later _See also_: ! *Note ASINH::  File: gfortran.info, Node: SIZE, Next: SIZEOF, Prev: SINH, Up: Intrinsic Procedures --- 10254,10260 ---- `DSINH(X)' `REAL(8) X' `REAL(8)' F95 and later _See also_: ! *note ASINH::  File: gfortran.info, Node: SIZE, Next: SIZEOF, Prev: SINH, Up: Intrinsic Procedures *************** _Example_: *** 10293,10299 **** END PROGRAM _See also_: ! *Note SHAPE::, *Note RESHAPE::  File: gfortran.info, Node: SIZEOF, Next: SLEEP, Prev: SIZE, Up: Intrinsic Procedures --- 10296,10302 ---- END PROGRAM _See also_: ! *note SHAPE::, *note RESHAPE::  File: gfortran.info, Node: SIZEOF, Next: SLEEP, Prev: SIZE, Up: Intrinsic Procedures *************** _Return value_: *** 10389,10395 **** The return value is of type default `REAL'. _See also_: ! *Note DBLE::  File: gfortran.info, Node: SPACING, Next: SPREAD, Prev: SNGL, Up: Intrinsic Procedures --- 10392,10398 ---- The return value is of type default `REAL'. _See also_: ! *note DBLE::  File: gfortran.info, Node: SPACING, Next: SPREAD, Prev: SNGL, Up: Intrinsic Procedures *************** _Example_: *** 10426,10432 **** END PROGRAM _See also_: ! *Note RRSPACING::  File: gfortran.info, Node: SPREAD, Next: SQRT, Prev: SPACING, Up: Intrinsic Procedures --- 10429,10435 ---- END PROGRAM _See also_: ! *note RRSPACING::  File: gfortran.info, Node: SPREAD, Next: SQRT, Prev: SPACING, Up: Intrinsic Procedures *************** _Example_: *** 10467,10473 **** END PROGRAM _See also_: ! *Note UNPACK::  File: gfortran.info, Node: SQRT, Next: SRAND, Prev: SPREAD, Up: Intrinsic Procedures --- 10470,10476 ---- END PROGRAM _See also_: ! *note UNPACK::  File: gfortran.info, Node: SQRT, Next: SRAND, Prev: SPREAD, Up: Intrinsic Procedures *************** _Notes_: *** 10550,10556 **** hand) access two independent pseudo-random number generators. _See also_: ! *Note RAND::, *Note RANDOM_SEED::, *Note RANDOM_NUMBER::  --- 10553,10559 ---- hand) access two independent pseudo-random number generators. _See also_: ! *note RAND::, *note RANDOM_SEED::, *note RANDOM_NUMBER::  *************** _Example_: *** 10629,10635 **** END PROGRAM _See also_: ! To stat an open file: *Note FSTAT::, to stat a link: *Note LSTAT::  File: gfortran.info, Node: SUM, Next: SYMLNK, Prev: STAT, Up: Intrinsic Procedures --- 10632,10638 ---- END PROGRAM _See also_: ! To stat an open file: *note FSTAT::, to stat a link: *note LSTAT::  File: gfortran.info, Node: SUM, Next: SYMLNK, Prev: STAT, Up: Intrinsic Procedures *************** _Example_: *** 10676,10682 **** END PROGRAM _See also_: ! *Note PRODUCT::  File: gfortran.info, Node: SYMLNK, Next: SYSTEM, Prev: SUM, Up: Intrinsic Procedures --- 10679,10685 ---- END PROGRAM _See also_: ! *note PRODUCT::  File: gfortran.info, Node: SYMLNK, Next: SYSTEM, Prev: SUM, Up: Intrinsic Procedures *************** _Arguments_: *** 10711,10717 **** STATUS (Optional) Shall be of default `INTEGER' type. _See also_: ! *Note LINK::, *Note UNLINK::  --- 10714,10720 ---- STATUS (Optional) Shall be of default `INTEGER' type. _See also_: ! *note LINK::, *note UNLINK::  *************** _Example_: *** 10788,10794 **** END PROGRAM _See also_: ! *Note DATE_AND_TIME::, *Note CPU_TIME::  File: gfortran.info, Node: TAN, Next: TANH, Prev: SYSTEM_CLOCK, Up: Intrinsic Procedures --- 10791,10797 ---- END PROGRAM _See also_: ! *note DATE_AND_TIME::, *note CPU_TIME::  File: gfortran.info, Node: TAN, Next: TANH, Prev: SYSTEM_CLOCK, Up: Intrinsic Procedures *************** _Specific names_: *** 10826,10832 **** `DTAN(X)' `REAL(8) X' `REAL(8)' F95 and later _See also_: ! *Note ATAN::  File: gfortran.info, Node: TANH, Next: TIME, Prev: TAN, Up: Intrinsic Procedures --- 10829,10835 ---- `DTAN(X)' `REAL(8) X' `REAL(8)' F95 and later _See also_: ! *note ATAN::  File: gfortran.info, Node: TANH, Next: TIME, Prev: TAN, Up: Intrinsic Procedures *************** _Specific names_: *** 10864,10870 **** `DTANH(X)' `REAL(8) X' `REAL(8)' F95 and later _See also_: ! *Note ATANH::  File: gfortran.info, Node: TIME, Next: TIME8, Prev: TANH, Up: Intrinsic Procedures --- 10867,10873 ---- `DTANH(X)' `REAL(8) X' `REAL(8)' F95 and later _See also_: ! *note ATANH::  File: gfortran.info, Node: TIME, Next: TIME8, Prev: TANH, Up: Intrinsic Procedures *************** _Description_: *** 10883,10889 **** become, negative, or numerically less than previous values, during a single run of the compiled program. ! See *Note TIME8::, for information on a similar intrinsic that might be portable to more GNU Fortran implementations, though to fewer Fortran compilers. --- 10886,10892 ---- become, negative, or numerically less than previous values, during a single run of the compiled program. ! See *note TIME8::, for information on a similar intrinsic that might be portable to more GNU Fortran implementations, though to fewer Fortran compilers. *************** _Return value_: *** 10900,10907 **** The return value is a scalar of type `INTEGER(4)'. _See also_: ! *Note CTIME::, *Note GMTIME::, *Note LTIME::, *Note MCLOCK::, ! *Note TIME8::  --- 10903,10910 ---- The return value is a scalar of type `INTEGER(4)'. _See also_: ! *note CTIME::, *note GMTIME::, *note LTIME::, *note MCLOCK::, ! *note TIME8::  *************** _Return value_: *** 10936,10943 **** The return value is a scalar of type `INTEGER(8)'. _See also_: ! *Note CTIME::, *Note GMTIME::, *Note LTIME::, *Note MCLOCK8::, ! *Note TIME::  --- 10939,10946 ---- The return value is a scalar of type `INTEGER(8)'. _See also_: ! *note CTIME::, *note GMTIME::, *note LTIME::, *note MCLOCK8::, ! *note TIME::  *************** _Example_: *** 11081,11087 **** END PROGRAM _See also_: ! *Note ADJUSTL::, *Note ADJUSTR::  File: gfortran.info, Node: TTYNAM, Next: UBOUND, Prev: TRIM, Up: Intrinsic Procedures --- 11084,11090 ---- END PROGRAM _See also_: ! *note ADJUSTL::, *note ADJUSTR::  File: gfortran.info, Node: TTYNAM, Next: UBOUND, Prev: TRIM, Up: Intrinsic Procedures *************** _Example_: *** 11119,11125 **** END PROGRAM _See also_: ! *Note ISATTY::  File: gfortran.info, Node: UBOUND, Next: UMASK, Prev: TTYNAM, Up: Intrinsic Procedures --- 11122,11128 ---- END PROGRAM _See also_: ! *note ISATTY::  File: gfortran.info, Node: UBOUND, Next: UMASK, Prev: TTYNAM, Up: Intrinsic Procedures *************** _Return value_: *** 11159,11165 **** dimension. _See also_: ! *Note LBOUND::  File: gfortran.info, Node: UMASK, Next: UNLINK, Prev: UBOUND, Up: Intrinsic Procedures --- 11162,11168 ---- dimension. _See also_: ! *note LBOUND::  File: gfortran.info, Node: UMASK, Next: UNLINK, Prev: UBOUND, Up: Intrinsic Procedures *************** _Arguments_: *** 11217,11223 **** STATUS (Optional) Shall be of default `INTEGER' type. _See also_: ! *Note LINK::, *Note SYMLNK::  File: gfortran.info, Node: UNPACK, Next: VERIFY, Prev: UNLINK, Up: Intrinsic Procedures --- 11220,11226 ---- STATUS (Optional) Shall be of default `INTEGER' type. _See also_: ! *note LINK::, *note SYMLNK::  File: gfortran.info, Node: UNPACK, Next: VERIFY, Prev: UNLINK, Up: Intrinsic Procedures *************** _Example_: *** 11260,11266 **** END PROGRAM _See also_: ! *Note PACK::, *Note SPREAD::  File: gfortran.info, Node: VERIFY, Next: XOR, Prev: UNPACK, Up: Intrinsic Procedures --- 11263,11269 ---- END PROGRAM _See also_: ! *note PACK::, *note SPREAD::  File: gfortran.info, Node: VERIFY, Next: XOR, Prev: UNPACK, Up: Intrinsic Procedures *************** _Example_: *** 11307,11313 **** END PROGRAM _See also_: ! *Note SCAN::, *Note INDEX intrinsic::  File: gfortran.info, Node: XOR, Prev: VERIFY, Up: Intrinsic Procedures --- 11310,11316 ---- END PROGRAM _See also_: ! *note SCAN::, *note INDEX intrinsic::  File: gfortran.info, Node: XOR, Prev: VERIFY, Up: Intrinsic Procedures *************** _Description_: *** 11320,11326 **** This intrinsic routine is provided for backwards compatibility with GNU Fortran 77. For integer arguments, programmers should consider ! the use of the *Note IEOR:: intrinsic defined by the Fortran standard. _Standard_: --- 11323,11329 ---- This intrinsic routine is provided for backwards compatibility with GNU Fortran 77. For integer arguments, programmers should consider ! the use of the *note IEOR:: intrinsic defined by the Fortran standard. _Standard_: *************** _Example_: *** 11353,11359 **** END PROGRAM _See also_: ! F95 elemental function: *Note IEOR::  File: gfortran.info, Node: Intrinsic Modules, Next: Contributing, Prev: Intrinsic Procedures, Up: Top --- 11356,11362 ---- END PROGRAM _See also_: ! F95 elemental function: *note IEOR::  File: gfortran.info, Node: Intrinsic Modules, Next: Contributing, Prev: Intrinsic Procedures, Up: Top *************** _Standard_: *** 11479,11485 **** The OpenMP Fortran runtime library routines are provided both in a form of two Fortran 90 modules, named `OMP_LIB' and `OMP_LIB_KINDS', and in a form of a Fortran `include' file named `omp_lib.h'. The ! procedures provided by `OMP_LIB' can be found in the *Note Introduction: (libgomp)Top. manual, the named constants defined in the `OMP_LIB_KINDS' module are listed below. --- 11482,11488 ---- The OpenMP Fortran runtime library routines are provided both in a form of two Fortran 90 modules, named `OMP_LIB' and `OMP_LIB_KINDS', and in a form of a Fortran `include' file named `omp_lib.h'. The ! procedures provided by `OMP_LIB' can be found in the *note Introduction: (libgomp)Top. manual, the named constants defined in the `OMP_LIB_KINDS' module are listed below. *************** Keyword Index *** 13933,14223 ****  Tag Table: ! Node: Top2077 ! Node: Introduction3294 ! Node: About GNU Fortran4039 ! Node: GNU Fortran and GCC8097 ! Node: Preprocessing and conditional compilation10187 ! Node: GNU Fortran and G7711628 ! Node: Project Status12201 ! Node: Standards14699 ! Node: Invoking GNU Fortran15356 ! Node: Option Summary17016 ! Node: Fortran Dialect Options19910 ! Node: Error and Warning Options25653 ! Node: Debugging Options31818 ! Node: Directory Options33984 ! Node: Link Options35511 ! Node: Runtime Options36135 ! Node: Code Gen Options37838 ! Node: Environment Variables48405 ! Node: Runtime49008 ! Node: GFORTRAN_STDIN_UNIT50227 ! Node: GFORTRAN_STDOUT_UNIT50594 ! Node: GFORTRAN_STDERR_UNIT50995 ! Node: GFORTRAN_USE_STDERR51393 ! Node: GFORTRAN_TMPDIR51838 ! Node: GFORTRAN_UNBUFFERED_ALL52279 ! Node: GFORTRAN_UNBUFFERED_PRECONNECTED52802 ! Node: GFORTRAN_SHOW_LOCUS53443 ! Node: GFORTRAN_OPTIONAL_PLUS53937 ! Node: GFORTRAN_DEFAULT_RECL54412 ! Node: GFORTRAN_LIST_SEPARATOR54903 ! Node: GFORTRAN_CONVERT_UNIT55512 ! Node: GFORTRAN_ERROR_DUMPCORE58387 ! Node: GFORTRAN_ERROR_BACKTRACE58934 ! Node: Fortran 2003 status59485 ! Node: Extensions61154 ! Node: Extensions implemented in GNU Fortran61748 ! Node: Old-style kind specifications63068 ! Node: Old-style variable initialization63933 ! Node: Extensions to namelist65245 ! Node: X format descriptor without count field67241 ! Node: Commas in FORMAT specifications67768 ! Node: Missing period in FORMAT specifications68285 ! Node: I/O item lists68847 ! Node: BOZ literal constants69236 ! Node: Real array indices71805 ! Node: Unary operators72102 ! Node: Implicitly convert LOGICAL and INTEGER values72516 ! Node: Hollerith constants support73476 ! Node: Cray pointers75248 ! Node: CONVERT specifier80658 ! Node: OpenMP82660 ! Node: Argument list functions84914 ! Node: Extensions not implemented in GNU Fortran86508 ! Node: STRUCTURE and RECORD87359 ! Node: ENCODE and DECODE statements89416 ! Node: Intrinsic Procedures90734 ! Node: Introduction to Intrinsics104026 ! Node: ABORT106339 ! Node: ABS107042 ! Node: ACCESS108534 ! Node: ACHAR110423 ! Node: ACOS111363 ! Node: ACOSH112293 ! Node: ADJUSTL113266 ! Node: ADJUSTR114160 ! Node: AIMAG115060 ! Node: AINT116470 ! Node: ALARM117915 ! Node: ALL119549 ! Node: ALLOCATED121466 ! Node: AND122332 ! Node: ANINT123494 ! Node: ANY124832 ! Node: ASIN126761 ! Node: ASINH127706 ! Node: ASSOCIATED128659 ! Node: ATAN131484 ! Node: ATAN2132318 ! Node: ATANH133597 ! Node: BESJ0134579 ! Node: BESJ1135493 ! Node: BESJN136413 ! Node: BESY0137504 ! Node: BESY1138362 ! Node: BESYN139220 ! Node: BIT_SIZE140365 ! Node: BTEST141114 ! Node: C_ASSOCIATED141962 ! Node: C_FUNLOC143149 ! Node: C_F_PROCPOINTER144511 ! Node: C_F_POINTER146142 ! Node: C_LOC147622 ! Node: CEILING148741 ! Node: CHAR149702 ! Node: CHDIR150789 ! Node: CHMOD152009 ! Node: CMPLX153772 ! Node: COMMAND_ARGUMENT_COUNT155311 ! Node: COMPLEX156201 ! Node: CONJG157356 ! Node: COS158365 ! Node: COSH159578 ! Node: COUNT160396 ! Node: CPU_TIME162223 ! Node: CSHIFT163576 ! Node: CTIME165225 ! Node: DATE_AND_TIME166448 ! Node: DBLE168811 ! Node: DCMPLX169651 ! Node: DFLOAT170890 ! Node: DIGITS171587 ! Node: DIM172531 ! Node: DOT_PRODUCT173667 ! Node: DPROD175097 ! Node: DREAL175816 ! Node: DTIME176480 ! Node: EOSHIFT179286 ! Node: EPSILON181351 ! Node: ERF182047 ! Node: ERFC182844 ! Node: ETIME183659 ! Node: EXIT185883 ! Node: EXP186742 ! Node: EXPONENT187839 ! Node: FDATE188585 ! Node: FLOAT189805 ! Node: FGET190515 ! Node: FGETC192308 ! Node: FLOOR194056 ! Node: FLUSH194998 ! Node: FNUM195636 ! Node: FPUT196358 ! Node: FPUTC197939 ! Node: FRACTION199659 ! Node: FREE200553 ! Node: FSEEK201390 ! Node: FSTAT203684 ! Node: FTELL204748 ! Node: GAMMA205726 ! Node: GERROR206755 ! Node: GETARG207463 ! Node: GET_COMMAND209138 ! Node: GET_COMMAND_ARGUMENT210018 ! Node: GETCWD211414 ! Node: GETENV212351 ! Node: GET_ENVIRONMENT_VARIABLE213515 ! Node: GETGID214449 ! Node: GETLOG214984 ! Node: GETPID215813 ! Node: GETUID216541 ! Node: GMTIME217055 ! Node: HOSTNM218610 ! Node: HUGE219548 ! Node: IACHAR220261 ! Node: IAND221409 ! Node: IARGC222397 ! Node: IBCLR223413 ! Node: IBITS224076 ! Node: IBSET224996 ! Node: ICHAR225654 ! Node: IDATE227607 ! Node: IEOR228625 ! Node: IERRNO229504 ! Node: INDEX intrinsic230059 ! Node: INT231385 ! Node: INT2232909 ! Node: INT8233689 ! Node: IOR234416 ! Node: IRAND235269 ! Node: IS_IOSTAT_END236624 ! Node: IS_IOSTAT_EOR237710 ! Node: ISATTY238826 ! Node: ISHFT239613 ! Node: ISHFTC240595 ! Node: ISNAN241816 ! Node: ITIME242564 ! Node: KILL243580 ! Node: KIND244495 ! Node: LBOUND245333 ! Node: LEN246617 ! Node: LEN_TRIM247683 ! Node: LGAMMA248642 ! Node: LGE249704 ! Node: LGT251007 ! Node: LINK252277 ! Node: LLE253312 ! Node: LLT254609 ! Node: LNBLNK255872 ! Node: LOC256651 ! Node: LOG257382 ! Node: LOG10258584 ! Node: LOGICAL259450 ! Node: LONG260277 ! Node: LSHIFT261048 ! Node: LSTAT262011 ! Node: LTIME263172 ! Node: MALLOC264651 ! Node: MATMUL266315 ! Node: MAX267504 ! Node: MAXEXPONENT269009 ! Node: MAXLOC269818 ! Node: MAXVAL271951 ! Node: MCLOCK273743 ! Node: MCLOCK8274746 ! Node: MERGE275960 ! Node: MIN276721 ! Node: MINEXPONENT278223 ! Node: MINLOC278846 ! Node: MINVAL280979 ! Node: MOD282745 ! Node: MODULO284122 ! Node: MOVE_ALLOC285329 ! Node: MVBITS286387 ! Node: NEAREST287470 ! Node: NEW_LINE288586 ! Node: NINT289371 ! Node: NOT290391 ! Node: NULL290973 ! Node: OR291857 ! Node: PACK293000 ! Node: PERROR294985 ! Node: PRECISION295575 ! Node: PRESENT296394 ! Node: PRODUCT297493 ! Node: RADIX299020 ! Node: RAN299790 ! Node: RAND300246 ! Node: RANDOM_NUMBER301581 ! Node: RANDOM_SEED303311 ! Node: RANGE305187 ! Node: REAL305807 ! Node: RENAME307308 ! Node: REPEAT308327 ! Node: RESHAPE309052 ! Node: RRSPACING310514 ! Node: RSHIFT311200 ! Node: SCALE312171 ! Node: SCAN312938 ! Node: SECNDS314467 ! Node: SECOND315555 ! Node: SELECTED_INT_KIND316430 ! Node: SELECTED_REAL_KIND317586 ! Node: SET_EXPONENT319525 ! Node: SHAPE320514 ! Node: SIGN321620 ! Node: SIGNAL322696 ! Node: SIN324193 ! Node: SINH325234 ! Node: SIZE325991 ! Node: SIZEOF327270 ! Node: SLEEP328529 ! Node: SNGL329086 ! Node: SPACING329750 ! Node: SPREAD330758 ! Node: SQRT331896 ! Node: SRAND333080 ! Node: STAT334239 ! Node: SUM337354 ! Node: SYMLNK338825 ! Node: SYSTEM339957 ! Node: SYSTEM_CLOCK340905 ! Node: TAN342242 ! Node: TANH343023 ! Node: TIME343835 ! Node: TIME8344939 ! Node: TINY346076 ! Node: TRANSFER346671 ! Node: TRANSPOSE348696 ! Node: TRIM349380 ! Node: TTYNAM350236 ! Node: UBOUND351157 ! Node: UMASK352498 ! Node: UNLINK353086 ! Node: UNPACK354063 ! Node: VERIFY355343 ! Node: XOR357040 ! Node: Intrinsic Modules358212 ! Node: Contributing363038 ! Node: Contributors363890 ! Node: Projects365513 ! Node: Proposed Extensions366316 ! Node: Copying368367 ! Node: GNU Free Documentation License405931 ! Node: Funding428343 ! Node: Option Index430868 ! Node: Keyword Index438469  End Tag Table --- 13936,14226 ----  Tag Table: ! Node: Top2075 ! Node: Introduction3292 ! Node: About GNU Fortran4037 ! Node: GNU Fortran and GCC8095 ! Node: Preprocessing and conditional compilation10185 ! Node: GNU Fortran and G7711626 ! Node: Project Status12199 ! Node: Standards14697 ! Node: Invoking GNU Fortran15354 ! Node: Option Summary17014 ! Node: Fortran Dialect Options19908 ! Node: Error and Warning Options25651 ! Node: Debugging Options31816 ! Node: Directory Options33982 ! Node: Link Options35509 ! Node: Runtime Options36133 ! Node: Code Gen Options37836 ! Node: Environment Variables48403 ! Node: Runtime49006 ! Node: GFORTRAN_STDIN_UNIT50225 ! Node: GFORTRAN_STDOUT_UNIT50592 ! Node: GFORTRAN_STDERR_UNIT50993 ! Node: GFORTRAN_USE_STDERR51391 ! Node: GFORTRAN_TMPDIR51836 ! Node: GFORTRAN_UNBUFFERED_ALL52277 ! Node: GFORTRAN_UNBUFFERED_PRECONNECTED52800 ! Node: GFORTRAN_SHOW_LOCUS53441 ! Node: GFORTRAN_OPTIONAL_PLUS53935 ! Node: GFORTRAN_DEFAULT_RECL54410 ! Node: GFORTRAN_LIST_SEPARATOR54901 ! Node: GFORTRAN_CONVERT_UNIT55510 ! Node: GFORTRAN_ERROR_DUMPCORE58385 ! Node: GFORTRAN_ERROR_BACKTRACE58932 ! Node: Fortran 2003 status59483 ! Node: Extensions61152 ! Node: Extensions implemented in GNU Fortran61746 ! Node: Old-style kind specifications63066 ! Node: Old-style variable initialization63931 ! Node: Extensions to namelist65243 ! Node: X format descriptor without count field67239 ! Node: Commas in FORMAT specifications67766 ! Node: Missing period in FORMAT specifications68283 ! Node: I/O item lists68845 ! Node: BOZ literal constants69234 ! Node: Real array indices71803 ! Node: Unary operators72100 ! Node: Implicitly convert LOGICAL and INTEGER values72514 ! Node: Hollerith constants support73474 ! Node: Cray pointers75246 ! Node: CONVERT specifier80656 ! Node: OpenMP82658 ! Node: Argument list functions84912 ! Node: Extensions not implemented in GNU Fortran86506 ! Node: STRUCTURE and RECORD87357 ! Node: ENCODE and DECODE statements89414 ! Node: Intrinsic Procedures90732 ! Node: Introduction to Intrinsics104024 ! Node: ABORT106337 ! Node: ABS107040 ! Node: ACCESS108532 ! Node: ACHAR110421 ! Node: ACOS111361 ! Node: ACOSH112291 ! Node: ADJUSTL113264 ! Node: ADJUSTR114158 ! Node: AIMAG115058 ! Node: AINT116468 ! Node: ALARM117913 ! Node: ALL119547 ! Node: ALLOCATED121464 ! Node: AND122330 ! Node: ANINT123492 ! Node: ANY124830 ! Node: ASIN126759 ! Node: ASINH127704 ! Node: ASSOCIATED128657 ! Node: ATAN131482 ! Node: ATAN2132316 ! Node: ATANH133595 ! Node: BESJ0134577 ! Node: BESJ1135491 ! Node: BESJN136411 ! Node: BESY0137502 ! Node: BESY1138360 ! Node: BESYN139218 ! Node: BIT_SIZE140363 ! Node: BTEST141112 ! Node: C_ASSOCIATED141960 ! Node: C_FUNLOC143147 ! Node: C_F_PROCPOINTER144509 ! Node: C_F_POINTER146146 ! Node: C_LOC147629 ! Node: CEILING148748 ! Node: CHAR149709 ! Node: CHDIR150796 ! Node: CHMOD152016 ! Node: CMPLX153779 ! Node: COMMAND_ARGUMENT_COUNT155318 ! Node: COMPLEX156208 ! Node: CONJG157363 ! Node: COS158372 ! Node: COSH159585 ! Node: COUNT160403 ! Node: CPU_TIME162230 ! Node: CSHIFT163583 ! Node: CTIME165232 ! Node: DATE_AND_TIME166455 ! Node: DBLE168818 ! Node: DCMPLX169658 ! Node: DFLOAT170897 ! Node: DIGITS171594 ! Node: DIM172538 ! Node: DOT_PRODUCT173674 ! Node: DPROD175104 ! Node: DREAL175823 ! Node: DTIME176487 ! Node: EOSHIFT179293 ! Node: EPSILON181358 ! Node: ERF182054 ! Node: ERFC182851 ! Node: ETIME183666 ! Node: EXIT185890 ! Node: EXP186749 ! Node: EXPONENT187846 ! Node: FDATE188592 ! Node: FLOAT189812 ! Node: FGET190522 ! Node: FGETC192315 ! Node: FLOOR194063 ! Node: FLUSH195005 ! Node: FNUM195643 ! Node: FPUT196365 ! Node: FPUTC197946 ! Node: FRACTION199666 ! Node: FREE200560 ! Node: FSEEK201397 ! Node: FSTAT203691 ! Node: FTELL204755 ! Node: GAMMA205733 ! Node: GERROR206762 ! Node: GETARG207470 ! Node: GET_COMMAND209145 ! Node: GET_COMMAND_ARGUMENT210025 ! Node: GETCWD211421 ! Node: GETENV212358 ! Node: GET_ENVIRONMENT_VARIABLE213522 ! Node: GETGID214456 ! Node: GETLOG214991 ! Node: GETPID215820 ! Node: GETUID216548 ! Node: GMTIME217062 ! Node: HOSTNM218617 ! Node: HUGE219554 ! Node: IACHAR220267 ! Node: IAND221415 ! Node: IARGC222403 ! Node: IBCLR223419 ! Node: IBITS224082 ! Node: IBSET225002 ! Node: ICHAR225660 ! Node: IDATE227613 ! Node: IEOR228631 ! Node: IERRNO229510 ! Node: INDEX intrinsic230065 ! Node: INT231391 ! Node: INT2232915 ! Node: INT8233695 ! Node: IOR234422 ! Node: IRAND235275 ! Node: IS_IOSTAT_END236630 ! Node: IS_IOSTAT_EOR237716 ! Node: ISATTY238832 ! Node: ISHFT239619 ! Node: ISHFTC240601 ! Node: ISNAN241822 ! Node: ITIME242570 ! Node: KILL243586 ! Node: KIND244501 ! Node: LBOUND245339 ! Node: LEN246623 ! Node: LEN_TRIM247689 ! Node: LGAMMA248648 ! Node: LGE249710 ! Node: LGT251013 ! Node: LINK252283 ! Node: LLE253318 ! Node: LLT254615 ! Node: LNBLNK255878 ! Node: LOC256657 ! Node: LOG257388 ! Node: LOG10258590 ! Node: LOGICAL259456 ! Node: LONG260283 ! Node: LSHIFT261054 ! Node: LSTAT262017 ! Node: LTIME263178 ! Node: MALLOC264657 ! Node: MATMUL266321 ! Node: MAX267508 ! Node: MAXEXPONENT269021 ! Node: MAXLOC269830 ! Node: MAXVAL271963 ! Node: MCLOCK273755 ! Node: MCLOCK8274758 ! Node: MERGE275972 ! Node: MIN276733 ! Node: MINEXPONENT278243 ! Node: MINLOC278866 ! Node: MINVAL280999 ! Node: MOD282765 ! Node: MODULO284142 ! Node: MOVE_ALLOC285349 ! Node: MVBITS286407 ! Node: NEAREST287490 ! Node: NEW_LINE288606 ! Node: NINT289391 ! Node: NOT290411 ! Node: NULL290993 ! Node: OR291877 ! Node: PACK293020 ! Node: PERROR295005 ! Node: PRECISION295595 ! Node: PRESENT296414 ! Node: PRODUCT297513 ! Node: RADIX299040 ! Node: RAN299810 ! Node: RAND300266 ! Node: RANDOM_NUMBER301601 ! Node: RANDOM_SEED303331 ! Node: RANGE305207 ! Node: REAL305827 ! Node: RENAME307328 ! Node: REPEAT308347 ! Node: RESHAPE309072 ! Node: RRSPACING310534 ! Node: RSHIFT311220 ! Node: SCALE312191 ! Node: SCAN312958 ! Node: SECNDS314487 ! Node: SECOND315575 ! Node: SELECTED_INT_KIND316450 ! Node: SELECTED_REAL_KIND317606 ! Node: SET_EXPONENT319545 ! Node: SHAPE320534 ! Node: SIGN321640 ! Node: SIGNAL322716 ! Node: SIN324213 ! Node: SINH325254 ! Node: SIZE326011 ! Node: SIZEOF327290 ! Node: SLEEP328549 ! Node: SNGL329106 ! Node: SPACING329770 ! Node: SPREAD330778 ! Node: SQRT331916 ! Node: SRAND333100 ! Node: STAT334259 ! Node: SUM337374 ! Node: SYMLNK338845 ! Node: SYSTEM339977 ! Node: SYSTEM_CLOCK340925 ! Node: TAN342262 ! Node: TANH343043 ! Node: TIME343855 ! Node: TIME8344959 ! Node: TINY346096 ! Node: TRANSFER346691 ! Node: TRANSPOSE348716 ! Node: TRIM349400 ! Node: TTYNAM350256 ! Node: UBOUND351177 ! Node: UMASK352518 ! Node: UNLINK353106 ! Node: UNPACK354083 ! Node: VERIFY355363 ! Node: XOR357060 ! Node: Intrinsic Modules358232 ! Node: Contributing363058 ! Node: Contributors363910 ! Node: Projects365533 ! Node: Proposed Extensions366336 ! Node: Copying368387 ! Node: GNU Free Documentation License405951 ! Node: Funding428363 ! Node: Option Index430888 ! Node: Keyword Index438489  End Tag Table diff -Nrcpad gcc-4.3.2/gcc/fortran/interface.c gcc-4.3.3/gcc/fortran/interface.c *** gcc-4.3.2/gcc/fortran/interface.c Sat May 17 07:10:13 2008 --- gcc-4.3.3/gcc/fortran/interface.c Sat Jan 10 21:01:14 2009 *************** check_intents (gfc_formal_arglist *f, gf *** 2374,2380 **** return FAILURE; } ! if (a->expr->symtree->n.sym->attr.pointer) { gfc_error ("Procedure argument at %L is local to a PURE " "procedure and has the POINTER attribute", --- 2374,2380 ---- return FAILURE; } ! if (f->sym->attr.pointer) { gfc_error ("Procedure argument at %L is local to a PURE " "procedure and has the POINTER attribute", *************** gfc_extend_expr (gfc_expr *e) *** 2625,2630 **** --- 2625,2631 ---- e->value.function.esym = NULL; e->value.function.isym = NULL; e->value.function.name = NULL; + e->user_operator = 1; if (gfc_pure (NULL) && !gfc_pure (sym)) { diff -Nrcpad gcc-4.3.2/gcc/fortran/intrinsic.c gcc-4.3.3/gcc/fortran/intrinsic.c *** gcc-4.3.2/gcc/fortran/intrinsic.c Tue Dec 25 10:41:44 2007 --- gcc-4.3.3/gcc/fortran/intrinsic.c Fri Nov 14 06:14:46 2008 *************** add_functions (void) *** 1867,1873 **** make_generic ("maxloc", GFC_ISYM_MAXLOC, GFC_STD_F95); add_sym_3red ("maxval", GFC_ISYM_MAXVAL, CLASS_TRANSFORMATIONAL, ACTUAL_NO, BT_REAL, dr, GFC_STD_F95, ! gfc_check_minval_maxval, NULL, gfc_resolve_maxval, ar, BT_REAL, dr, REQUIRED, dm, BT_INTEGER, ii, OPTIONAL, msk, BT_LOGICAL, dl, OPTIONAL); --- 1867,1873 ---- make_generic ("maxloc", GFC_ISYM_MAXLOC, GFC_STD_F95); add_sym_3red ("maxval", GFC_ISYM_MAXVAL, CLASS_TRANSFORMATIONAL, ACTUAL_NO, BT_REAL, dr, GFC_STD_F95, ! gfc_check_minval_maxval, gfc_simplify_maxval, gfc_resolve_maxval, ar, BT_REAL, dr, REQUIRED, dm, BT_INTEGER, ii, OPTIONAL, msk, BT_LOGICAL, dl, OPTIONAL); *************** add_functions (void) *** 1933,1939 **** make_generic ("minloc", GFC_ISYM_MINLOC, GFC_STD_F95); add_sym_3red ("minval", GFC_ISYM_MINVAL, CLASS_TRANSFORMATIONAL, ACTUAL_NO, BT_REAL, dr, GFC_STD_F95, ! gfc_check_minval_maxval, NULL, gfc_resolve_minval, ar, BT_REAL, dr, REQUIRED, dm, BT_INTEGER, ii, OPTIONAL, msk, BT_LOGICAL, dl, OPTIONAL); --- 1933,1939 ---- make_generic ("minloc", GFC_ISYM_MINLOC, GFC_STD_F95); add_sym_3red ("minval", GFC_ISYM_MINVAL, CLASS_TRANSFORMATIONAL, ACTUAL_NO, BT_REAL, dr, GFC_STD_F95, ! gfc_check_minval_maxval, gfc_simplify_minval, gfc_resolve_minval, ar, BT_REAL, dr, REQUIRED, dm, BT_INTEGER, ii, OPTIONAL, msk, BT_LOGICAL, dl, OPTIONAL); diff -Nrcpad gcc-4.3.2/gcc/fortran/intrinsic.h gcc-4.3.3/gcc/fortran/intrinsic.h *** gcc-4.3.2/gcc/fortran/intrinsic.h Tue Dec 25 10:41:44 2007 --- gcc-4.3.3/gcc/fortran/intrinsic.h Fri Nov 14 06:14:46 2008 *************** gfc_expr *gfc_simplify_log (gfc_expr *); *** 258,264 **** --- 258,266 ---- gfc_expr *gfc_simplify_log10 (gfc_expr *); gfc_expr *gfc_simplify_logical (gfc_expr *, gfc_expr *); gfc_expr *gfc_simplify_min (gfc_expr *); + gfc_expr *gfc_simplify_minval (gfc_expr *, gfc_expr*, gfc_expr*); gfc_expr *gfc_simplify_max (gfc_expr *); + gfc_expr *gfc_simplify_maxval (gfc_expr *, gfc_expr*, gfc_expr*); gfc_expr *gfc_simplify_maxexponent (gfc_expr *); gfc_expr *gfc_simplify_minexponent (gfc_expr *); gfc_expr *gfc_simplify_mod (gfc_expr *, gfc_expr *); diff -Nrcpad gcc-4.3.2/gcc/fortran/match.c gcc-4.3.3/gcc/fortran/match.c *** gcc-4.3.2/gcc/fortran/match.c Sun Feb 3 11:29:27 2008 --- gcc-4.3.3/gcc/fortran/match.c Wed Sep 24 08:12:47 2008 *************** gfc_match_call (void) *** 2488,2496 **** sym = st->n.sym; ! /* If it does not seem to be callable... */ if (!sym->attr.generic ! && !sym->attr.subroutine) { if (!(sym->attr.external && !sym->attr.referenced)) { --- 2488,2499 ---- sym = st->n.sym; ! /* If it does not seem to be callable (include functions so that the ! right association is made. They are thrown out in resolution.) ! ... */ if (!sym->attr.generic ! && !sym->attr.subroutine ! && !sym->attr.function) { if (!(sym->attr.external && !sym->attr.referenced)) { diff -Nrcpad gcc-4.3.2/gcc/fortran/match.h gcc-4.3.3/gcc/fortran/match.h *** gcc-4.3.2/gcc/fortran/match.h Wed Dec 19 05:55:17 2007 --- gcc-4.3.3/gcc/fortran/match.h Thu Jan 1 17:42:00 2009 *************** match gfc_match_literal_constant (gfc_ex *** 189,194 **** --- 189,195 ---- /* expr.c -- FIXME: this one should be eliminated by moving the matcher to matchexp.c and a call to a new function in expr.c that only makes sure the init expr. is valid. */ + try gfc_reduce_init_expr (gfc_expr *expr); match gfc_match_init_expr (gfc_expr **); /* array.c. */ diff -Nrcpad gcc-4.3.2/gcc/fortran/module.c gcc-4.3.3/gcc/fortran/module.c *** gcc-4.3.2/gcc/fortran/module.c Tue May 13 20:26:47 2008 --- gcc-4.3.3/gcc/fortran/module.c Sat Jan 17 09:28:50 2009 *************** load_equiv (void) *** 3465,3475 **** mio_expr (&tail->expr); } ! /* Unused equivalence members have a unique name. */ unused = true; for (eq = head; eq; eq = eq->eq) { ! if (!check_unique_name (eq->expr->symtree->name)) { unused = false; break; --- 3465,3480 ---- mio_expr (&tail->expr); } ! /* Unused equivalence members have a unique name. In addition, it ! must be checked that the symbols are from the same module. */ unused = true; for (eq = head; eq; eq = eq->eq) { ! if (eq->expr->symtree->n.sym->module ! && head->expr->symtree->n.sym->module ! && strcmp (head->expr->symtree->n.sym->module, ! eq->expr->symtree->n.sym->module) == 0 ! && !check_unique_name (eq->expr->symtree->name)) { unused = false; break; *************** read_cleanup (pointer_info *p) *** 3603,3608 **** --- 3608,3648 ---- } + /* It is not quite enough to check for ambiguity in the symbols by + the loaded symbol and the new symbol not being identical. */ + static bool + check_for_ambiguous (gfc_symbol *st_sym, pointer_info *info) + { + gfc_symbol *rsym; + module_locus locus; + symbol_attribute attr; + + rsym = info->u.rsym.sym; + if (st_sym == rsym) + return false; + + /* If the existing symbol is generic from a different module and + the new symbol is generic there can be no ambiguity. */ + if (st_sym->attr.generic + && st_sym->module + && strcmp (st_sym->module, module_name)) + { + /* The new symbol's attributes have not yet been read. Since + we need attr.generic, read it directly. */ + get_module_locus (&locus); + set_module_locus (&info->u.rsym.where); + mio_lparen (); + attr.generic = 0; + mio_symbol_attribute (&attr); + set_module_locus (&locus); + if (attr.generic) + return false; + } + + return true; + } + + /* Read a module file. */ static void *************** read_module (void) *** 3744,3750 **** if (st != NULL) { /* Check for ambiguous symbols. */ ! if (st->n.sym != info->u.rsym.sym) st->ambiguous = 1; info->u.rsym.symtree = st; } --- 3784,3790 ---- if (st != NULL) { /* Check for ambiguous symbols. */ ! if (check_for_ambiguous (st->n.sym, info)) st->ambiguous = 1; info->u.rsym.symtree = st; } *************** read_module (void) *** 3753,3761 **** st = gfc_find_symtree (gfc_current_ns->sym_root, name); /* Delete the symtree if the symbol has been added by a USE ! statement without an ONLY(11.3.2). Remember that the rsym will be the same as the symbol found in the symtree, for ! this case.*/ if (st && (only_flag || info->u.rsym.renamed) && !st->n.sym->attr.use_only && !st->n.sym->attr.use_rename --- 3793,3801 ---- st = gfc_find_symtree (gfc_current_ns->sym_root, name); /* Delete the symtree if the symbol has been added by a USE ! statement without an ONLY(11.3.2). Remember that the rsym will be the same as the symbol found in the symtree, for ! this case. */ if (st && (only_flag || info->u.rsym.renamed) && !st->n.sym->attr.use_only && !st->n.sym->attr.use_rename *************** read_module (void) *** 3791,3796 **** --- 3831,3841 ---- if (strcmp (name, p) != 0) sym->attr.use_rename = 1; + /* We need to set the only_flag here so that symbols from the + same USE...ONLY but earlier are not deleted from the tree in + the gfc_delete_symtree above. */ + sym->attr.use_only = only_flag; + /* Store the symtree pointing to this symbol. */ info->u.rsym.symtree = st; *************** write_common_0 (gfc_symtree *st) *** 3998,4004 **** /* Record that we have written this common. */ w = gfc_getmem (sizeof (struct written_common)); ! w->name = p->name; w->label = label; gfc_insert_bbt (&written_commons, w, compare_written_commons); } --- 4043,4049 ---- /* Record that we have written this common. */ w = gfc_getmem (sizeof (struct written_common)); ! w->name = name; w->label = label; gfc_insert_bbt (&written_commons, w, compare_written_commons); } *************** write_symtree (gfc_symtree *st) *** 4233,4238 **** --- 4278,4291 ---- pointer_info *p; sym = st->n.sym; + + /* A symbol in an interface body must not be visible in the + module file. */ + if (sym->ns != gfc_current_ns + && sym->ns->proc_name + && sym->ns->proc_name->attr.if_source == IFSRC_IFBODY) + return; + if (!gfc_check_access (sym->attr.access, sym->ns->default_access) || (sym->attr.flavor == FL_PROCEDURE && sym->attr.generic && !sym->attr.subroutine && !sym->attr.function)) diff -Nrcpad gcc-4.3.2/gcc/fortran/parse.c gcc-4.3.3/gcc/fortran/parse.c *** gcc-4.3.2/gcc/fortran/parse.c Wed Jan 30 06:56:10 2008 --- gcc-4.3.3/gcc/fortran/parse.c Sat Nov 8 14:17:35 2008 *************** gfc_fixup_sibling_symbols (gfc_symbol *s *** 3038,3044 **** gfc_find_sym_tree (sym->name, ns, 0, &st); if (!st || (st->n.sym->attr.dummy && ns == st->n.sym->ns)) ! continue; old_sym = st->n.sym; if (old_sym->ns == ns --- 3038,3044 ---- gfc_find_sym_tree (sym->name, ns, 0, &st); if (!st || (st->n.sym->attr.dummy && ns == st->n.sym->ns)) ! goto fixup_contained; old_sym = st->n.sym; if (old_sym->ns == ns *************** gfc_fixup_sibling_symbols (gfc_symbol *s *** 3072,3077 **** --- 3072,3078 ---- gfc_free_symbol (old_sym); } + fixup_contained: /* Do the same for any contained procedures. */ gfc_fixup_sibling_symbols (sym, ns->contained); } diff -Nrcpad gcc-4.3.2/gcc/fortran/primary.c gcc-4.3.3/gcc/fortran/primary.c *** gcc-4.3.2/gcc/fortran/primary.c Sun Feb 3 11:29:27 2008 --- gcc-4.3.3/gcc/fortran/primary.c Sun Dec 21 15:45:52 2008 *************** match_actual_arg (gfc_expr **result) *** 1327,1332 **** --- 1327,1333 ---- gfc_expr *e; int c; + gfc_gobble_whitespace (); where = gfc_current_locus; switch (gfc_match_name (name)) *************** check_substring: *** 1785,1791 **** case MATCH_NO: if (unknown) ! gfc_clear_ts (&primary->ts); break; case MATCH_ERROR: --- 1786,1795 ---- case MATCH_NO: if (unknown) ! { ! gfc_clear_ts (&primary->ts); ! gfc_clear_ts (&sym->ts); ! } break; case MATCH_ERROR: *************** match_variable (gfc_expr **result, int e *** 2499,2508 **** || gfc_current_state () == COMP_CONTAINS) host_flag = 0; m = gfc_match_sym_tree (&st, host_flag); if (m != MATCH_YES) return m; - where = gfc_current_locus; sym = st->n.sym; --- 2503,2512 ---- || gfc_current_state () == COMP_CONTAINS) host_flag = 0; + where = gfc_current_locus; m = gfc_match_sym_tree (&st, host_flag); if (m != MATCH_YES) return m; sym = st->n.sym; diff -Nrcpad gcc-4.3.2/gcc/fortran/resolve.c gcc-4.3.3/gcc/fortran/resolve.c *** gcc-4.3.2/gcc/fortran/resolve.c Sat Jul 19 18:34:21 2008 --- gcc-4.3.3/gcc/fortran/resolve.c Sun Jan 11 13:42:32 2009 *************** resolve_assumed_size_actual (gfc_expr *e *** 1012,1017 **** --- 1012,1049 ---- } + /* Check a generic procedure, passed as an actual argument, to see if + there is a matching specific name. If none, it is an error, and if + more than one, the reference is ambiguous. */ + static int + count_specific_procs (gfc_expr *e) + { + int n; + gfc_interface *p; + gfc_symbol *sym; + + n = 0; + sym = e->symtree->n.sym; + + for (p = sym->generic; p; p = p->next) + if (strcmp (sym->name, p->sym->name) == 0) + { + e->symtree = gfc_find_symtree (p->sym->ns->sym_root, + sym->name); + n++; + } + + if (n > 1) + gfc_error ("'%s' at %L is ambiguous", e->symtree->n.sym->name, + &e->where); + + if (n == 0) + gfc_error ("GENERIC procedure '%s' is not allowed as an actual " + "argument at %L", sym->name, &e->where); + + return n; + } + /* Resolve an actual argument list. Most of the time, this is just resolving the expressions in the list. The exception is that we sometimes have to decide whether arguments *************** resolve_assumed_size_actual (gfc_expr *e *** 1019,1025 **** references. */ static try ! resolve_actual_arglist (gfc_actual_arglist *arg, procedure_type ptype) { gfc_symbol *sym; gfc_symtree *parent_st; --- 1051,1058 ---- references. */ static try ! resolve_actual_arglist (gfc_actual_arglist *arg, procedure_type ptype, ! bool no_formal_args) { gfc_symbol *sym; gfc_symtree *parent_st; *************** resolve_actual_arglist (gfc_actual_argli *** 1044,1060 **** continue; } ! if (e->expr_type == FL_VARIABLE && e->symtree->ambiguous) ! { ! gfc_error ("'%s' at %L is ambiguous", e->symtree->n.sym->name, ! &e->where); ! return FAILURE; ! } if (e->ts.type != BT_PROCEDURE) { save_need_full_assumed_size = need_full_assumed_size; ! if (e->expr_type != FL_VARIABLE) need_full_assumed_size = 0; if (gfc_resolve_expr (e) != SUCCESS) return FAILURE; --- 1077,1092 ---- continue; } ! if (e->expr_type == EXPR_VARIABLE ! && e->symtree->n.sym->attr.generic ! && no_formal_args ! && count_specific_procs (e) != 1) ! return FAILURE; if (e->ts.type != BT_PROCEDURE) { save_need_full_assumed_size = need_full_assumed_size; ! if (e->expr_type != EXPR_VARIABLE) need_full_assumed_size = 0; if (gfc_resolve_expr (e) != SUCCESS) return FAILURE; *************** resolve_actual_arglist (gfc_actual_argli *** 1110,1131 **** /* Check if a generic interface has a specific procedure with the same name before emitting an error. */ ! if (sym->attr.generic) ! { ! gfc_interface *p; ! for (p = sym->generic; p; p = p->next) ! if (strcmp (sym->name, p->sym->name) == 0) ! { ! e->symtree = gfc_find_symtree ! (p->sym->ns->sym_root, sym->name); ! sym = p->sym; ! break; ! } ! if (p == NULL || e->symtree == NULL) ! gfc_error ("GENERIC procedure '%s' is not " ! "allowed as an actual argument at %L", sym->name, ! &e->where); } /* If the symbol is the function that names the current (or --- 1142,1160 ---- /* Check if a generic interface has a specific procedure with the same name before emitting an error. */ ! if (sym->attr.generic && count_specific_procs (e) != 1) ! return FAILURE; ! ! /* Just in case a specific was found for the expression. */ ! sym = e->symtree->n.sym; ! if (sym->attr.entry && sym->ns->entries ! && sym->ns == gfc_current_ns ! && !sym->ns->entries->sym->attr.recursive) ! { ! gfc_error ("Reference to ENTRY '%s' at %L is recursive, but procedure " ! "'%s' is not declared as RECURSIVE", ! sym->name, &e->where, sym->ns->entries->sym->name); } /* If the symbol is the function that names the current (or *************** resolve_actual_arglist (gfc_actual_argli *** 1198,1204 **** is a variable instead, it needs to be resolved as it was not done at the beginning of this function. */ save_need_full_assumed_size = need_full_assumed_size; ! if (e->expr_type != FL_VARIABLE) need_full_assumed_size = 0; if (gfc_resolve_expr (e) != SUCCESS) return FAILURE; --- 1227,1233 ---- is a variable instead, it needs to be resolved as it was not done at the beginning of this function. */ save_need_full_assumed_size = need_full_assumed_size; ! if (e->expr_type != EXPR_VARIABLE) need_full_assumed_size = 0; if (gfc_resolve_expr (e) != SUCCESS) return FAILURE; *************** find_noncopying_intrinsics (gfc_symbol * *** 1426,1432 **** for (ap = actual; ap; ap = ap->next) if (ap->expr && (expr = gfc_get_noncopying_intrinsic_argument (ap->expr)) ! && !gfc_check_fncall_dependency (expr, INTENT_IN, fnsym, actual)) ap->expr->inline_noncopying_intrinsic = 1; } --- 1455,1462 ---- for (ap = actual; ap; ap = ap->next) if (ap->expr && (expr = gfc_get_noncopying_intrinsic_argument (ap->expr)) ! && !gfc_check_fncall_dependency (expr, INTENT_IN, fnsym, actual, ! NOT_ELEMENTAL)) ap->expr->inline_noncopying_intrinsic = 1; } *************** resolve_function (gfc_expr *expr) *** 2170,2175 **** --- 2200,2206 ---- try t; int temp; procedure_type p = PROC_INTRINSIC; + bool no_formal_args; sym = NULL; if (expr->symtree) *************** resolve_function (gfc_expr *expr) *** 2199,2205 **** if (expr->symtree && expr->symtree->n.sym) p = expr->symtree->n.sym->attr.proc; ! if (resolve_actual_arglist (expr->value.function.actual, p) == FAILURE) return FAILURE; /* Need to setup the call to the correct c_associated, depending on --- 2230,2238 ---- if (expr->symtree && expr->symtree->n.sym) p = expr->symtree->n.sym->attr.proc; ! no_formal_args = sym && is_external_proc (sym) && sym->formal == NULL; ! if (resolve_actual_arglist (expr->value.function.actual, ! p, no_formal_args) == FAILURE) return FAILURE; /* Need to setup the call to the correct c_associated, depending on *************** resolve_call (gfc_code *c) *** 2776,2801 **** { try t; procedure_type ptype = PROC_INTRINSIC; ! if (c->symtree && c->symtree->n.sym ! && c->symtree->n.sym->ts.type != BT_UNKNOWN) { gfc_error ("'%s' at %L has a type, which is not consistent with " ! "the CALL at %L", c->symtree->n.sym->name, ! &c->symtree->n.sym->declared_at, &c->loc); return FAILURE; } /* If external, check for usage. */ ! if (c->symtree && is_external_proc (c->symtree->n.sym)) ! resolve_global_procedure (c->symtree->n.sym, &c->loc, 1); /* Subroutines without the RECURSIVE attribution are not allowed to * call themselves. */ ! if (c->symtree && c->symtree->n.sym && !c->symtree->n.sym->attr.recursive) { ! gfc_symbol *csym, *proc; ! csym = c->symtree->n.sym; proc = gfc_current_ns->proc_name; if (csym == proc) { --- 2809,2849 ---- { try t; procedure_type ptype = PROC_INTRINSIC; + gfc_symbol *csym, *sym; + bool no_formal_args; ! csym = c->symtree ? c->symtree->n.sym : NULL; ! ! if (csym && csym->ts.type != BT_UNKNOWN) { gfc_error ("'%s' at %L has a type, which is not consistent with " ! "the CALL at %L", csym->name, &csym->declared_at, &c->loc); return FAILURE; } + if (csym && gfc_current_ns->parent && csym->ns != gfc_current_ns) + { + gfc_find_symbol (csym->name, gfc_current_ns, 1, &sym); + if (sym && csym != sym + && sym->ns == gfc_current_ns + && sym->attr.flavor == FL_PROCEDURE + && sym->attr.contained) + { + sym->refs++; + csym = sym; + c->symtree->n.sym = sym; + } + } + /* If external, check for usage. */ ! if (csym && is_external_proc (csym)) ! resolve_global_procedure (csym, &c->loc, 1); /* Subroutines without the RECURSIVE attribution are not allowed to * call themselves. */ ! if (csym && !csym->attr.recursive) { ! gfc_symbol *proc; proc = gfc_current_ns->proc_name; if (csym == proc) { *************** resolve_call (gfc_code *c) *** 2818,2827 **** of procedure, once the procedure itself is resolved. */ need_full_assumed_size++; ! if (c->symtree && c->symtree->n.sym) ! ptype = c->symtree->n.sym->attr.proc; ! if (resolve_actual_arglist (c->ext.actual, ptype) == FAILURE) return FAILURE; /* Resume assumed_size checking. */ --- 2866,2877 ---- of procedure, once the procedure itself is resolved. */ need_full_assumed_size++; ! if (csym) ! ptype = csym->attr.proc; ! no_formal_args = csym && is_external_proc (csym) && csym->formal == NULL; ! if (resolve_actual_arglist (c->ext.actual, ptype, ! no_formal_args) == FAILURE) return FAILURE; /* Resume assumed_size checking. */ *************** resolve_call (gfc_code *c) *** 2829,2835 **** t = SUCCESS; if (c->resolved_sym == NULL) ! switch (procedure_kind (c->symtree->n.sym)) { case PTYPE_GENERIC: t = resolve_generic_s (c); --- 2879,2885 ---- t = SUCCESS; if (c->resolved_sym == NULL) ! switch (procedure_kind (csym)) { case PTYPE_GENERIC: t = resolve_generic_s (c); *************** check_host_association (gfc_expr *e) *** 4150,4168 **** int n; bool retval = e->expr_type == EXPR_FUNCTION; ! if (e->symtree == NULL || e->symtree->n.sym == NULL) return retval; old_sym = e->symtree->n.sym; - if (old_sym->attr.use_assoc) - return retval; - if (gfc_current_ns->parent && old_sym->ns != gfc_current_ns) { ! gfc_find_symbol (old_sym->name, gfc_current_ns, 1, &sym); if (sym && old_sym != sym && sym->attr.flavor == FL_PROCEDURE && sym->attr.contained) { --- 4200,4221 ---- int n; bool retval = e->expr_type == EXPR_FUNCTION; ! /* If the expression is the result of substitution in ! interface.c(gfc_extend_expr) because there is no way in ! which the host association can be wrong. */ ! if (e->symtree == NULL ! || e->symtree->n.sym == NULL ! || e->user_operator) return retval; old_sym = e->symtree->n.sym; if (gfc_current_ns->parent && old_sym->ns != gfc_current_ns) { ! gfc_find_symbol (e->symtree->name, gfc_current_ns, 1, &sym); if (sym && old_sym != sym + && sym->ts.type == old_sym->ts.type && sym->attr.flavor == FL_PROCEDURE && sym->attr.contained) { *************** check_host_association (gfc_expr *e) *** 4188,4193 **** --- 4241,4251 ---- gfc_free (e->shape); } + /* TODO - Replace this gfc_match_rvalue with a straight replacement of + actual arglists for function to function substitutions and with a + conversion of the reference list to an actual arglist in the case of + a variable to function replacement. This should be quite easy since + only integers and vectors can be involved. */ gfc_match_rvalue (&expr); gfc_clear_error (); gfc_buffer_error (0); *************** gfc_resolve_assign_in_forall (gfc_code * *** 5796,5804 **** assignment target, then there will be a many-to-one assignment. */ if (find_forall_index (code->expr, forall_index, 0) == FAILURE) ! gfc_error ("The FORALL with index '%s' cause more than one " ! "assignment to this object at %L", ! var_expr[n]->symtree->name, &code->expr->where); } } } --- 5854,5862 ---- assignment target, then there will be a many-to-one assignment. */ if (find_forall_index (code->expr, forall_index, 0) == FAILURE) ! gfc_warning ("The FORALL with index '%s' might cause more than " ! "one assignment to this object at %L", ! var_expr[n]->symtree->name, &code->expr->where); } } } *************** gfc_resolve_forall_body (gfc_code *code, *** 5894,5899 **** --- 5952,5991 ---- } + /* Counts the number of iterators needed inside a forall construct, including + nested forall constructs. This is used to allocate the needed memory + in gfc_resolve_forall. */ + + static int + gfc_count_forall_iterators (gfc_code *code) + { + int max_iters, sub_iters, current_iters; + gfc_forall_iterator *fa; + + gcc_assert(code->op == EXEC_FORALL); + max_iters = 0; + current_iters = 0; + + for (fa = code->ext.forall_iterator; fa; fa = fa->next) + current_iters ++; + + code = code->block->next; + + while (code) + { + if (code->op == EXEC_FORALL) + { + sub_iters = gfc_count_forall_iterators (code); + if (sub_iters > max_iters) + max_iters = sub_iters; + } + code = code->next; + } + + return current_iters + max_iters; + } + + /* Given a FORALL construct, first resolve the FORALL iterator, then call gfc_resolve_forall_body to resolve the FORALL body. */ *************** gfc_resolve_forall (gfc_code *code, gfc_ *** 5903,5924 **** static gfc_expr **var_expr; static int total_var = 0; static int nvar = 0; gfc_forall_iterator *fa; - gfc_code *next; int i; /* Start to resolve a FORALL construct */ if (forall_save == 0) { /* Count the total number of FORALL index in the nested FORALL ! construct in order to allocate the VAR_EXPR with proper size. */ ! next = code; ! while ((next != NULL) && (next->op == EXEC_FORALL)) ! { ! for (fa = next->ext.forall_iterator; fa; fa = fa->next) ! total_var ++; ! next = next->block->next; ! } /* Allocate VAR_EXPR with NUMBER_OF_FORALL_INDEX elements. */ var_expr = (gfc_expr **) gfc_getmem (total_var * sizeof (gfc_expr *)); --- 5995,6012 ---- static gfc_expr **var_expr; static int total_var = 0; static int nvar = 0; + int old_nvar, tmp; gfc_forall_iterator *fa; int i; + old_nvar = nvar; + /* Start to resolve a FORALL construct */ if (forall_save == 0) { /* Count the total number of FORALL index in the nested FORALL ! construct in order to allocate the VAR_EXPR with proper size. */ ! total_var = gfc_count_forall_iterators (code); /* Allocate VAR_EXPR with NUMBER_OF_FORALL_INDEX elements. */ var_expr = (gfc_expr **) gfc_getmem (total_var * sizeof (gfc_expr *)); *************** gfc_resolve_forall (gfc_code *code, gfc_ *** 5943,5948 **** --- 6031,6039 ---- var_expr[nvar] = gfc_copy_expr (fa->var); nvar++; + + /* No memory leak. */ + gcc_assert (nvar <= total_var); } /* Resolve the FORALL body. */ *************** gfc_resolve_forall (gfc_code *code, gfc_ *** 5951,5963 **** /* May call gfc_resolve_forall to resolve the inner FORALL loop. */ gfc_resolve_blocks (code->block, ns); ! /* Free VAR_EXPR after the whole FORALL construct resolved. */ ! for (i = 0; i < total_var; i++) ! gfc_free_expr (var_expr[i]); ! /* Reset the counters. */ ! total_var = 0; ! nvar = 0; } --- 6042,6062 ---- /* May call gfc_resolve_forall to resolve the inner FORALL loop. */ gfc_resolve_blocks (code->block, ns); ! tmp = nvar; ! nvar = old_nvar; ! /* Free only the VAR_EXPRs allocated in this frame. */ ! for (i = nvar; i < tmp; i++) ! gfc_free_expr (var_expr[i]); ! if (nvar == 0) ! { ! /* We are in the outermost FORALL construct. */ ! gcc_assert (forall_save == 0); ! ! /* VAR_EXPR is not needed any more. */ ! gfc_free (var_expr); ! total_var = 0; ! } } *************** resolve_fl_variable_derived (gfc_symbol *** 7060,7067 **** { gfc_symbol *s; gfc_find_symbol (sym->ts.derived->name, sym->ns, 0, &s); ! if (s && (s->attr.flavor != FL_DERIVED ! || !gfc_compare_derived_types (s, sym->ts.derived))) { gfc_error ("The type '%s' cannot be host associated at %L " "because it is blocked by an incompatible object " --- 7159,7165 ---- { gfc_symbol *s; gfc_find_symbol (sym->ts.derived->name, sym->ns, 0, &s); ! if (s && s->attr.flavor != FL_DERIVED) { gfc_error ("The type '%s' cannot be host associated at %L " "because it is blocked by an incompatible object " *************** resolve_fl_variable (gfc_symbol *sym, in *** 7193,7198 **** --- 7291,7300 ---- } } + /* Ensure that any initializer is simplified. */ + if (sym->value) + gfc_simplify_expr (sym->value, 1); + /* Reject illegal initializers. */ if (!sym->mark && sym->value) { *************** resolve_types (gfc_namespace *ns) *** 9092,9097 **** --- 9194,9200 ---- gfc_charlen *cl; gfc_data *d; gfc_equiv *eq; + gfc_namespace* old_ns = gfc_current_ns; gfc_current_ns = ns; *************** resolve_types (gfc_namespace *ns) *** 9149,9154 **** --- 9252,9259 ---- warn_unused_fortran_label (ns->st_labels); gfc_resolve_uops (ns->uop_root); + + gfc_current_ns = old_ns; } diff -Nrcpad gcc-4.3.2/gcc/fortran/simplify.c gcc-4.3.3/gcc/fortran/simplify.c *** gcc-4.3.2/gcc/fortran/simplify.c Mon Jan 28 17:25:55 2008 --- gcc-4.3.3/gcc/fortran/simplify.c Fri Nov 14 06:14:46 2008 *************** simplify_cmplx (const char *name, gfc_ex *** 763,769 **** { case BT_INTEGER: if (!y->is_boz) ! mpfr_set_z (result->value.complex.i, y->value.integer, GFC_RND_MODE); break; case BT_REAL: --- 763,770 ---- { case BT_INTEGER: if (!y->is_boz) ! mpfr_set_z (result->value.complex.i, y->value.integer, ! GFC_RND_MODE); break; case BT_REAL: *************** gfc_simplify_logical (gfc_expr *e, gfc_e *** 2451,2507 **** } ! /* This function is special since MAX() can take any number of ! arguments. The simplified expression is a rewritten version of the ! argument list containing at most one constant element. Other ! constant elements are deleted. Because the argument list has ! already been checked, this function always succeeds. sign is 1 for ! MAX(), -1 for MIN(). */ ! ! static gfc_expr * ! simplify_min_max (gfc_expr *expr, int sign) { ! gfc_actual_arglist *arg, *last, *extremum; ! gfc_intrinsic_sym * specific; ! ! last = NULL; ! extremum = NULL; ! specific = expr->value.function.isym; ! ! arg = expr->value.function.actual; ! ! for (; arg; last = arg, arg = arg->next) ! { ! if (arg->expr->expr_type != EXPR_CONSTANT) ! continue; ! ! if (extremum == NULL) ! { ! extremum = arg; ! continue; ! } ! ! switch (arg->expr->ts.type) { case BT_INTEGER: ! if (mpz_cmp (arg->expr->value.integer, ! extremum->expr->value.integer) * sign > 0) ! mpz_set (extremum->expr->value.integer, arg->expr->value.integer); break; case BT_REAL: /* We need to use mpfr_min and mpfr_max to treat NaN properly. */ if (sign > 0) ! mpfr_max (extremum->expr->value.real, extremum->expr->value.real, ! arg->expr->value.real, GFC_RND_MODE); else ! mpfr_min (extremum->expr->value.real, extremum->expr->value.real, ! arg->expr->value.real, GFC_RND_MODE); break; case BT_CHARACTER: ! #define LENGTH(x) ((x)->expr->value.character.length) ! #define STRING(x) ((x)->expr->value.character.string) if (LENGTH(extremum) < LENGTH(arg)) { char * tmp = STRING(extremum); --- 2452,2483 ---- } ! /* Selects bewteen current value and extremum for simplify_min_max ! and simplify_minval_maxval. */ ! static void ! min_max_choose (gfc_expr *arg, gfc_expr *extremum, int sign) { ! switch (arg->ts.type) { case BT_INTEGER: ! if (mpz_cmp (arg->value.integer, ! extremum->value.integer) * sign > 0) ! mpz_set (extremum->value.integer, arg->value.integer); break; case BT_REAL: /* We need to use mpfr_min and mpfr_max to treat NaN properly. */ if (sign > 0) ! mpfr_max (extremum->value.real, extremum->value.real, ! arg->value.real, GFC_RND_MODE); else ! mpfr_min (extremum->value.real, extremum->value.real, ! arg->value.real, GFC_RND_MODE); break; case BT_CHARACTER: ! #define LENGTH(x) ((x)->value.character.length) ! #define STRING(x) ((x)->value.character.string) if (LENGTH(extremum) < LENGTH(arg)) { char * tmp = STRING(extremum); *************** simplify_min_max (gfc_expr *expr, int si *** 2515,2521 **** gfc_free (tmp); } ! if (gfc_compare_string (arg->expr, extremum->expr) * sign > 0) { gfc_free (STRING(extremum)); STRING(extremum) = gfc_getmem (LENGTH(extremum) + 1); --- 2491,2497 ---- gfc_free (tmp); } ! if (gfc_compare_string (arg, extremum) * sign > 0) { gfc_free (STRING(extremum)); STRING(extremum) = gfc_getmem (LENGTH(extremum) + 1); *************** simplify_min_max (gfc_expr *expr, int si *** 2532,2537 **** --- 2508,2547 ---- default: gfc_internal_error ("simplify_min_max(): Bad type in arglist"); } + } + + + /* This function is special since MAX() can take any number of + arguments. The simplified expression is a rewritten version of the + argument list containing at most one constant element. Other + constant elements are deleted. Because the argument list has + already been checked, this function always succeeds. sign is 1 for + MAX(), -1 for MIN(). */ + + static gfc_expr * + simplify_min_max (gfc_expr *expr, int sign) + { + gfc_actual_arglist *arg, *last, *extremum; + gfc_intrinsic_sym * specific; + + last = NULL; + extremum = NULL; + specific = expr->value.function.isym; + + arg = expr->value.function.actual; + + for (; arg; last = arg, arg = arg->next) + { + if (arg->expr->expr_type != EXPR_CONSTANT) + continue; + + if (extremum == NULL) + { + extremum = arg; + continue; + } + + min_max_choose (arg->expr, extremum->expr, sign); /* Delete the extra constant argument. */ if (last == NULL) *************** gfc_simplify_max (gfc_expr *e) *** 2576,2581 **** --- 2586,2654 ---- } + /* This is a simplified version of simplify_min_max to provide + simplification of minval and maxval for a vector. */ + + static gfc_expr * + simplify_minval_maxval (gfc_expr *expr, int sign) + { + gfc_constructor *ctr, *extremum; + gfc_intrinsic_sym * specific; + + extremum = NULL; + specific = expr->value.function.isym; + + ctr = expr->value.constructor; + + for (; ctr; ctr = ctr->next) + { + if (ctr->expr->expr_type != EXPR_CONSTANT) + return NULL; + + if (extremum == NULL) + { + extremum = ctr; + continue; + } + + min_max_choose (ctr->expr, extremum->expr, sign); + } + + if (extremum == NULL) + return NULL; + + /* Convert to the correct type and kind. */ + if (expr->ts.type != BT_UNKNOWN) + return gfc_convert_constant (extremum->expr, + expr->ts.type, expr->ts.kind); + + if (specific->ts.type != BT_UNKNOWN) + return gfc_convert_constant (extremum->expr, + specific->ts.type, specific->ts.kind); + + return gfc_copy_expr (extremum->expr); + } + + + gfc_expr * + gfc_simplify_minval (gfc_expr *array, gfc_expr* dim, gfc_expr *mask) + { + if (array->expr_type != EXPR_ARRAY || array->rank != 1 || dim || mask) + return NULL; + + return simplify_minval_maxval (array, -1); + } + + + gfc_expr * + gfc_simplify_maxval (gfc_expr *array, gfc_expr* dim, gfc_expr *mask) + { + if (array->expr_type != EXPR_ARRAY || array->rank != 1 || dim || mask) + return NULL; + return simplify_minval_maxval (array, 1); + } + + gfc_expr * gfc_simplify_maxexponent (gfc_expr *x) { diff -Nrcpad gcc-4.3.2/gcc/fortran/symbol.c gcc-4.3.3/gcc/fortran/symbol.c *** gcc-4.3.2/gcc/fortran/symbol.c Wed Jan 30 06:56:10 2008 --- gcc-4.3.3/gcc/fortran/symbol.c Tue Sep 23 06:25:39 2008 *************** gfc_add_access (symbol_attribute *attr, *** 1377,1383 **** const char *name, locus *where) { ! if (attr->access == ACCESS_UNKNOWN) { attr->access = access; return check_conflict (attr, name, where); --- 1377,1384 ---- const char *name, locus *where) { ! if (attr->access == ACCESS_UNKNOWN ! || (attr->use_assoc && attr->access != ACCESS_PRIVATE)) { attr->access = access; return check_conflict (attr, name, where); *************** save_symbol (gfc_symbol *sym) *** 3058,3064 **** void gfc_save_all (gfc_namespace *ns) { - gfc_traverse_ns (ns, save_symbol); } --- 3059,3064 ---- diff -Nrcpad gcc-4.3.2/gcc/fortran/target-memory.c gcc-4.3.3/gcc/fortran/target-memory.c *** gcc-4.3.2/gcc/fortran/target-memory.c Sun May 18 23:06:16 2008 --- gcc-4.3.3/gcc/fortran/target-memory.c Sun Jan 11 13:42:32 2009 *************** encode_derived (gfc_expr *source, unsign *** 211,218 **** continue; ptr = TREE_INT_CST_LOW(DECL_FIELD_OFFSET(cmp->backend_decl)) + TREE_INT_CST_LOW(DECL_FIELD_BIT_OFFSET(cmp->backend_decl))/8; ! gfc_target_encode_expr (ctr->expr, &buffer[ptr], ! buffer_size - ptr); } return int_size_in_bytes (type); --- 211,223 ---- continue; ptr = TREE_INT_CST_LOW(DECL_FIELD_OFFSET(cmp->backend_decl)) + TREE_INT_CST_LOW(DECL_FIELD_BIT_OFFSET(cmp->backend_decl))/8; ! ! if (ctr->expr->expr_type == EXPR_NULL) ! memset (&buffer[ptr], 0, ! int_size_in_bytes (TREE_TYPE (cmp->backend_decl))); ! else ! gfc_target_encode_expr (ctr->expr, &buffer[ptr], ! buffer_size - ptr); } return int_size_in_bytes (type); *************** gfc_interpret_integer (int kind, unsigne *** 338,345 **** int gfc_interpret_float (int kind, unsigned char *buffer, size_t buffer_size, ! mpfr_t real) { mpfr_init (real); gfc_conv_tree_to_mpfr (real, native_interpret_expr (gfc_get_real_type (kind), --- 343,351 ---- int gfc_interpret_float (int kind, unsigned char *buffer, size_t buffer_size, ! mpfr_t real) { + gfc_set_model_kind (kind); mpfr_init (real); gfc_conv_tree_to_mpfr (real, native_interpret_expr (gfc_get_real_type (kind), *************** gfc_convert_boz (gfc_expr *expr, gfc_typ *** 661,670 **** } for (index = 0; gfc_integer_kinds[index].kind != 0; ++index) ! { ! if ((unsigned) gfc_integer_kinds[index].bit_size >= ts_bit_size) ! break; ! } expr->ts.kind = gfc_integer_kinds[index].kind; buffer_size = MAX (buffer_size, size_integer (expr->ts.kind)); --- 667,674 ---- } for (index = 0; gfc_integer_kinds[index].kind != 0; ++index) ! if ((unsigned) gfc_integer_kinds[index].bit_size >= ts_bit_size) ! break; expr->ts.kind = gfc_integer_kinds[index].kind; buffer_size = MAX (buffer_size, size_integer (expr->ts.kind)); diff -Nrcpad gcc-4.3.2/gcc/fortran/trans-array.c gcc-4.3.3/gcc/fortran/trans-array.c *** gcc-4.3.2/gcc/fortran/trans-array.c Sun Jul 27 11:41:35 2008 --- gcc-4.3.3/gcc/fortran/trans-array.c Sat Nov 29 20:42:22 2008 *************** gfc_trans_create_temp_array (stmtblock_t *** 587,603 **** /* Set the lower bound to zero. */ for (dim = 0; dim < info->dimen; dim++) { ! n = loop->order[dim]; ! /* TODO: Investigate why "if (n < loop->temp_dim) ! gcc_assert (integer_zerop (loop->from[n]));" fails here. */ ! if (n >= loop->temp_dim) ! { ! /* Callee allocated arrays may not have a known bound yet. */ ! if (loop->to[n]) ! loop->to[n] = fold_build2 (MINUS_EXPR, gfc_array_index_type, ! loop->to[n], loop->from[n]); ! loop->from[n] = gfc_index_zero_node; ! } info->delta[dim] = gfc_index_zero_node; info->start[dim] = gfc_index_zero_node; --- 587,599 ---- /* Set the lower bound to zero. */ for (dim = 0; dim < info->dimen; dim++) { ! n = loop->order[dim]; ! /* Callee allocated arrays may not have a known bound yet. */ ! if (loop->to[n]) ! loop->to[n] = gfc_evaluate_now (fold_build2 (MINUS_EXPR, ! gfc_array_index_type, ! loop->to[n], loop->from[n]), pre); ! loop->from[n] = gfc_index_zero_node; info->delta[dim] = gfc_index_zero_node; info->start[dim] = gfc_index_zero_node; *************** gfc_trans_create_temp_array (stmtblock_t *** 635,643 **** or_expr = NULL_TREE; for (n = 0; n < info->dimen; n++) ! { ! if (loop->to[n] == NULL_TREE) { /* For a callee allocated array express the loop bounds in terms of the descriptor fields. */ --- 631,648 ---- or_expr = NULL_TREE; + /* If there is at least one null loop->to[n], it is a callee allocated + array. */ for (n = 0; n < info->dimen; n++) ! if (loop->to[n] == NULL_TREE) ! { ! size = NULL_TREE; ! break; ! } ! ! for (n = 0; n < info->dimen; n++) ! { ! if (size == NULL_TREE) { /* For a callee allocated array express the loop bounds in terms of the descriptor fields. */ *************** gfc_trans_create_temp_array (stmtblock_t *** 645,651 **** gfc_conv_descriptor_ubound (desc, gfc_rank_cst[n]), gfc_conv_descriptor_lbound (desc, gfc_rank_cst[n])); loop->to[n] = tmp; - size = NULL_TREE; continue; } --- 650,655 ---- *************** gfc_trans_constant_array_constructor (gf *** 1604,1611 **** info->descriptor = tmp; info->data = build_fold_addr_expr (tmp); ! info->offset = fold_build1 (NEGATE_EXPR, gfc_array_index_type, ! loop->from[0]); for (i = 0; i < info->dimen; i++) { --- 1608,1614 ---- info->descriptor = tmp; info->data = build_fold_addr_expr (tmp); ! info->offset = gfc_index_zero_node; for (i = 0; i < info->dimen; i++) { *************** gfc_trans_array_constructor (gfc_loopinf *** 1668,1674 **** tree offsetvar; tree desc; tree type; - tree loopfrom; bool dynamic; if (flag_bounds_check && ss->expr->ts.type == BT_CHARACTER) --- 1671,1676 ---- *************** gfc_trans_array_constructor (gfc_loopinf *** 1747,1780 **** } } - /* Temporarily reset the loop variables, so that the returned temporary - has the right size and bounds. This seems only to be necessary for - 1D arrays. */ - if (!integer_zerop (loop->from[0]) && loop->dimen == 1) - { - loopfrom = loop->from[0]; - loop->from[0] = gfc_index_zero_node; - loop->to[0] = fold_build2 (MINUS_EXPR, gfc_array_index_type, - loop->to[0], loopfrom); - } - else - loopfrom = NULL_TREE; - gfc_trans_create_temp_array (&loop->pre, &loop->post, loop, &ss->data.info, type, dynamic, true, false); - if (loopfrom != NULL_TREE) - { - loop->from[0] = loopfrom; - loop->to[0] = fold_build2 (PLUS_EXPR, gfc_array_index_type, - loop->to[0], loopfrom); - /* In the case of a non-zero from, the temporary needs an offset - so that subsequent indexing is correct. */ - ss->data.info.offset = fold_build1 (NEGATE_EXPR, - gfc_array_index_type, - loop->from[0]); - } - desc = ss->data.info.descriptor; offset = gfc_index_zero_node; offsetvar = gfc_create_var_np (gfc_array_index_type, "offset"); --- 1749,1757 ---- *************** gfc_conv_loop_setup (gfc_loopinfo * loop *** 3299,3305 **** if (ss->shape) { /* The frontend has worked out the size for us. */ ! loopspec[n] = ss; continue; } --- 3276,3285 ---- if (ss->shape) { /* The frontend has worked out the size for us. */ ! if (!loopspec[n] || !loopspec[n]->shape ! || !integer_zerop (loopspec[n]->data.info.start[n])) ! /* Prefer zero-based descriptors if possible. */ ! loopspec[n] = ss; continue; } *************** gfc_conv_loop_setup (gfc_loopinfo * loop *** 3398,3405 **** break; case GFC_SS_SECTION: ! loop->to[n] = gfc_conv_section_upper_bound (loopspec[n], n, ! &loop->pre); break; case GFC_SS_FUNCTION: --- 3378,3390 ---- break; case GFC_SS_SECTION: ! /* Use the end expression if it exists and is not constant, ! so that it is only evaluated once. */ ! if (info->end[n] && !INTEGER_CST_P (info->end[n])) ! loop->to[n] = info->end[n]; ! else ! loop->to[n] = gfc_conv_section_upper_bound (loopspec[n], n, ! &loop->pre); break; case GFC_SS_FUNCTION: *************** gfc_conv_loop_setup (gfc_loopinfo * loop *** 3473,3479 **** /* Calculate the translation from loop variables to array indices. */ for (ss = loop->ss; ss != gfc_ss_terminator; ss = ss->loop_chain) { ! if (ss->type != GFC_SS_SECTION && ss->type != GFC_SS_COMPONENT) continue; info = &ss->data.info; --- 3458,3466 ---- /* Calculate the translation from loop variables to array indices. */ for (ss = loop->ss; ss != gfc_ss_terminator; ss = ss->loop_chain) { ! if (ss->type != GFC_SS_SECTION && ss->type != GFC_SS_COMPONENT ! && ss->type != GFC_SS_CONSTRUCTOR) ! continue; info = &ss->data.info; *************** gfc_conv_array_parameter (gfc_se * se, g *** 5144,5150 **** gfc_conv_expr_descriptor (se, expr, ss); } - /* Deallocate the allocatable components of structures that are not variable. */ if (expr->ts.type == BT_DERIVED --- 5131,5136 ---- *************** structure_alloc_comps (gfc_symbol * der_ *** 5375,5384 **** if (purpose == COPY_ALLOC_COMP) { ! tmp = gfc_duplicate_allocatable (dest, decl, TREE_TYPE(decl), rank); ! gfc_add_expr_to_block (&fnblock, tmp); ! ! tmp = build_fold_indirect_ref (gfc_conv_descriptor_data_get (dest)); dref = gfc_build_array_ref (tmp, index, NULL); tmp = structure_alloc_comps (der_type, vref, dref, rank, purpose); } --- 5361,5372 ---- if (purpose == COPY_ALLOC_COMP) { ! if (GFC_DESCRIPTOR_TYPE_P (TREE_TYPE (dest))) ! { ! tmp = gfc_duplicate_allocatable (dest, decl, TREE_TYPE(decl), rank); ! gfc_add_expr_to_block (&fnblock, tmp); ! } ! tmp = build_fold_indirect_ref (gfc_conv_array_data (dest)); dref = gfc_build_array_ref (tmp, index, NULL); tmp = structure_alloc_comps (der_type, vref, dref, rank, purpose); } *************** gfc_trans_deferred_array (gfc_symbol * s *** 5621,5627 **** gfc_add_expr_to_block (&fnblock, tmp); } ! if (sym->attr.allocatable && !sym->attr.save) { tmp = gfc_trans_dealloc_allocated (sym->backend_decl); gfc_add_expr_to_block (&fnblock, tmp); --- 5609,5615 ---- gfc_add_expr_to_block (&fnblock, tmp); } ! if (sym->attr.allocatable && !sym->attr.save && !sym->attr.result) { tmp = gfc_trans_dealloc_allocated (sym->backend_decl); gfc_add_expr_to_block (&fnblock, tmp); diff -Nrcpad gcc-4.3.2/gcc/fortran/trans-decl.c gcc-4.3.3/gcc/fortran/trans-decl.c *** gcc-4.3.2/gcc/fortran/trans-decl.c Sat Apr 19 22:30:03 2008 --- gcc-4.3.3/gcc/fortran/trans-decl.c Tue Dec 23 01:32:33 2008 *************** gfc_init_default_dt (gfc_symbol * sym, t *** 2589,2608 **** } ! /* Initialize INTENT(OUT) derived type dummies. */ static tree init_intent_out_dt (gfc_symbol * proc_sym, tree body) { stmtblock_t fnblock; gfc_formal_arglist *f; gfc_init_block (&fnblock); for (f = proc_sym->formal; f; f = f->next) if (f->sym && f->sym->attr.intent == INTENT_OUT ! && f->sym->ts.type == BT_DERIVED ! && !f->sym->ts.derived->attr.alloc_comp ! && f->sym->value) ! body = gfc_init_default_dt (f->sym, body); gfc_add_expr_to_block (&fnblock, body); return gfc_finish_block (&fnblock); --- 2589,2628 ---- } ! /* Initialize INTENT(OUT) derived type dummies. As well as giving ! them their default initializer, if they do not have allocatable ! components, they have their allocatable components deallocated. */ ! static tree init_intent_out_dt (gfc_symbol * proc_sym, tree body) { stmtblock_t fnblock; gfc_formal_arglist *f; + tree tmp; + tree present; gfc_init_block (&fnblock); for (f = proc_sym->formal; f; f = f->next) if (f->sym && f->sym->attr.intent == INTENT_OUT ! && f->sym->ts.type == BT_DERIVED) ! { ! if (f->sym->ts.derived->attr.alloc_comp) ! { ! tmp = gfc_deallocate_alloc_comp (f->sym->ts.derived, ! f->sym->backend_decl, ! f->sym->as ? f->sym->as->rank : 0); ! ! present = gfc_conv_expr_present (f->sym); ! tmp = build3 (COND_EXPR, TREE_TYPE (tmp), present, ! tmp, build_empty_stmt ()); ! ! gfc_add_expr_to_block (&fnblock, tmp); ! } ! ! if (!f->sym->ts.derived->attr.alloc_comp ! && f->sym->value) ! body = gfc_init_default_dt (f->sym, body); ! } gfc_add_expr_to_block (&fnblock, body); return gfc_finish_block (&fnblock); *************** generate_local_decl (gfc_symbol * sym) *** 2966,2975 **** getting stuck in a circular dependency. */ sym->mark = 1; if (!sym->attr.dummy && !sym->ns->proc_name->attr.entry_master) ! generate_dependency_declarations (sym); if (sym->attr.referenced) ! gfc_get_symbol_decl (sym); /* INTENT(out) dummy arguments are likely meant to be set. */ else if (warn_unused_variable && sym->attr.dummy --- 2986,2995 ---- getting stuck in a circular dependency. */ sym->mark = 1; if (!sym->attr.dummy && !sym->ns->proc_name->attr.entry_master) ! generate_dependency_declarations (sym); if (sym->attr.referenced) ! gfc_get_symbol_decl (sym); /* INTENT(out) dummy arguments are likely meant to be set. */ else if (warn_unused_variable && sym->attr.dummy *************** generate_local_decl (gfc_symbol * sym) *** 3000,3005 **** --- 3020,3038 ---- gfc_get_symbol_decl (sym); } + /* INTENT(out) dummy arguments with allocatable components are reset + by default and need to be set referenced to generate the code for + automatic lengths. */ + if (sym->attr.dummy && !sym->attr.referenced + && sym->ts.type == BT_DERIVED + && sym->ts.derived->attr.alloc_comp + && sym->attr.intent == INTENT_OUT) + { + sym->attr.referenced = 1; + gfc_get_symbol_decl (sym); + } + + /* We do not want the middle-end to warn about unused parameters as this was already done above. */ if (sym->attr.dummy && sym->backend_decl != NULL_TREE) diff -Nrcpad gcc-4.3.2/gcc/fortran/trans-expr.c gcc-4.3.3/gcc/fortran/trans-expr.c *** gcc-4.3.2/gcc/fortran/trans-expr.c Sun Jul 27 11:41:35 2008 --- gcc-4.3.3/gcc/fortran/trans-expr.c Sun Dec 21 15:06:15 2008 *************** gfc_free_interface_mapping (gfc_interfac *** 1421,1426 **** --- 1421,1427 ---- for (sym = mapping->syms; sym; sym = nextsym) { nextsym = sym->next; + sym->new->n.sym->formal = NULL; gfc_free_symbol (sym->new->n.sym); gfc_free_expr (sym->expr); gfc_free (sym->new); *************** gfc_add_interface_mapping (gfc_interface *** 1541,1546 **** --- 1542,1548 ---- /* Create a new symbol to represent the actual argument. */ new_sym = gfc_new_symbol (sym->name, NULL); new_sym->ts = sym->ts; + new_sym->as = gfc_copy_array_spec (sym->as); new_sym->attr.referenced = 1; new_sym->attr.dimension = sym->attr.dimension; new_sym->attr.pointer = sym->attr.pointer; *************** gfc_add_interface_mapping (gfc_interface *** 1548,1553 **** --- 1550,1564 ---- new_sym->attr.flavor = sym->attr.flavor; new_sym->attr.function = sym->attr.function; + /* Ensure that the interface is available and that + descriptors are passed for array actual arguments. */ + if (sym->attr.flavor == FL_PROCEDURE) + { + new_sym->formal = expr->symtree->n.sym->formal; + new_sym->attr.always_explicit + = expr->symtree->n.sym->attr.always_explicit; + } + /* Create a fake symtree for it. */ root = NULL; new_symtree = gfc_new_symtree (&root, sym->name); *************** gfc_finish_interface_mapping (gfc_interf *** 1657,1663 **** gfc_apply_interface_mapping_to_expr (mapping, expr); gfc_init_se (&se, NULL); gfc_conv_expr (&se, expr); ! se.expr = gfc_evaluate_now (se.expr, &se.pre); gfc_add_block_to_block (pre, &se.pre); gfc_add_block_to_block (post, &se.post); --- 1668,1674 ---- gfc_apply_interface_mapping_to_expr (mapping, expr); gfc_init_se (&se, NULL); gfc_conv_expr (&se, expr); ! se.expr = fold_convert (gfc_charlen_type_node, se.expr); se.expr = gfc_evaluate_now (se.expr, &se.pre); gfc_add_block_to_block (pre, &se.pre); gfc_add_block_to_block (post, &se.post); *************** gfc_apply_interface_mapping_to_ref (gfc_ *** 1721,1728 **** /* Convert intrinsic function calls into result expressions. */ static bool ! gfc_map_intrinsic_function (gfc_expr *expr, gfc_interface_mapping * mapping) { gfc_symbol *sym; gfc_expr *new_expr; --- 1732,1740 ---- /* Convert intrinsic function calls into result expressions. */ + static bool ! gfc_map_intrinsic_function (gfc_expr *expr, gfc_interface_mapping *mapping) { gfc_symbol *sym; gfc_expr *new_expr; *************** gfc_map_intrinsic_function (gfc_expr *ex *** 1736,1742 **** else arg2 = NULL; ! sym = arg1->symtree->n.sym; if (sym->attr.dummy) return false; --- 1748,1754 ---- else arg2 = NULL; ! sym = arg1->symtree->n.sym; if (sym->attr.dummy) return false; *************** gfc_map_intrinsic_function (gfc_expr *ex *** 1773,1778 **** --- 1785,1797 ---- for (; d < dup; d++) { gfc_expr *tmp; + + if (!sym->as->upper[d] || !sym->as->lower[d]) + { + gfc_free_expr (new_expr); + return false; + } + tmp = gfc_add (gfc_copy_expr (sym->as->upper[d]), gfc_int_expr (1)); tmp = gfc_subtract (tmp, gfc_copy_expr (sym->as->lower[d])); if (new_expr) *************** gfc_map_intrinsic_function (gfc_expr *ex *** 1798,1806 **** gcc_unreachable (); if (expr->value.function.isym->id == GFC_ISYM_LBOUND) ! new_expr = gfc_copy_expr (sym->as->lower[d]); else ! new_expr = gfc_copy_expr (sym->as->upper[d]); break; default: --- 1817,1831 ---- gcc_unreachable (); if (expr->value.function.isym->id == GFC_ISYM_LBOUND) ! { ! if (sym->as->lower[d]) ! new_expr = gfc_copy_expr (sym->as->lower[d]); ! } else ! { ! if (sym->as->upper[d]) ! new_expr = gfc_copy_expr (sym->as->upper[d]); ! } break; default: *************** gfc_conv_function_call (gfc_se * se, gfc *** 2518,2531 **** gfc_add_block_to_block (&post, &parmse.post); /* Allocated allocatable components of derived types must be ! deallocated for INTENT(OUT) dummy arguments and non-variable ! scalars. Non-variable arrays are dealt with in trans-array.c ! (gfc_conv_array_parameter). */ if (e && e->ts.type == BT_DERIVED && e->ts.derived->attr.alloc_comp ! && ((formal && formal->sym->attr.intent == INTENT_OUT) ! || ! (e->expr_type != EXPR_VARIABLE && !e->rank))) { int parm_rank; tmp = build_fold_indirect_ref (parmse.expr); --- 2543,2553 ---- gfc_add_block_to_block (&post, &parmse.post); /* Allocated allocatable components of derived types must be ! deallocated for non-variable scalars. Non-variable arrays are ! dealt with in trans-array.c(gfc_conv_array_parameter). */ if (e && e->ts.type == BT_DERIVED && e->ts.derived->attr.alloc_comp ! && (e->expr_type != EXPR_VARIABLE && !e->rank)) { int parm_rank; tmp = build_fold_indirect_ref (parmse.expr); *************** gfc_conv_function_call (gfc_se * se, gfc *** 2540,2563 **** case (SCALAR_POINTER): tmp = build_fold_indirect_ref (tmp); break; - case (ARRAY): - tmp = parmse.expr; - break; } ! tmp = gfc_deallocate_alloc_comp (e->ts.derived, tmp, parm_rank); ! if (e->expr_type == EXPR_VARIABLE && e->symtree->n.sym->attr.optional) ! tmp = build3_v (COND_EXPR, gfc_conv_expr_present (e->symtree->n.sym), ! tmp, build_empty_stmt ()); ! ! if (e->expr_type != EXPR_VARIABLE) ! /* Don't deallocate non-variables until they have been used. */ ! gfc_add_expr_to_block (&se->post, tmp); ! else ! { ! gcc_assert (formal && formal->sym->attr.intent == INTENT_OUT); ! gfc_add_expr_to_block (&se->pre, tmp); ! } } /* Character strings are passed as two parameters, a length and a --- 2562,2571 ---- case (SCALAR_POINTER): tmp = build_fold_indirect_ref (tmp); break; } ! tmp = gfc_deallocate_alloc_comp (e->ts.derived, tmp, parm_rank); ! gfc_add_expr_to_block (&se->post, tmp); } /* Character strings are passed as two parameters, a length and a *************** gfc_trans_subcomponent_assign (tree dest *** 3305,3313 **** cm->as->rank); gfc_add_expr_to_block (&block, tmp); - gfc_add_block_to_block (&block, &se.post); ! gfc_conv_descriptor_data_set (&block, se.expr, null_pointer_node); /* Shift the lbound and ubound of temporaries to being unity, rather than zero, based. Calculate the offset for all cases. */ --- 3313,3322 ---- cm->as->rank); gfc_add_expr_to_block (&block, tmp); gfc_add_block_to_block (&block, &se.post); ! ! if (expr->expr_type != EXPR_VARIABLE) ! gfc_conv_descriptor_data_set (&block, se.expr, null_pointer_node); /* Shift the lbound and ubound of temporaries to being unity, rather than zero, based. Calculate the offset for all cases. */ *************** gfc_trans_subcomponent_assign (tree dest *** 3339,3344 **** --- 3348,3382 ---- tmp = fold_build2 (MINUS_EXPR, gfc_array_index_type, offset, tmp2); gfc_add_modify_expr (&block, offset, tmp); } + + if (expr->expr_type == EXPR_FUNCTION + && expr->value.function.isym + && expr->value.function.isym->conversion + && expr->value.function.actual->expr + && expr->value.function.actual->expr->expr_type + == EXPR_VARIABLE) + { + /* If a conversion expression has a null data pointer + argument, nullify the allocatable component. */ + gfc_symbol *s; + tree non_null_expr; + tree null_expr; + s = expr->value.function.actual->expr->symtree->n.sym; + if (s->attr.allocatable || s->attr.pointer) + { + non_null_expr = gfc_finish_block (&block); + gfc_start_block (&block); + gfc_conv_descriptor_data_set (&block, dest, + null_pointer_node); + null_expr = gfc_finish_block (&block); + tmp = gfc_conv_descriptor_data_get (s->backend_decl); + tmp = build2 (EQ_EXPR, boolean_type_node, tmp, + fold_convert (TREE_TYPE (tmp), + null_pointer_node)); + return build3_v (COND_EXPR, tmp, null_expr, + non_null_expr); + } + } } else { *************** gfc_trans_subcomponent_assign (tree dest *** 3352,3359 **** --- 3390,3399 ---- { gfc_init_se (&se, NULL); gfc_conv_expr (&se, expr); + gfc_add_block_to_block (&block, &se.pre); gfc_add_modify_expr (&block, dest, fold_convert (TREE_TYPE (dest), se.expr)); + gfc_add_block_to_block (&block, &se.post); } else { *************** gfc_trans_structure_assign (tree dest, g *** 3395,3415 **** { /* Skip absent members in default initializers. */ if (!c->expr) ! continue; - /* Update the type/kind of the expression if it represents either - C_NULL_PTR or C_NULL_FUNPTR. This is done here because this may - be the first place reached for initializing output variables that - have components of type C_PTR/C_FUNPTR that are initialized. */ - if (c->expr->ts.type == BT_DERIVED && c->expr->ts.derived - && c->expr->ts.derived->attr.is_iso_c) - { - c->expr->expr_type = EXPR_NULL; - c->expr->ts.type = c->expr->ts.derived->ts.type; - c->expr->ts.f90_type = c->expr->ts.derived->ts.f90_type; - c->expr->ts.kind = c->expr->ts.derived->ts.kind; - } - field = cm->backend_decl; tmp = build3 (COMPONENT_REF, TREE_TYPE (field), dest, field, NULL_TREE); tmp = gfc_trans_subcomponent_assign (tmp, cm, c->expr); --- 3435,3442 ---- { /* Skip absent members in default initializers. */ if (!c->expr) ! continue; field = cm->backend_decl; tmp = build3 (COMPONENT_REF, TREE_TYPE (field), dest, field, NULL_TREE); tmp = gfc_trans_subcomponent_assign (tmp, cm, c->expr); *************** gfc_trans_arrayfunc_assign (gfc_expr * e *** 3974,3980 **** /* Check for a dependency. */ if (gfc_check_fncall_dependency (expr1, INTENT_OUT, expr2->value.function.esym, ! expr2->value.function.actual)) return NULL; /* The frontend doesn't seem to bother filling in expr->symtree for intrinsic --- 4001,4008 ---- /* Check for a dependency. */ if (gfc_check_fncall_dependency (expr1, INTENT_OUT, expr2->value.function.esym, ! expr2->value.function.actual, ! NOT_ELEMENTAL)) return NULL; /* The frontend doesn't seem to bother filling in expr->symtree for intrinsic *************** gfc_trans_assignment_1 (gfc_expr * expr1 *** 4218,4223 **** --- 4246,4252 ---- stmtblock_t block; stmtblock_t body; bool l_is_temp; + bool scalar_to_array; /* Assignment of the form lhs = rhs. */ gfc_start_block (&block); *************** gfc_trans_assignment_1 (gfc_expr * expr1 *** 4301,4309 **** else gfc_conv_expr (&lse, expr1); tmp = gfc_trans_scalar_assign (&lse, &rse, expr1->ts, l_is_temp || init_flag, ! expr2->expr_type == EXPR_VARIABLE); gfc_add_expr_to_block (&body, tmp); if (lss == gfc_ss_terminator) --- 4330,4353 ---- else gfc_conv_expr (&lse, expr1); + /* Assignments of scalar derived types with allocatable components + to arrays must be done with a deep copy and the rhs temporary + must have its components deallocated afterwards. */ + scalar_to_array = (expr2->ts.type == BT_DERIVED + && expr2->ts.derived->attr.alloc_comp + && expr2->expr_type != EXPR_VARIABLE + && !gfc_is_constant_expr (expr2) + && expr1->rank && !expr2->rank); + if (scalar_to_array) + { + tmp = gfc_deallocate_alloc_comp (expr2->ts.derived, rse.expr, 0); + gfc_add_expr_to_block (&loop.post, tmp); + } + tmp = gfc_trans_scalar_assign (&lse, &rse, expr1->ts, l_is_temp || init_flag, ! (expr2->expr_type == EXPR_VARIABLE) ! || scalar_to_array); gfc_add_expr_to_block (&body, tmp); if (lss == gfc_ss_terminator) diff -Nrcpad gcc-4.3.2/gcc/fortran/trans-stmt.c gcc-4.3.3/gcc/fortran/trans-stmt.c *** gcc-4.3.2/gcc/fortran/trans-stmt.c Sat May 17 07:10:13 2008 --- gcc-4.3.3/gcc/fortran/trans-stmt.c Wed Jan 14 20:53:18 2009 *************** gfc_trans_entry (gfc_code * code) *** 200,206 **** can be used, as is, to copy the result back to the variable. */ static void gfc_conv_elemental_dependencies (gfc_se * se, gfc_se * loopse, ! gfc_symbol * sym, gfc_actual_arglist * arg) { gfc_actual_arglist *arg0; gfc_expr *e; --- 200,207 ---- can be used, as is, to copy the result back to the variable. */ static void gfc_conv_elemental_dependencies (gfc_se * se, gfc_se * loopse, ! gfc_symbol * sym, gfc_actual_arglist * arg, ! gfc_dep_check check_variable) { gfc_actual_arglist *arg0; gfc_expr *e; *************** gfc_conv_elemental_dependencies (gfc_se *** 248,254 **** && e->rank && fsym && fsym->attr.intent != INTENT_IN && gfc_check_fncall_dependency (e, fsym->attr.intent, ! sym, arg0)) { /* Make a local loopinfo for the temporary creation, so that none of the other ss->info's have to be renormalized. */ --- 249,255 ---- && e->rank && fsym && fsym->attr.intent != INTENT_IN && gfc_check_fncall_dependency (e, fsym->attr.intent, ! sym, arg0, check_variable)) { /* Make a local loopinfo for the temporary creation, so that none of the other ss->info's have to be renormalized. */ *************** gfc_trans_call (gfc_code * code, bool de *** 312,317 **** --- 313,319 ---- gfc_se se; gfc_ss * ss; int has_alternate_specifier; + gfc_dep_check check_variable; /* A CALL starts a new block because the actual arguments may have to be evaluated first. */ *************** gfc_trans_call (gfc_code * code, bool de *** 363,368 **** --- 365,371 ---- stmtblock_t body; stmtblock_t block; gfc_se loopse; + gfc_se depse; /* gfc_walk_elemental_function_args renders the ss chain in the reverse order to the actual argument order. */ *************** gfc_trans_call (gfc_code * code, bool de *** 374,379 **** --- 377,386 ---- gfc_add_ss_to_loop (&loop, ss); gfc_conv_ss_startstride (&loop); + /* TODO: gfc_conv_loop_setup generates a temporary for vector + subscripts. This could be prevented in the elemental case + as temporaries are handled separatedly + (below in gfc_conv_elemental_dependencies). */ gfc_conv_loop_setup (&loop); gfc_mark_ss_chain_used (ss, 1); *************** gfc_trans_call (gfc_code * code, bool de *** 383,394 **** /* For operator assignment, do dependency checking. */ if (dependency_check) ! { ! gfc_symbol *sym; ! sym = code->resolved_sym; ! gfc_conv_elemental_dependencies (&se, &loopse, sym, ! code->ext.actual); ! } /* Generate the loop body. */ gfc_start_scalarized_body (&loop, &body); --- 390,405 ---- /* For operator assignment, do dependency checking. */ if (dependency_check) ! check_variable = ELEM_CHECK_VARIABLE; ! else ! check_variable = ELEM_DONT_CHECK_VARIABLE; ! ! gfc_init_se (&depse, NULL); ! gfc_conv_elemental_dependencies (&depse, &loopse, code->resolved_sym, ! code->ext.actual, check_variable); ! ! gfc_add_block_to_block (&loop.pre, &depse.pre); ! gfc_add_block_to_block (&loop.post, &depse.post); /* Generate the loop body. */ gfc_start_scalarized_body (&loop, &body); diff -Nrcpad gcc-4.3.2/libgfortran/ChangeLog gcc-4.3.3/libgfortran/ChangeLog *** gcc-4.3.2/libgfortran/ChangeLog Wed Aug 27 18:03:44 2008 --- gcc-4.3.3/libgfortran/ChangeLog Sat Jan 24 10:16:47 2009 *************** *** 1,3 **** --- 1,60 ---- + 2009-01-24 Release Manager + + * GCC 4.3.3 released. + + 2008-12-31 John David Anglin + + PR fortran/31832 + * acinclude.m4 (LIBGFOR_CHECK_FOR_BROKEN_POWF): New autoconf check for + broken powf. + * configure.ac (LIBGFOR_CHECK_FOR_BROKEN_POWF): Use it. + * intrinsics/c99_functions.c: Use internal powf implementation if + HAVE_BROKEN_POWF is defined. + * configure: Rebuilt. + * config.h.in: Rebuilt. + + 2008-11-23 Thomas Koenig + + PR libfortran/38135 + Backport from trunk. + * m4/reshape.m4: Tread PAD as if it were SOURCE when SOURCE + is empty. + * intrinsics/reshape_generic.c: Likewise. + * generated/reshape_c10.c Regenerated. + * generated/reshape_c16.c Regenerated. + * generated/reshape_c4.c Regenerated. + * generated/reshape_c8.c Regenerated. + * generated/reshape_i16.c Regenerated. + * generated/reshape_i4.c Regenerated. + * generated/reshape_i8.c Regenerated. + * generated/reshape_r10.c Regenerated. + * generated/reshape_r16.c Regenerated. + * generated/reshape_r4.c Regenerated. + * generated/reshape_r8.c Regenerated. + + 2008-10-28 Jerry DeLisle + + PR libfortran/37707 + Backport from trunk. + * io/list_read.c (read_character): Remove code to look ahead in namelist + reads to descriminate non-delimited strings from namelist objects. + * io/write.c (namelist_write): Delimit character strings with quote or + apostrophe, defaulting to quote. + + 2008-10-19 Jerry DeLisle &2 { (exit 1); exit 1; }; } --- 867,879 ---- /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` srcdir=$ac_confdir ! if test ! -r $srcdir/$ac_unique_file; then srcdir=.. fi else ac_srcdir_defaulted=no fi ! if test ! -r $srcdir/$ac_unique_file; then if test "$ac_srcdir_defaulted" = yes; then { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 { (exit 1); exit 1; }; } *************** if test ! -r "$srcdir/$ac_unique_file"; *** 882,888 **** { (exit 1); exit 1; }; } fi fi ! (cd $srcdir && test -r "./$ac_unique_file") 2>/dev/null || { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 { (exit 1); exit 1; }; } srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` --- 882,888 ---- { (exit 1); exit 1; }; } fi fi ! (cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 { (exit 1); exit 1; }; } srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` *************** cat >>confdefs.h <<\_ACEOF *** 32363,32368 **** --- 32363,32392 ---- _ACEOF fi + + + # Check for a broken powf implementation + + echo "$as_me:$LINENO: checking whether powf is broken" >&5 + echo $ECHO_N "checking whether powf is broken... $ECHO_C" >&6 + if test "${libgfor_cv_have_broken_powf+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + + case "${target}" in + hppa*64*-*-hpux*) libgfor_cv_have_broken_powf=yes ;; + *) libgfor_cv_have_broken_powf=no;; + esac + fi + echo "$as_me:$LINENO: result: $libgfor_cv_have_broken_powf" >&5 + echo "${ECHO_T}$libgfor_cv_have_broken_powf" >&6 + if test x"$libgfor_cv_have_broken_powf" = xyes; then + + cat >>confdefs.h <<\_ACEOF + #define HAVE_BROKEN_POWF 1 + _ACEOF + + fi # Check for GNU libc feenableexcept diff -Nrcpad gcc-4.3.2/libgfortran/configure.ac gcc-4.3.3/libgfortran/configure.ac *** gcc-4.3.2/libgfortran/configure.ac Fri Nov 16 22:31:28 2007 --- gcc-4.3.3/libgfortran/configure.ac Wed Dec 31 15:42:12 2008 *************** LIBGFOR_CHECK_WORKING_STAT *** 404,409 **** --- 404,412 ---- # Check whether __mingw_snprintf() is present LIBGFOR_CHECK_MINGW_SNPRINTF + # Check for a broken powf implementation + LIBGFOR_CHECK_FOR_BROKEN_POWF + # Check for GNU libc feenableexcept AC_CHECK_LIB([m],[feenableexcept],[have_feenableexcept=yes AC_DEFINE([HAVE_FEENABLEEXCEPT],[1],[libm includes feenableexcept])]) diff -Nrcpad gcc-4.3.2/libgfortran/generated/reshape_c10.c gcc-4.3.3/libgfortran/generated/reshape_c10.c *** gcc-4.3.2/libgfortran/generated/reshape_c10.c Fri Aug 31 14:01:34 2007 --- gcc-4.3.3/libgfortran/generated/reshape_c10.c Sun Nov 23 15:08:32 2008 *************** reshape_c10 (gfc_array_c10 * const restr *** 197,212 **** if (sempty) { ! /* Switch immediately to the pad array. */ src = pptr; ! sptr = NULL; sdim = pdim; for (dim = 0; dim < pdim; dim++) { scount[dim] = pcount[dim]; sextent[dim] = pextent[dim]; sstride[dim] = pstride[dim]; ! sstride0 = sstride[0] * sizeof (GFC_COMPLEX_10); } } --- 197,212 ---- if (sempty) { ! /* Pretend we are using the pad array the first time around, too. */ src = pptr; ! sptr = pptr; sdim = pdim; for (dim = 0; dim < pdim; dim++) { scount[dim] = pcount[dim]; sextent[dim] = pextent[dim]; sstride[dim] = pstride[dim]; ! sstride0 = pstride[0]; } } diff -Nrcpad gcc-4.3.2/libgfortran/generated/reshape_c16.c gcc-4.3.3/libgfortran/generated/reshape_c16.c *** gcc-4.3.2/libgfortran/generated/reshape_c16.c Fri Aug 31 14:01:34 2007 --- gcc-4.3.3/libgfortran/generated/reshape_c16.c Sun Nov 23 15:08:32 2008 *************** reshape_c16 (gfc_array_c16 * const restr *** 197,212 **** if (sempty) { ! /* Switch immediately to the pad array. */ src = pptr; ! sptr = NULL; sdim = pdim; for (dim = 0; dim < pdim; dim++) { scount[dim] = pcount[dim]; sextent[dim] = pextent[dim]; sstride[dim] = pstride[dim]; ! sstride0 = sstride[0] * sizeof (GFC_COMPLEX_16); } } --- 197,212 ---- if (sempty) { ! /* Pretend we are using the pad array the first time around, too. */ src = pptr; ! sptr = pptr; sdim = pdim; for (dim = 0; dim < pdim; dim++) { scount[dim] = pcount[dim]; sextent[dim] = pextent[dim]; sstride[dim] = pstride[dim]; ! sstride0 = pstride[0]; } } diff -Nrcpad gcc-4.3.2/libgfortran/generated/reshape_c4.c gcc-4.3.3/libgfortran/generated/reshape_c4.c *** gcc-4.3.2/libgfortran/generated/reshape_c4.c Fri Aug 31 14:01:34 2007 --- gcc-4.3.3/libgfortran/generated/reshape_c4.c Sun Nov 23 15:08:32 2008 *************** reshape_c4 (gfc_array_c4 * const restric *** 197,212 **** if (sempty) { ! /* Switch immediately to the pad array. */ src = pptr; ! sptr = NULL; sdim = pdim; for (dim = 0; dim < pdim; dim++) { scount[dim] = pcount[dim]; sextent[dim] = pextent[dim]; sstride[dim] = pstride[dim]; ! sstride0 = sstride[0] * sizeof (GFC_COMPLEX_4); } } --- 197,212 ---- if (sempty) { ! /* Pretend we are using the pad array the first time around, too. */ src = pptr; ! sptr = pptr; sdim = pdim; for (dim = 0; dim < pdim; dim++) { scount[dim] = pcount[dim]; sextent[dim] = pextent[dim]; sstride[dim] = pstride[dim]; ! sstride0 = pstride[0]; } } diff -Nrcpad gcc-4.3.2/libgfortran/generated/reshape_c8.c gcc-4.3.3/libgfortran/generated/reshape_c8.c *** gcc-4.3.2/libgfortran/generated/reshape_c8.c Fri Aug 31 14:01:34 2007 --- gcc-4.3.3/libgfortran/generated/reshape_c8.c Sun Nov 23 15:08:32 2008 *************** reshape_c8 (gfc_array_c8 * const restric *** 197,212 **** if (sempty) { ! /* Switch immediately to the pad array. */ src = pptr; ! sptr = NULL; sdim = pdim; for (dim = 0; dim < pdim; dim++) { scount[dim] = pcount[dim]; sextent[dim] = pextent[dim]; sstride[dim] = pstride[dim]; ! sstride0 = sstride[0] * sizeof (GFC_COMPLEX_8); } } --- 197,212 ---- if (sempty) { ! /* Pretend we are using the pad array the first time around, too. */ src = pptr; ! sptr = pptr; sdim = pdim; for (dim = 0; dim < pdim; dim++) { scount[dim] = pcount[dim]; sextent[dim] = pextent[dim]; sstride[dim] = pstride[dim]; ! sstride0 = pstride[0]; } } diff -Nrcpad gcc-4.3.2/libgfortran/generated/reshape_i16.c gcc-4.3.3/libgfortran/generated/reshape_i16.c *** gcc-4.3.2/libgfortran/generated/reshape_i16.c Fri Aug 31 14:01:34 2007 --- gcc-4.3.3/libgfortran/generated/reshape_i16.c Sun Nov 23 15:08:32 2008 *************** reshape_16 (gfc_array_i16 * const restri *** 197,212 **** if (sempty) { ! /* Switch immediately to the pad array. */ src = pptr; ! sptr = NULL; sdim = pdim; for (dim = 0; dim < pdim; dim++) { scount[dim] = pcount[dim]; sextent[dim] = pextent[dim]; sstride[dim] = pstride[dim]; ! sstride0 = sstride[0] * sizeof (GFC_INTEGER_16); } } --- 197,212 ---- if (sempty) { ! /* Pretend we are using the pad array the first time around, too. */ src = pptr; ! sptr = pptr; sdim = pdim; for (dim = 0; dim < pdim; dim++) { scount[dim] = pcount[dim]; sextent[dim] = pextent[dim]; sstride[dim] = pstride[dim]; ! sstride0 = pstride[0]; } } diff -Nrcpad gcc-4.3.2/libgfortran/generated/reshape_i4.c gcc-4.3.3/libgfortran/generated/reshape_i4.c *** gcc-4.3.2/libgfortran/generated/reshape_i4.c Fri Aug 31 14:01:34 2007 --- gcc-4.3.3/libgfortran/generated/reshape_i4.c Sun Nov 23 15:08:32 2008 *************** reshape_4 (gfc_array_i4 * const restrict *** 197,212 **** if (sempty) { ! /* Switch immediately to the pad array. */ src = pptr; ! sptr = NULL; sdim = pdim; for (dim = 0; dim < pdim; dim++) { scount[dim] = pcount[dim]; sextent[dim] = pextent[dim]; sstride[dim] = pstride[dim]; ! sstride0 = sstride[0] * sizeof (GFC_INTEGER_4); } } --- 197,212 ---- if (sempty) { ! /* Pretend we are using the pad array the first time around, too. */ src = pptr; ! sptr = pptr; sdim = pdim; for (dim = 0; dim < pdim; dim++) { scount[dim] = pcount[dim]; sextent[dim] = pextent[dim]; sstride[dim] = pstride[dim]; ! sstride0 = pstride[0]; } } diff -Nrcpad gcc-4.3.2/libgfortran/generated/reshape_i8.c gcc-4.3.3/libgfortran/generated/reshape_i8.c *** gcc-4.3.2/libgfortran/generated/reshape_i8.c Fri Aug 31 14:01:34 2007 --- gcc-4.3.3/libgfortran/generated/reshape_i8.c Sun Nov 23 15:08:32 2008 *************** reshape_8 (gfc_array_i8 * const restrict *** 197,212 **** if (sempty) { ! /* Switch immediately to the pad array. */ src = pptr; ! sptr = NULL; sdim = pdim; for (dim = 0; dim < pdim; dim++) { scount[dim] = pcount[dim]; sextent[dim] = pextent[dim]; sstride[dim] = pstride[dim]; ! sstride0 = sstride[0] * sizeof (GFC_INTEGER_8); } } --- 197,212 ---- if (sempty) { ! /* Pretend we are using the pad array the first time around, too. */ src = pptr; ! sptr = pptr; sdim = pdim; for (dim = 0; dim < pdim; dim++) { scount[dim] = pcount[dim]; sextent[dim] = pextent[dim]; sstride[dim] = pstride[dim]; ! sstride0 = pstride[0]; } } diff -Nrcpad gcc-4.3.2/libgfortran/generated/reshape_r10.c gcc-4.3.3/libgfortran/generated/reshape_r10.c *** gcc-4.3.2/libgfortran/generated/reshape_r10.c Fri Aug 31 14:01:34 2007 --- gcc-4.3.3/libgfortran/generated/reshape_r10.c Sun Nov 23 15:08:32 2008 *************** reshape_r10 (gfc_array_r10 * const restr *** 197,212 **** if (sempty) { ! /* Switch immediately to the pad array. */ src = pptr; ! sptr = NULL; sdim = pdim; for (dim = 0; dim < pdim; dim++) { scount[dim] = pcount[dim]; sextent[dim] = pextent[dim]; sstride[dim] = pstride[dim]; ! sstride0 = sstride[0] * sizeof (GFC_REAL_10); } } --- 197,212 ---- if (sempty) { ! /* Pretend we are using the pad array the first time around, too. */ src = pptr; ! sptr = pptr; sdim = pdim; for (dim = 0; dim < pdim; dim++) { scount[dim] = pcount[dim]; sextent[dim] = pextent[dim]; sstride[dim] = pstride[dim]; ! sstride0 = pstride[0]; } } diff -Nrcpad gcc-4.3.2/libgfortran/generated/reshape_r16.c gcc-4.3.3/libgfortran/generated/reshape_r16.c *** gcc-4.3.2/libgfortran/generated/reshape_r16.c Fri Aug 31 14:01:34 2007 --- gcc-4.3.3/libgfortran/generated/reshape_r16.c Sun Nov 23 15:08:32 2008 *************** reshape_r16 (gfc_array_r16 * const restr *** 197,212 **** if (sempty) { ! /* Switch immediately to the pad array. */ src = pptr; ! sptr = NULL; sdim = pdim; for (dim = 0; dim < pdim; dim++) { scount[dim] = pcount[dim]; sextent[dim] = pextent[dim]; sstride[dim] = pstride[dim]; ! sstride0 = sstride[0] * sizeof (GFC_REAL_16); } } --- 197,212 ---- if (sempty) { ! /* Pretend we are using the pad array the first time around, too. */ src = pptr; ! sptr = pptr; sdim = pdim; for (dim = 0; dim < pdim; dim++) { scount[dim] = pcount[dim]; sextent[dim] = pextent[dim]; sstride[dim] = pstride[dim]; ! sstride0 = pstride[0]; } } diff -Nrcpad gcc-4.3.2/libgfortran/generated/reshape_r4.c gcc-4.3.3/libgfortran/generated/reshape_r4.c *** gcc-4.3.2/libgfortran/generated/reshape_r4.c Fri Aug 31 14:01:34 2007 --- gcc-4.3.3/libgfortran/generated/reshape_r4.c Sun Nov 23 15:08:32 2008 *************** reshape_r4 (gfc_array_r4 * const restric *** 197,212 **** if (sempty) { ! /* Switch immediately to the pad array. */ src = pptr; ! sptr = NULL; sdim = pdim; for (dim = 0; dim < pdim; dim++) { scount[dim] = pcount[dim]; sextent[dim] = pextent[dim]; sstride[dim] = pstride[dim]; ! sstride0 = sstride[0] * sizeof (GFC_REAL_4); } } --- 197,212 ---- if (sempty) { ! /* Pretend we are using the pad array the first time around, too. */ src = pptr; ! sptr = pptr; sdim = pdim; for (dim = 0; dim < pdim; dim++) { scount[dim] = pcount[dim]; sextent[dim] = pextent[dim]; sstride[dim] = pstride[dim]; ! sstride0 = pstride[0]; } } diff -Nrcpad gcc-4.3.2/libgfortran/generated/reshape_r8.c gcc-4.3.3/libgfortran/generated/reshape_r8.c *** gcc-4.3.2/libgfortran/generated/reshape_r8.c Fri Aug 31 14:01:34 2007 --- gcc-4.3.3/libgfortran/generated/reshape_r8.c Sun Nov 23 15:08:32 2008 *************** reshape_r8 (gfc_array_r8 * const restric *** 197,212 **** if (sempty) { ! /* Switch immediately to the pad array. */ src = pptr; ! sptr = NULL; sdim = pdim; for (dim = 0; dim < pdim; dim++) { scount[dim] = pcount[dim]; sextent[dim] = pextent[dim]; sstride[dim] = pstride[dim]; ! sstride0 = sstride[0] * sizeof (GFC_REAL_8); } } --- 197,212 ---- if (sempty) { ! /* Pretend we are using the pad array the first time around, too. */ src = pptr; ! sptr = pptr; sdim = pdim; for (dim = 0; dim < pdim; dim++) { scount[dim] = pcount[dim]; sextent[dim] = pextent[dim]; sstride[dim] = pstride[dim]; ! sstride0 = pstride[0]; } } diff -Nrcpad gcc-4.3.2/libgfortran/intrinsics/c99_functions.c gcc-4.3.3/libgfortran/intrinsics/c99_functions.c *** gcc-4.3.2/libgfortran/intrinsics/c99_functions.c Fri Nov 16 22:31:28 2007 --- gcc-4.3.3/libgfortran/intrinsics/c99_functions.c Wed Dec 31 15:42:12 2008 *************** nextafterf(float x, float y) *** 491,498 **** --- 491,500 ---- #endif + #if !defined(HAVE_POWF) || defined(HAVE_BROKEN_POWF) #ifndef HAVE_POWF #define HAVE_POWF 1 + #endif float powf(float x, float y) { diff -Nrcpad gcc-4.3.2/libgfortran/intrinsics/reshape_generic.c gcc-4.3.3/libgfortran/intrinsics/reshape_generic.c *** gcc-4.3.2/libgfortran/intrinsics/reshape_generic.c Fri Aug 31 14:01:34 2007 --- gcc-4.3.3/libgfortran/intrinsics/reshape_generic.c Sun Nov 23 15:08:32 2008 *************** reshape_internal (parray *ret, parray *s *** 185,200 **** if (sempty) { ! /* Switch immediately to the pad array. */ src = pptr; ! sptr = NULL; sdim = pdim; for (dim = 0; dim < pdim; dim++) { scount[dim] = pcount[dim]; sextent[dim] = pextent[dim]; sstride[dim] = pstride[dim]; ! sstride0 = sstride[0] * size; } } --- 185,200 ---- if (sempty) { ! /* Pretend we are using the pad array the first time around, too. */ src = pptr; ! sptr = pptr; sdim = pdim; for (dim = 0; dim < pdim; dim++) { scount[dim] = pcount[dim]; sextent[dim] = pextent[dim]; sstride[dim] = pstride[dim]; ! sstride0 = pstride[0] * size; } } diff -Nrcpad gcc-4.3.2/libgfortran/io/list_read.c gcc-4.3.3/libgfortran/io/list_read.c *** gcc-4.3.2/libgfortran/io/list_read.c Sat Jul 26 12:57:06 2008 --- gcc-4.3.3/libgfortran/io/list_read.c Wed Oct 29 04:44:15 2008 *************** read_character (st_parameter_dt *dtp, in *** 937,988 **** default: if (dtp->u.p.namelist_mode) { ! if (dtp->u.p.current_unit->flags.delim == DELIM_APOSTROPHE ! || dtp->u.p.current_unit->flags.delim == DELIM_QUOTE ! || c == '&' || c == '$' || c == '/') ! { ! unget_char (dtp, c); ! return; ! } ! ! /* Check to see if we are seeing a namelist object name by using the ! line buffer and looking ahead for an '=' or '('. */ ! l_push_char (dtp, c); ! ! int i; ! for(i = 0; i < 63; i++) ! { ! c = next_char (dtp); ! if (is_separator(c)) ! { ! unget_char (dtp, c); ! eat_separator (dtp); ! c = next_char (dtp); ! if (c != '=') ! { ! l_push_char (dtp, c); ! dtp->u.p.item_count = 0; ! dtp->u.p.line_buffer_enabled = 1; ! goto get_string; ! } ! } ! ! l_push_char (dtp, c); ! ! if (c == '=' || c == '(') ! { ! dtp->u.p.item_count = 0; ! dtp->u.p.nml_read_error = 1; ! dtp->u.p.line_buffer_enabled = 1; ! return; ! } ! } ! ! /* The string is too long to be a valid object name so assume that it ! is a string to be read in as a value. */ ! dtp->u.p.item_count = 0; ! dtp->u.p.line_buffer_enabled = 1; ! goto get_string; } push_char (dtp, c); --- 937,944 ---- default: if (dtp->u.p.namelist_mode) { ! unget_char (dtp, c); ! return; } push_char (dtp, c); *************** get_name: *** 2823,2828 **** --- 2779,2787 ---- goto nml_err_ret; } + if (first_nl != NULL && first_nl->var_rank > 0) + nl = first_nl; + if (nml_read_obj (dtp, nl, 0, pprev_nl, nml_err_msg, nml_err_msg_size, clow, chigh) == FAILURE) goto nml_err_ret; diff -Nrcpad gcc-4.3.2/libgfortran/io/write.c gcc-4.3.3/libgfortran/io/write.c *** gcc-4.3.2/libgfortran/io/write.c Fri Jan 18 21:43:08 2008 --- gcc-4.3.3/libgfortran/io/write.c Wed Oct 29 04:44:15 2008 *************** namelist_write (st_parameter_dt *dtp) *** 1133,1152 **** /* Set the delimiter for namelist output. */ tmp_delim = dtp->u.p.current_unit->flags.delim; - switch (tmp_delim) - { - case (DELIM_QUOTE): - dtp->u.p.nml_delim = '"'; - break; - - case (DELIM_APOSTROPHE): - dtp->u.p.nml_delim = '\''; - break; ! default: ! dtp->u.p.nml_delim = '\0'; ! break; ! } /* Temporarily disable namelist delimters. */ dtp->u.p.current_unit->flags.delim = DELIM_NONE; --- 1133,1140 ---- /* Set the delimiter for namelist output. */ tmp_delim = dtp->u.p.current_unit->flags.delim; ! dtp->u.p.nml_delim = tmp_delim == DELIM_APOSTROPHE ? '\'' : '"'; /* Temporarily disable namelist delimters. */ dtp->u.p.current_unit->flags.delim = DELIM_NONE; diff -Nrcpad gcc-4.3.2/libgfortran/io/write_float.def gcc-4.3.3/libgfortran/io/write_float.def *** gcc-4.3.2/libgfortran/io/write_float.def Wed Sep 5 00:51:18 2007 --- gcc-4.3.3/libgfortran/io/write_float.def Sun Oct 19 15:28:25 2008 *************** sprintf (buffer, "%+-#" STR(MIN_FIELD_WI *** 728,734 **** if (tmp < 0.5)\ tmp = 0.0;\ else if (tmp < 1.0)\ ! tmp = tmp + 0.5;\ }\ zero_flag = (tmp == 0.0);\ \ --- 728,734 ---- if (tmp < 0.5)\ tmp = 0.0;\ else if (tmp < 1.0)\ ! tmp = 1.0;\ }\ zero_flag = (tmp == 0.0);\ \ diff -Nrcpad gcc-4.3.2/libgfortran/m4/reshape.m4 gcc-4.3.3/libgfortran/m4/reshape.m4 *** gcc-4.3.2/libgfortran/m4/reshape.m4 Fri Aug 31 14:01:34 2007 --- gcc-4.3.3/libgfortran/m4/reshape.m4 Sun Nov 23 15:08:32 2008 *************** reshape_'rtype_ccode` ('rtype` * const r *** 201,216 **** if (sempty) { ! /* Switch immediately to the pad array. */ src = pptr; ! sptr = NULL; sdim = pdim; for (dim = 0; dim < pdim; dim++) { scount[dim] = pcount[dim]; sextent[dim] = pextent[dim]; sstride[dim] = pstride[dim]; ! sstride0 = sstride[0] * sizeof ('rtype_name`); } } --- 201,216 ---- if (sempty) { ! /* Pretend we are using the pad array the first time around, too. */ src = pptr; ! sptr = pptr; sdim = pdim; for (dim = 0; dim < pdim; dim++) { scount[dim] = pcount[dim]; sextent[dim] = pextent[dim]; sstride[dim] = pstride[dim]; ! sstride0 = pstride[0]; } }