fmt_g0_3.f08: Fix typo in expected error message.
gcc/testsuite/ * gfortran.dg/fmt_g0_3.f08: Fix typo in expected error message. gcc/fortran/ * expr.c (gfc_check_pointer_assign): Fix typo in string. * io.c (check_format): Fix typo in string. Fix comment typos. * parse.c (gfc_global_used): Likewise. * resolve.c (resolve_allocate_expr): Likewise. * symbol.c (gfc_set_default_type): Likewise. * arith.c: Fix typos in comments. * array.c: Likewise. * data.c: Likewise. * decl.c: Likewise. * dependency.c: Likewise. * f95-lang.c: Likewise. * gfortran.h: Likewise. * matchexp.c: Likewise. * module.c: Likewise. * primary.c: Likewise. * scanner.c: Likewise. * trans-array.c: Likewise. * trans-common.c: Likewise. * trans-decl.c: Likewise. * trans-expr.c: Likewise. * trans-intrinsic.c: Likewise. * trans-types.c: Likewise. * trans.c: Likewise. * trans.h: Likewise. From-SVN: r138040
This commit is contained in:
parent
2e76288428
commit
df2fba9e34
@ -1,3 +1,30 @@
|
||||
2008-07-21 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
|
||||
|
||||
* expr.c (gfc_check_pointer_assign): Fix typo in string.
|
||||
* io.c (check_format): Fix typo in string. Fix comment typos.
|
||||
* parse.c (gfc_global_used): Likewise.
|
||||
* resolve.c (resolve_allocate_expr): Likewise.
|
||||
* symbol.c (gfc_set_default_type): Likewise.
|
||||
* arith.c: Fix typos in comments.
|
||||
* array.c: Likewise.
|
||||
* data.c: Likewise.
|
||||
* decl.c: Likewise.
|
||||
* dependency.c: Likewise.
|
||||
* f95-lang.c: Likewise.
|
||||
* gfortran.h: Likewise.
|
||||
* matchexp.c: Likewise.
|
||||
* module.c: Likewise.
|
||||
* primary.c: Likewise.
|
||||
* scanner.c: Likewise.
|
||||
* trans-array.c: Likewise.
|
||||
* trans-common.c: Likewise.
|
||||
* trans-decl.c: Likewise.
|
||||
* trans-expr.c: Likewise.
|
||||
* trans-intrinsic.c: Likewise.
|
||||
* trans-types.c: Likewise.
|
||||
* trans.c: Likewise.
|
||||
* trans.h: Likewise.
|
||||
|
||||
2008-07-19 Tobias Burnus <burnus@net-b.de>
|
||||
|
||||
PR fortran/36795
|
||||
|
@ -1092,7 +1092,7 @@ gfc_arith_concat (gfc_expr *op1, gfc_expr *op2, gfc_expr **resultp)
|
||||
}
|
||||
|
||||
/* Comparison between real values; returns 0 if (op1 .op. op2) is true.
|
||||
This function mimics mpr_cmp but takes NaN into account. */
|
||||
This function mimics mpfr_cmp but takes NaN into account. */
|
||||
|
||||
static int
|
||||
compare_real (gfc_expr *op1, gfc_expr *op2, gfc_intrinsic_op op)
|
||||
@ -1159,7 +1159,7 @@ gfc_compare_expr (gfc_expr *op1, gfc_expr *op2, gfc_intrinsic_op op)
|
||||
|
||||
|
||||
/* Compare a pair of complex numbers. Naturally, this is only for
|
||||
equality and nonequality. */
|
||||
equality and inequality. */
|
||||
|
||||
static int
|
||||
compare_complex (gfc_expr *op1, gfc_expr *op2)
|
||||
@ -2084,7 +2084,7 @@ arith_error (arith rc, gfc_typespec *from, gfc_typespec *to, locus *where)
|
||||
gfc_internal_error ("gfc_arith_error(): Bad error code");
|
||||
}
|
||||
|
||||
/* TODO: Do something about the error, ie, throw exception, return
|
||||
/* TODO: Do something about the error, i.e., throw exception, return
|
||||
NaN, etc. */
|
||||
}
|
||||
|
||||
|
@ -1577,7 +1577,7 @@ resolve_array_list (gfc_constructor *p)
|
||||
}
|
||||
|
||||
/* Resolve character array constructor. If it has a specified constant character
|
||||
length, pad/trunkate the elements here; if the length is not specified and
|
||||
length, pad/truncate the elements here; if the length is not specified and
|
||||
all elements are of compile-time known length, emit an error as this is
|
||||
invalid. */
|
||||
|
||||
@ -1675,7 +1675,7 @@ got_charlen:
|
||||
max_length only if they pass. */
|
||||
gfc_extract_int (expr->ts.cl->length, &found_length);
|
||||
|
||||
/* Now pad/trunkate the elements accordingly to the specified character
|
||||
/* Now pad/truncate the elements accordingly to the specified character
|
||||
length. This is ok inside this conditional, as in the case above
|
||||
(without typespec) all elements are verified to have the same length
|
||||
anyway. */
|
||||
|
@ -23,7 +23,7 @@ along with GCC; see the file COPYING3. If not see
|
||||
/* Notes for DATA statement implementation:
|
||||
|
||||
We first assign initial value to each symbol by gfc_assign_data_value
|
||||
during resolveing DATA statement. Refer to check_data_variable and
|
||||
during resolving DATA statement. Refer to check_data_variable and
|
||||
traverse_data_list in resolve.c.
|
||||
|
||||
The complexity exists in the handling of array section, implied do
|
||||
@ -144,7 +144,7 @@ find_con_by_component (gfc_component *com, gfc_constructor *con)
|
||||
|
||||
/* Create a character type initialization expression from RVALUE.
|
||||
TS [and REF] describe [the substring of] the variable being initialized.
|
||||
INIT is thh existing initializer, not NULL. Initialization is performed
|
||||
INIT is the existing initializer, not NULL. Initialization is performed
|
||||
according to normal assignment rules. */
|
||||
|
||||
static gfc_expr *
|
||||
@ -754,7 +754,7 @@ formalize_structure_cons (gfc_expr *expr)
|
||||
}
|
||||
|
||||
|
||||
/* Make sure an initialization expression is in normalized form. Ie. all
|
||||
/* Make sure an initialization expression is in normalized form, i.e., all
|
||||
elements of the constructors are in the correct order. */
|
||||
|
||||
static void
|
||||
|
@ -762,7 +762,7 @@ get_proc_name (const char *name, gfc_symbol **result, bool module_fcn_entry)
|
||||
(*result)->ts = sym->ts;
|
||||
|
||||
/* Put the symbol in the procedure namespace so that, should
|
||||
the ENTRY preceed its specification, the specification
|
||||
the ENTRY precede its specification, the specification
|
||||
can be applied. */
|
||||
(*result)->ns = gfc_current_ns;
|
||||
|
||||
@ -5770,7 +5770,7 @@ syntax:
|
||||
|
||||
|
||||
/* The PRIVATE statement is a bit weird in that it can be an attribute
|
||||
declaration, but also works as a standlone statement inside of a
|
||||
declaration, but also works as a standalone statement inside of a
|
||||
type declaration or a module. */
|
||||
|
||||
match
|
||||
@ -6341,7 +6341,7 @@ gfc_match_derived_decl (void)
|
||||
components. The ways this can happen is via a function
|
||||
definition, an INTRINSIC statement or a subtype in another
|
||||
derived type that is a pointer. The first part of the AND clause
|
||||
is true if a the symbol is not the return value of a function. */
|
||||
is true if the symbol is not the return value of a function. */
|
||||
if (sym->attr.flavor != FL_DERIVED
|
||||
&& gfc_add_flavor (&sym->attr, FL_DERIVED, sym->name, NULL) == FAILURE)
|
||||
return MATCH_ERROR;
|
||||
|
@ -37,7 +37,7 @@ typedef enum
|
||||
{
|
||||
GFC_DEP_ERROR,
|
||||
GFC_DEP_EQUAL, /* Identical Ranges. */
|
||||
GFC_DEP_FORWARD, /* eg. a(1:3), a(2:4). */
|
||||
GFC_DEP_FORWARD, /* e.g., a(1:3), a(2:4). */
|
||||
GFC_DEP_OVERLAP, /* May overlap in some other way. */
|
||||
GFC_DEP_NODEP /* Distinct ranges. */
|
||||
}
|
||||
@ -523,7 +523,7 @@ gfc_check_fncall_dependency (gfc_expr *other, sym_intent intent,
|
||||
|
||||
|
||||
/* Return 1 if e1 and e2 are equivalenced arrays, either
|
||||
directly or indirectly; ie. equivalence (a,b) for a and b
|
||||
directly or indirectly; i.e., equivalence (a,b) for a and b
|
||||
or equivalence (a,c),(b,c). This function uses the equiv_
|
||||
lists, generated in trans-common(add_equivalences), that are
|
||||
guaranteed to pick up indirect equivalences. We explicitly
|
||||
@ -1183,7 +1183,7 @@ gfc_dep_resolver (gfc_ref *lref, gfc_ref *rref)
|
||||
while (lref && rref)
|
||||
{
|
||||
/* We're resolving from the same base symbol, so both refs should be
|
||||
the same type. We traverse the reference chain intil we find ranges
|
||||
the same type. We traverse the reference chain until we find ranges
|
||||
that are not equal. */
|
||||
gcc_assert (lref->type == rref->type);
|
||||
switch (lref->type)
|
||||
|
@ -3002,7 +3002,7 @@ gfc_check_pointer_assign (gfc_expr *lvalue, gfc_expr *rvalue)
|
||||
|
||||
if (attr.is_protected && attr.use_assoc)
|
||||
{
|
||||
gfc_error ("Pointer assigment target has PROTECTED "
|
||||
gfc_error ("Pointer assignment target has PROTECTED "
|
||||
"attribute at %L", &rvalue->where);
|
||||
return FAILURE;
|
||||
}
|
||||
|
@ -236,7 +236,7 @@ gfc_be_parse_file (int set_yydebug ATTRIBUTE_UNUSED)
|
||||
cgraph_finalize_compilation_unit ();
|
||||
cgraph_optimize ();
|
||||
|
||||
/* Tell the frontent about any errors. */
|
||||
/* Tell the frontend about any errors. */
|
||||
gfc_get_errors (&warnings, &errors);
|
||||
errorcount += errors;
|
||||
warningcount += warnings;
|
||||
@ -437,7 +437,7 @@ poplevel (int keep, int reverse, int functionbody)
|
||||
}
|
||||
else if (current_binding_level == global_binding_level)
|
||||
/* When using gfc_start_block/gfc_finish_block from middle-end hooks,
|
||||
don't add newly created BLOCKs as sublocks of global_binding_level. */
|
||||
don't add newly created BLOCKs as subblocks of global_binding_level. */
|
||||
;
|
||||
else if (block_node)
|
||||
{
|
||||
@ -547,7 +547,7 @@ gfc_init_decl_processing (void)
|
||||
only use it for actual characters, not for INTEGER(1). Also, we
|
||||
want double_type_node to actually have double precision. */
|
||||
build_common_tree_nodes (false, false);
|
||||
/* x86_64 minw32 has a sizetype of "unsigned long long", most other hosts
|
||||
/* x86_64 mingw32 has a sizetype of "unsigned long long", most other hosts
|
||||
have a sizetype of "unsigned long". Therefore choose the correct size
|
||||
in mostly target independent way. */
|
||||
if (TYPE_MODE (long_unsigned_type_node) == ptr_mode)
|
||||
|
@ -78,7 +78,7 @@ char *alloca ();
|
||||
#define stringize(x) expand_macro(x)
|
||||
#define expand_macro(x) # x
|
||||
|
||||
/* For a the runtime library, a standard prefix is a requirement to
|
||||
/* For the runtime library, a standard prefix is a requirement to
|
||||
avoid cluttering the namespace with things nobody asked for. It's
|
||||
ugly to look at and a pain to type when you add the prefix by hand,
|
||||
so we hide it behind a macro. */
|
||||
@ -304,7 +304,7 @@ extern const mstring save_status[];
|
||||
enum gfc_isym_id
|
||||
{
|
||||
/* GFC_ISYM_NONE is used for intrinsics which will never be seen by
|
||||
the backend (eg. KIND). */
|
||||
the backend (e.g. KIND). */
|
||||
GFC_ISYM_NONE = 0,
|
||||
GFC_ISYM_ABORT,
|
||||
GFC_ISYM_ABS,
|
||||
@ -693,7 +693,7 @@ typedef struct
|
||||
unsigned cray_pointer:1, cray_pointee:1;
|
||||
|
||||
/* The symbol is a derived type with allocatable components, pointer
|
||||
components or private components, possibly nested. zer_comp
|
||||
components or private components, possibly nested. zero_comp
|
||||
is true if the derived type has no component at all. */
|
||||
unsigned alloc_comp:1, pointer_comp:1, private_comp:1, zero_comp:1;
|
||||
|
||||
@ -1960,7 +1960,7 @@ typedef struct gfc_finalizer
|
||||
{
|
||||
struct gfc_finalizer* next;
|
||||
gfc_symbol* procedure;
|
||||
locus where; /* Where the FINAL declaration occured. */
|
||||
locus where; /* Where the FINAL declaration occurred. */
|
||||
}
|
||||
gfc_finalizer;
|
||||
|
||||
|
@ -696,7 +696,7 @@ data_desc:
|
||||
goto syntax;
|
||||
}
|
||||
|
||||
if (gfc_notify_std (GFC_STD_F2008, "Fortran F2008: 'G0' in "
|
||||
if (gfc_notify_std (GFC_STD_F2008, "Fortran 2008: 'G0' in "
|
||||
"format at %C") == FAILURE)
|
||||
return FAILURE;
|
||||
|
||||
@ -2489,9 +2489,9 @@ gfc_resolve_dt (gfc_dt *dt)
|
||||
else
|
||||
{
|
||||
/* At this point, we have an extra comma. If io_unit has arrived as
|
||||
type chracter, we assume its really the "format" form of the I/O
|
||||
type character, we assume its really the "format" form of the I/O
|
||||
statement. We set the io_unit to the default unit and format to
|
||||
the chracter expression. See F95 Standard section 9.4. */
|
||||
the character expression. See F95 Standard section 9.4. */
|
||||
io_kind k;
|
||||
k = dt->extra_comma->value.iokind;
|
||||
if (e->ts.type == BT_CHARACTER && (k == M_READ || k == M_PRINT))
|
||||
|
@ -254,7 +254,7 @@ match_level_1 (gfc_expr **result)
|
||||
/* As a GNU extension we support an expanded level-2 expression syntax.
|
||||
Via this extension we support (arbitrary) nesting of unary plus and
|
||||
minus operations following unary and binary operators, such as **.
|
||||
The grammar of section 7.1.1.3 is effectively rewitten as:
|
||||
The grammar of section 7.1.1.3 is effectively rewritten as:
|
||||
|
||||
R704 mult-operand is level-1-expr [ power-op ext-mult-operand ]
|
||||
R704' ext-mult-operand is add-op ext-mult-operand
|
||||
|
@ -20,7 +20,7 @@ You should have received a copy of the GNU General Public License
|
||||
along with GCC; see the file COPYING3. If not see
|
||||
<http://www.gnu.org/licenses/>. */
|
||||
|
||||
/* The syntax of gfortran modules resembles that of lisp lists, ie a
|
||||
/* The syntax of gfortran modules resembles that of lisp lists, i.e. a
|
||||
sequence of atoms, which can be left or right parenthesis, names,
|
||||
integers or strings. Parenthesis are always matched which allows
|
||||
us to skip over sections at high speed without having to know
|
||||
@ -446,7 +446,7 @@ associate_integer_pointer (pointer_info *p, void *gp)
|
||||
either store the pointer from an already-known value or create a
|
||||
fixup structure in order to store things later. Returns zero if
|
||||
the reference has been actually stored, or nonzero if the reference
|
||||
must be fixed later (ie associate_integer_pointer must be called
|
||||
must be fixed later (i.e., associate_integer_pointer must be called
|
||||
sometime later. Returns the pointer_info structure. */
|
||||
|
||||
static pointer_info *
|
||||
@ -3062,7 +3062,7 @@ mio_namelist (gfc_symbol *sym)
|
||||
}
|
||||
|
||||
|
||||
/* Save/restore lists of gfc_interface stuctures. When loading an
|
||||
/* Save/restore lists of gfc_interface structures. When loading an
|
||||
interface, we are really appending to the existing list of
|
||||
interfaces. Checking for duplicate and ambiguous interfaces has to
|
||||
be done later when all symbols have been loaded. */
|
||||
@ -3272,7 +3272,7 @@ find_symtree_for_symbol (gfc_symtree *st, gfc_symbol *sym)
|
||||
}
|
||||
|
||||
|
||||
/* A recursive function to look for a speficic symbol by name and by
|
||||
/* A recursive function to look for a specific symbol by name and by
|
||||
module. Whilst several symtrees might point to one symbol, its
|
||||
is sufficient for the purposes here than one exist. Note that
|
||||
generic interfaces are distinguished as are symbols that have been
|
||||
|
@ -1533,7 +1533,7 @@ unexpected_statement (gfc_statement st)
|
||||
issue an error and return FAILURE. Otherwise we return SUCCESS.
|
||||
|
||||
Individual parsers need to verify that the statements seen are
|
||||
valid before calling here, ie ENTRY statements are not allowed in
|
||||
valid before calling here, i.e., ENTRY statements are not allowed in
|
||||
INTERFACE blocks. The following diagram is taken from the standard:
|
||||
|
||||
+---------------------------------------+
|
||||
@ -3413,7 +3413,7 @@ gfc_global_used (gfc_gsymbol *sym, locus *where)
|
||||
name = "MODULE";
|
||||
break;
|
||||
default:
|
||||
gfc_internal_error ("gfc_gsymbol_type(): Bad type");
|
||||
gfc_internal_error ("gfc_global_used(): Bad type");
|
||||
name = NULL;
|
||||
}
|
||||
|
||||
@ -3688,7 +3688,7 @@ done:
|
||||
|
||||
duplicate_main:
|
||||
/* If we see a duplicate main program, shut down. If the second
|
||||
instance is an implied main program, ie data decls or executable
|
||||
instance is an implied main program, i.e. data decls or executable
|
||||
statements, we're in for lots of errors. */
|
||||
gfc_error ("Two main PROGRAMs at %L and %C", &prog_locus);
|
||||
reject_statement ();
|
||||
|
@ -2689,7 +2689,7 @@ gfc_match_rvalue (gfc_expr **result)
|
||||
}
|
||||
|
||||
|
||||
/* Match a variable, ie something that can be assigned to. This
|
||||
/* Match a variable, i.e. something that can be assigned to. This
|
||||
starts as a symbol, can be a structure component or an array
|
||||
reference. It can be a function if the function doesn't have a
|
||||
separate RESULT variable. If the symbol has not been previously
|
||||
@ -2714,7 +2714,7 @@ match_variable (gfc_expr **result, int equiv_flag, int host_flag)
|
||||
we force the changed_symbols mechanism to work by setting
|
||||
host_flag to 0. This prevents valid symbols that have the name
|
||||
of keywords, such as 'end', being turned into variables by
|
||||
failed matching to assignments for, eg., END INTERFACE. */
|
||||
failed matching to assignments for, e.g., END INTERFACE. */
|
||||
if (gfc_current_state () == COMP_MODULE
|
||||
|| gfc_current_state () == COMP_INTERFACE
|
||||
|| gfc_current_state () == COMP_CONTAINS)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Perform type resolution on the various stuctures.
|
||||
/* Perform type resolution on the various structures.
|
||||
Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
|
||||
Free Software Foundation, Inc.
|
||||
Contributed by Andy Vaught
|
||||
@ -1568,7 +1568,7 @@ resolve_specific_f0 (gfc_symbol *sym, gfc_expr *expr)
|
||||
gfc_intrinsic_sym *isym;
|
||||
isym = gfc_find_function (sym->ts.interface->name);
|
||||
|
||||
/* Existance of isym should be checked already. */
|
||||
/* Existence of isym should be checked already. */
|
||||
gcc_assert (isym);
|
||||
|
||||
sym->ts.type = isym->ts.type;
|
||||
@ -2644,7 +2644,7 @@ resolve_specific_s0 (gfc_code *c, gfc_symbol *sym)
|
||||
|
||||
isym = gfc_find_function (sym->ts.interface->name);
|
||||
|
||||
/* Existance of isym should be checked already. */
|
||||
/* Existence of isym should be checked already. */
|
||||
gcc_assert (isym);
|
||||
|
||||
sym->ts.type = isym->ts.type;
|
||||
@ -3185,7 +3185,7 @@ resolve_operator (gfc_expr *e)
|
||||
{
|
||||
t = gfc_simplify_expr (e, 0);
|
||||
/* Some calls do not succeed in simplification and return FAILURE
|
||||
even though there is no error; eg. variable references to
|
||||
even though there is no error; e.g. variable references to
|
||||
PARAMETER arrays. */
|
||||
if (!gfc_is_constant_expr (e))
|
||||
t = SUCCESS;
|
||||
@ -4873,7 +4873,7 @@ check_symbols:
|
||||
|| (ar->end[i] != NULL
|
||||
&& gfc_find_sym_in_expr (sym, ar->end[i])))
|
||||
{
|
||||
gfc_error ("'%s' must not appear an the array specification at "
|
||||
gfc_error ("'%s' must not appear in the array specification at "
|
||||
"%L in the same ALLOCATE statement where it is "
|
||||
"itself allocated", sym->name, &ar->where);
|
||||
return FAILURE;
|
||||
@ -5999,7 +5999,7 @@ gfc_resolve_blocks (gfc_code *b, gfc_namespace *ns)
|
||||
|
||||
|
||||
/* Does everything to resolve an ordinary assignment. Returns true
|
||||
if this is an interface asignment. */
|
||||
if this is an interface assignment. */
|
||||
static bool
|
||||
resolve_ordinary_assign (gfc_code *code, gfc_namespace *ns)
|
||||
{
|
||||
@ -7251,7 +7251,7 @@ resolve_fl_procedure (gfc_symbol *sym, int mp_flag)
|
||||
}
|
||||
|
||||
/* Ensure that derived type for are not of a private type. Internal
|
||||
module procedures are excluded by 2.2.3.3 - ie. they are not
|
||||
module procedures are excluded by 2.2.3.3 - i.e., they are not
|
||||
externally accessible and can access all the objects accessible in
|
||||
the host. */
|
||||
if (!(sym->ns->parent
|
||||
@ -7563,7 +7563,7 @@ gfc_resolve_finalizers (gfc_symbol* derived)
|
||||
prev_link = &list->next;
|
||||
continue;
|
||||
|
||||
/* Remove wrong nodes immediatelly from the list so we don't risk any
|
||||
/* Remove wrong nodes immediately from the list so we don't risk any
|
||||
troubles in the future when they might fail later expectations. */
|
||||
error:
|
||||
result = FAILURE;
|
||||
@ -8642,7 +8642,7 @@ resolve_data (gfc_data *d)
|
||||
is storage associated with any such variable, shall not be used in the
|
||||
following contexts: (clients of this function). */
|
||||
|
||||
/* Determines if a variable is not 'pure', ie not assignable within a pure
|
||||
/* Determines if a variable is not 'pure', i.e., not assignable within a pure
|
||||
procedure. Returns zero if assignment is OK, nonzero if there is a
|
||||
problem. */
|
||||
int
|
||||
|
@ -1917,7 +1917,7 @@ load_file (const char *realfilename, const char *displayedname, bool initial)
|
||||
|
||||
|
||||
/* Open a new file and start scanning from that file. Returns SUCCESS
|
||||
if everything went OK, FAILURE otherwise. If form == FORM_UKNOWN
|
||||
if everything went OK, FAILURE otherwise. If form == FORM_UNKNOWN
|
||||
it tries to determine the source form from the filename, defaulting
|
||||
to free form. */
|
||||
|
||||
|
@ -272,7 +272,7 @@ gfc_set_default_type (gfc_symbol *sym, int error_flag, gfc_namespace *ns)
|
||||
{
|
||||
/* Dummy args to a BIND(C) routine may not be interoperable if
|
||||
they are implicitly typed. */
|
||||
gfc_warning_now ("Implicity declared variable '%s' at %L may not "
|
||||
gfc_warning_now ("Implicitly declared variable '%s' at %L may not "
|
||||
"be C interoperable but it is a dummy argument to "
|
||||
"the BIND(C) procedure '%s' at %L", sym->name,
|
||||
&(sym->declared_at), sym->ns->proc_name->name,
|
||||
|
@ -39,7 +39,7 @@ along with GCC; see the file COPYING3. If not see
|
||||
In fortran all the rhs values of an assignment must be evaluated before
|
||||
any assignments take place. This can require a temporary array to store the
|
||||
values. We also require a temporary when we are passing array expressions
|
||||
or vector subecripts as procedure parameters.
|
||||
or vector subscripts as procedure parameters.
|
||||
|
||||
Array sections are passed without copying to a temporary. These use the
|
||||
scalarizer to determine the shape of the section. The flag
|
||||
@ -1645,7 +1645,7 @@ gfc_trans_constant_array_constructor (gfc_loopinfo * loop,
|
||||
/* Helper routine of gfc_trans_array_constructor to determine if the
|
||||
bounds of the loop specified by LOOP are constant and simple enough
|
||||
to use with gfc_trans_constant_array_constructor. Returns the
|
||||
the iteration count of the loop if suitable, and NULL_TREE otherwise. */
|
||||
iteration count of the loop if suitable, and NULL_TREE otherwise. */
|
||||
|
||||
static tree
|
||||
constant_array_constructor_loop_size (gfc_loopinfo * loop)
|
||||
@ -1901,8 +1901,8 @@ gfc_add_loop_ss_code (gfc_loopinfo * loop, gfc_ss * ss, bool subscript)
|
||||
gfc_se se;
|
||||
int n;
|
||||
|
||||
/* TODO: This can generate bad code if there are ordering dependencies.
|
||||
eg. a callee allocated function and an unknown size constructor. */
|
||||
/* TODO: This can generate bad code if there are ordering dependencies,
|
||||
e.g., a callee allocated function and an unknown size constructor. */
|
||||
gcc_assert (ss != NULL);
|
||||
|
||||
for (; ss != gfc_ss_terminator; ss = ss->loop_chain)
|
||||
@ -4536,7 +4536,7 @@ gfc_get_dataptr_offset (stmtblock_t *block, tree parm, tree desc, tree offset,
|
||||
tmp = gfc_build_array_ref (tmp, offset, NULL);
|
||||
|
||||
/* Offset the data pointer for pointer assignments from arrays with
|
||||
subreferences; eg. my_integer => my_type(:)%integer_component. */
|
||||
subreferences; e.g. my_integer => my_type(:)%integer_component. */
|
||||
if (subref)
|
||||
{
|
||||
/* Go past the array reference. */
|
||||
@ -4635,7 +4635,7 @@ get_elemental_fcn_charlen (gfc_expr *expr, gfc_se *se)
|
||||
arg = expr->value.function.actual;
|
||||
gfc_init_interface_mapping (&mapping);
|
||||
|
||||
/* Set se = NULL in the calls to the interface mapping, to supress any
|
||||
/* Set se = NULL in the calls to the interface mapping, to suppress any
|
||||
backend stuff. */
|
||||
for (; arg != NULL; arg = arg->next, formal = formal ? formal->next : NULL)
|
||||
{
|
||||
@ -5865,7 +5865,7 @@ gfc_walk_op_expr (gfc_ss * ss, gfc_expr * expr)
|
||||
if (head == ss)
|
||||
{
|
||||
/* First operand is scalar. We build the chain in reverse order, so
|
||||
add the scarar SS after the second operand. */
|
||||
add the scalar SS after the second operand. */
|
||||
head = head2;
|
||||
while (head && head->next != ss)
|
||||
head = head->next;
|
||||
|
@ -955,7 +955,7 @@ find_equivalence (segment_info *n)
|
||||
segment list multiple times to include indirect equivalences. Since
|
||||
a new segment_info can inserted at the beginning of the segment list,
|
||||
depending on its offset, we have to force a final pass through the
|
||||
loop by demanding that completion sees a pass with no matches; ie.
|
||||
loop by demanding that completion sees a pass with no matches; i.e.,
|
||||
all symbols with equiv_built set and no new equivalences found. */
|
||||
|
||||
static void
|
||||
|
@ -525,7 +525,7 @@ gfc_finish_var_decl (tree decl, gfc_symbol * sym)
|
||||
a default initializer; this must be applied each time the variable
|
||||
comes into scope it therefore need not be static. These variables
|
||||
are SAVE_NONE but have an initializer. Otherwise explicitly
|
||||
intitialized variables are SAVE_IMPLICIT and explicitly saved are
|
||||
initialized variables are SAVE_IMPLICIT and explicitly saved are
|
||||
SAVE_EXPLICIT. */
|
||||
if (!sym->attr.use_assoc
|
||||
&& (sym->attr.save != SAVE_NONE || sym->attr.data
|
||||
@ -1584,7 +1584,7 @@ create_function_arglist (gfc_symbol * sym)
|
||||
if (f->sym->attr.proc_pointer)
|
||||
type = build_pointer_type (type);
|
||||
|
||||
/* Build a the argument declaration. */
|
||||
/* Build the argument declaration. */
|
||||
parm = build_decl (PARM_DECL, gfc_sym_identifier (f->sym), type);
|
||||
|
||||
/* Fill in arg stuff. */
|
||||
|
@ -1927,7 +1927,7 @@ gfc_apply_interface_mapping_to_expr (gfc_interface_mapping * mapping,
|
||||
|
||||
/* ...and to the expression's symbol, if it has one. */
|
||||
/* TODO Find out why the condition on expr->symtree had to be moved into
|
||||
the loop rather than being ouside it, as originally. */
|
||||
the loop rather than being outside it, as originally. */
|
||||
for (sym = mapping->syms; sym; sym = sym->next)
|
||||
if (expr->symtree && sym->old == expr->symtree->n.sym)
|
||||
{
|
||||
@ -2691,7 +2691,7 @@ gfc_conv_function_call (gfc_se * se, gfc_symbol * sym,
|
||||
{
|
||||
if (se->direct_byref)
|
||||
{
|
||||
/* Sometimes, too much indirection can be applied; eg. for
|
||||
/* Sometimes, too much indirection can be applied; e.g. for
|
||||
function_result = array_valued_recursive_function. */
|
||||
if (TREE_TYPE (TREE_TYPE (se->expr))
|
||||
&& TREE_TYPE (TREE_TYPE (TREE_TYPE (se->expr)))
|
||||
@ -3934,7 +3934,7 @@ gfc_trans_pointer_assignment (gfc_expr * expr1, gfc_expr * expr2)
|
||||
|
||||
|
||||
/* Makes sure se is suitable for passing as a function string parameter. */
|
||||
/* TODO: Need to check all callers fo this function. It may be abused. */
|
||||
/* TODO: Need to check all callers of this function. It may be abused. */
|
||||
|
||||
void
|
||||
gfc_conv_string_parameter (gfc_se * se)
|
||||
|
@ -2754,7 +2754,7 @@ gfc_conv_intrinsic_index_scan_verify (gfc_se * se, gfc_expr * expr,
|
||||
args = (tree *) alloca (sizeof (tree) * 5);
|
||||
|
||||
/* Get number of arguments; characters count double due to the
|
||||
string length argument. Kind= is not passed to the libary
|
||||
string length argument. Kind= is not passed to the library
|
||||
and thus ignored. */
|
||||
if (expr->value.function.actual->next->next->expr == NULL)
|
||||
num_args = 4;
|
||||
@ -4666,7 +4666,7 @@ gfc_walk_intrinsic_libfunc (gfc_ss * ss, gfc_expr * expr)
|
||||
}
|
||||
|
||||
|
||||
/* Returns nonzero if the specified intrinsic function call maps directly to a
|
||||
/* Returns nonzero if the specified intrinsic function call maps directly to
|
||||
an external library call. Should only be used for functions that return
|
||||
arrays. */
|
||||
|
||||
|
@ -361,7 +361,7 @@ gfc_init_kinds (void)
|
||||
if (kind == 16)
|
||||
saw_r16 = true;
|
||||
|
||||
/* Careful we don't stumble a wierd internal mode. */
|
||||
/* Careful we don't stumble a weird internal mode. */
|
||||
gcc_assert (r_index <= 0 || gfc_real_kinds[r_index-1].kind != kind);
|
||||
/* Or have too many modes for the allocated space. */
|
||||
gcc_assert (r_index != MAX_REAL_KINDS);
|
||||
@ -393,7 +393,7 @@ gfc_init_kinds (void)
|
||||
gfc_default_integer_kind = 8;
|
||||
|
||||
/* Even if the user specified that the default integer kind be 8,
|
||||
the numerica storage size isn't 64. In this case, a warning will
|
||||
the numeric storage size isn't 64. In this case, a warning will
|
||||
be issued when NUMERIC_STORAGE_SIZE is used. */
|
||||
gfc_numeric_storage_size = 4 * 8;
|
||||
}
|
||||
@ -1065,8 +1065,8 @@ gfc_get_element_type (tree type)
|
||||
ARRAYS comment.
|
||||
|
||||
The data component points to the first element in the array. The
|
||||
offset field is the position of the origin of the array (ie element
|
||||
(0, 0 ...)). This may be outsite the bounds of the array.
|
||||
offset field is the position of the origin of the array (i.e. element
|
||||
(0, 0 ...)). This may be outside the bounds of the array.
|
||||
|
||||
An element is accessed by
|
||||
data[offset + index0*stride0 + index1*stride1 + index2*stride2]
|
||||
@ -1078,7 +1078,7 @@ gfc_get_element_type (tree type)
|
||||
elements of the origin (2^63 on 64-bit machines). For example
|
||||
integer, dimension (80000:90000, 80000:90000, 2) :: array
|
||||
may not work properly on 32-bit machines because 80000*80000 >
|
||||
2^31, so the calculation for stride02 would overflow. This may
|
||||
2^31, so the calculation for stride2 would overflow. This may
|
||||
still work, but I haven't checked, and it relies on the overflow
|
||||
doing the right thing.
|
||||
|
||||
@ -2163,7 +2163,7 @@ gfc_type_for_size (unsigned bits, int unsignedp)
|
||||
}
|
||||
|
||||
/* Handle TImode as a special case because it is used by some backends
|
||||
(eg. ARM) even though it is not available for normal use. */
|
||||
(e.g. ARM) even though it is not available for normal use. */
|
||||
#if HOST_BITS_PER_WIDE_INT >= 64
|
||||
if (bits == TYPE_PRECISION (intTI_type_node))
|
||||
return intTI_type_node;
|
||||
|
@ -129,7 +129,7 @@ gfc_create_var (tree type, const char *prefix)
|
||||
}
|
||||
|
||||
|
||||
/* If the an expression is not constant, evaluate it now. We assign the
|
||||
/* If the expression is not constant, evaluate it now. We assign the
|
||||
result of the expression to an artificially created variable VAR, and
|
||||
return a pointer to the VAR_DECL node for this variable. */
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* Header for code translation functions
|
||||
Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Free Software
|
||||
Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software
|
||||
Foundation, Inc.
|
||||
Contributed by Paul Brook
|
||||
|
||||
@ -137,7 +137,7 @@ typedef enum
|
||||
/* A non-elemental function call returning an array. The call is executed
|
||||
before entering the scalarization loop, storing the result in a
|
||||
temporary. This temporary is then used inside the scalarization loop.
|
||||
Simple assignments, eg. a(:) = fn() are handles without a temporary
|
||||
Simple assignments, e.g. a(:) = fn(), are handled without a temporary
|
||||
as a special case. */
|
||||
GFC_SS_FUNCTION,
|
||||
|
||||
@ -654,7 +654,7 @@ struct lang_decl GTY(())
|
||||
#define GFC_TYPE_ARRAY_SIZE(node) (TYPE_LANG_SPECIFIC(node)->size)
|
||||
#define GFC_TYPE_ARRAY_OFFSET(node) (TYPE_LANG_SPECIFIC(node)->offset)
|
||||
#define GFC_TYPE_ARRAY_AKIND(node) (TYPE_LANG_SPECIFIC(node)->akind)
|
||||
/* Code should use gfc_get_dtype instead of accesing this directly. It may
|
||||
/* Code should use gfc_get_dtype instead of accessing this directly. It may
|
||||
not be known when the type is created. */
|
||||
#define GFC_TYPE_ARRAY_DTYPE(node) (TYPE_LANG_SPECIFIC(node)->dtype)
|
||||
#define GFC_TYPE_ARRAY_DATAPTR_TYPE(node) \
|
||||
|
@ -1,3 +1,7 @@
|
||||
2008-07-21 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
|
||||
|
||||
* gfortran.dg/fmt_g0_3.f08: Fix typo in expected error message.
|
||||
|
||||
2008-07-21 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
|
||||
PR c++/36871
|
||||
|
@ -3,5 +3,5 @@
|
||||
! Test case provided by Jerry DeLisle <jvdelisle@gcc.gnu.org>
|
||||
character(25) :: string = "(g0,g0,g0)"
|
||||
character(33) :: buffer
|
||||
write(buffer, '(g0,g0,g0)') ':',12340,':' ! { dg-error "Fortran F2008:" }
|
||||
write(buffer, '(g0,g0,g0)') ':',12340,':' ! { dg-error "Fortran 2008:" }
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user