Commit 17b1d2a0 by Kaveh R. Ghazi Committed by Kaveh Ghazi

gfortran.h (try): Remove macro.

	* gfortran.h (try): Remove macro.  Replace try with gfc_try
	throughout.
	* array.c: Likewise.
	* check.c: Likewise.
	* cpp.c: Likewise.
	* cpp.h: Likewise.
	* data.c: Likewise.
	* data.h: Likewise.
	* decl.c: Likewise.
	* error.c: Likewise.
	* expr.c: Likewise.
	* interface.c: Likewise.
	* intrinsic.c: Likewise.
	* intrinsic.h: Likewise.
	* io.c: Likewise.
	* match.h: Likewise.
	* parse.c: Likewise.
	* parse.h: Likewise.
	* resolve.c: Likewise.
	* scanner.c: Likewise.
	* simplify.c: Likewise.
	* symbol.c: Likewise.
	* trans-openmp.c: Likewise.
	* trans-types.c: Likewise.

From-SVN: r138226
parent 48898548
2008-07-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* gfortran.h (try): Remove macro. Replace try with gfc_try
throughout.
* array.c: Likewise.
* check.c: Likewise.
* cpp.c: Likewise.
* cpp.h: Likewise.
* data.c: Likewise.
* data.h: Likewise.
* decl.c: Likewise.
* error.c: Likewise.
* expr.c: Likewise.
* interface.c: Likewise.
* intrinsic.c: Likewise.
* intrinsic.h: Likewise.
* io.c: Likewise.
* match.h: Likewise.
* parse.c: Likewise.
* parse.h: Likewise.
* resolve.c: Likewise.
* scanner.c: Likewise.
* simplify.c: Likewise.
* symbol.c: Likewise.
* trans-openmp.c: Likewise.
* trans-types.c: Likewise.
2008-07-28 Tobias Burnus <burnus@net-b.de>
* Make-lang.in: Remove -Wno-* from fortran-warn.
......
......@@ -208,7 +208,7 @@ gfc_free_array_spec (gfc_array_spec *as)
/* Take an array bound, resolves the expression, that make up the
shape and check associated constraints. */
static try
static gfc_try
resolve_array_bound (gfc_expr *e, int check_constant)
{
if (e == NULL)
......@@ -232,7 +232,7 @@ resolve_array_bound (gfc_expr *e, int check_constant)
/* Takes an array specification, resolves the expressions that make up
the shape and make sure everything is integral. */
try
gfc_try
gfc_resolve_array_spec (gfc_array_spec *as, int check_constant)
{
gfc_expr *e;
......@@ -469,7 +469,7 @@ cleanup:
have that array specification. The error locus is needed in case
something goes wrong. On failure, the caller must free the spec. */
try
gfc_try
gfc_set_array_spec (gfc_symbol *sym, gfc_array_spec *as, locus *error_loc)
{
if (as == NULL)
......@@ -1038,7 +1038,7 @@ check_element_type (gfc_expr *expr, bool convert)
/* Recursive work function for gfc_check_constructor_type(). */
static try
static gfc_try
check_constructor_type (gfc_constructor *c, bool convert)
{
gfc_expr *e;
......@@ -1066,10 +1066,10 @@ check_constructor_type (gfc_constructor *c, bool convert)
/* Check that all elements of an array constructor are the same type.
On FAILURE, an error has been generated. */
try
gfc_try
gfc_check_constructor_type (gfc_expr *e)
{
try t;
gfc_try t;
if (e->ts.type != BT_UNKNOWN)
{
......@@ -1102,12 +1102,12 @@ cons_stack;
static cons_stack *base;
static try check_constructor (gfc_constructor *, try (*) (gfc_expr *));
static gfc_try check_constructor (gfc_constructor *, gfc_try (*) (gfc_expr *));
/* Check an EXPR_VARIABLE expression in a constructor to make sure
that that variable is an iteration variables. */
try
gfc_try
gfc_check_iter_variable (gfc_expr *expr)
{
gfc_symbol *sym;
......@@ -1127,12 +1127,12 @@ gfc_check_iter_variable (gfc_expr *expr)
to calling the check function for each expression in the
constructor, giving variables with the names of iterators a pass. */
static try
check_constructor (gfc_constructor *c, try (*check_function) (gfc_expr *))
static gfc_try
check_constructor (gfc_constructor *c, gfc_try (*check_function) (gfc_expr *))
{
cons_stack element;
gfc_expr *e;
try t;
gfc_try t;
for (; c; c = c->next)
{
......@@ -1165,11 +1165,11 @@ check_constructor (gfc_constructor *c, try (*check_function) (gfc_expr *))
expression -- specification, restricted, or initialization as
determined by the check_function. */
try
gfc_check_constructor (gfc_expr *expr, try (*check_function) (gfc_expr *))
gfc_try
gfc_check_constructor (gfc_expr *expr, gfc_try (*check_function) (gfc_expr *))
{
cons_stack *base_save;
try t;
gfc_try t;
base_save = base;
base = NULL;
......@@ -1197,19 +1197,19 @@ typedef struct
gfc_component *component;
mpz_t *repeat;
try (*expand_work_function) (gfc_expr *);
gfc_try (*expand_work_function) (gfc_expr *);
}
expand_info;
static expand_info current_expand;
static try expand_constructor (gfc_constructor *);
static gfc_try expand_constructor (gfc_constructor *);
/* Work function that counts the number of elements present in a
constructor. */
static try
static gfc_try
count_elements (gfc_expr *e)
{
mpz_t result;
......@@ -1236,7 +1236,7 @@ count_elements (gfc_expr *e)
/* Work function that extracts a particular element from an array
constructor, freeing the rest. */
static try
static gfc_try
extract_element (gfc_expr *e)
{
......@@ -1259,7 +1259,7 @@ extract_element (gfc_expr *e)
/* Work function that constructs a new constructor out of the old one,
stringing new elements together. */
static try
static gfc_try
expand (gfc_expr *e)
{
if (current_expand.new_head == NULL)
......@@ -1307,7 +1307,7 @@ gfc_simplify_iterator_var (gfc_expr *e)
/* Expand an expression with that is inside of a constructor,
recursing into other constructors if present. */
static try
static gfc_try
expand_expr (gfc_expr *e)
{
if (e->expr_type == EXPR_ARRAY)
......@@ -1325,13 +1325,13 @@ expand_expr (gfc_expr *e)
}
static try
static gfc_try
expand_iterator (gfc_constructor *c)
{
gfc_expr *start, *end, *step;
iterator_stack frame;
mpz_t trip;
try t;
gfc_try t;
end = step = NULL;
......@@ -1409,7 +1409,7 @@ cleanup:
expressions. The work function needs to either save or free the
passed expression. */
static try
static gfc_try
expand_constructor (gfc_constructor *c)
{
gfc_expr *e;
......@@ -1452,12 +1452,12 @@ expand_constructor (gfc_constructor *c)
/* Top level subroutine for expanding constructors. We only expand
constructor if they are small enough. */
try
gfc_try
gfc_expand_constructor (gfc_expr *e)
{
expand_info expand_save;
gfc_expr *f;
try rc;
gfc_try rc;
f = gfc_get_array_element (e, GFC_MAX_AC_EXPAND);
if (f != NULL)
......@@ -1496,7 +1496,7 @@ done:
constant, after removal of any iteration variables. We return
FAILURE if not so. */
static try
static gfc_try
constant_element (gfc_expr *e)
{
int rv;
......@@ -1518,7 +1518,7 @@ int
gfc_constant_ac (gfc_expr *e)
{
expand_info expand_save;
try rc;
gfc_try rc;
iter_stack = NULL;
expand_save = current_expand;
......@@ -1556,10 +1556,10 @@ gfc_expanded_ac (gfc_expr *e)
/* Recursive array list resolution function. All of the elements must
be of the same type. */
static try
static gfc_try
resolve_array_list (gfc_constructor *p)
{
try t;
gfc_try t;
t = SUCCESS;
......@@ -1581,7 +1581,7 @@ resolve_array_list (gfc_constructor *p)
all elements are of compile-time known length, emit an error as this is
invalid. */
try
gfc_try
gfc_resolve_character_array_constructor (gfc_expr *expr)
{
gfc_constructor *p;
......@@ -1711,10 +1711,10 @@ got_charlen:
/* Resolve all of the expressions in an array list. */
try
gfc_try
gfc_resolve_array_constructor (gfc_expr *expr)
{
try t;
gfc_try t;
t = resolve_array_list (expr->value.constructor);
if (t == SUCCESS)
......@@ -1795,7 +1795,7 @@ gfc_get_array_element (gfc_expr *array, int element)
{
expand_info expand_save;
gfc_expr *e;
try rc;
gfc_try rc;
expand_save = current_expand;
current_expand.extract_n = element;
......@@ -1826,7 +1826,7 @@ gfc_get_array_element (gfc_expr *array, int element)
/* Get the size of single dimension of an array specification. The
array is guaranteed to be one dimensional. */
try
gfc_try
spec_dimen_size (gfc_array_spec *as, int dimen, mpz_t *result)
{
if (as == NULL)
......@@ -1853,7 +1853,7 @@ spec_dimen_size (gfc_array_spec *as, int dimen, mpz_t *result)
}
try
gfc_try
spec_size (gfc_array_spec *as, mpz_t *result)
{
mpz_t size;
......@@ -1879,11 +1879,11 @@ spec_size (gfc_array_spec *as, mpz_t *result)
/* Get the number of elements in an array section. */
static try
static gfc_try
ref_dimen_size (gfc_array_ref *ar, int dimen, mpz_t *result)
{
mpz_t upper, lower, stride;
try t;
gfc_try t;
if (dimen < 0 || ar == NULL || dimen > ar->dimen - 1)
gfc_internal_error ("ref_dimen_size(): Bad dimension");
......@@ -1967,7 +1967,7 @@ ref_dimen_size (gfc_array_ref *ar, int dimen, mpz_t *result)
}
static try
static gfc_try
ref_size (gfc_array_ref *ar, mpz_t *result)
{
mpz_t size;
......@@ -1996,7 +1996,7 @@ ref_size (gfc_array_ref *ar, mpz_t *result)
able to return a result in the 'result' variable, FAILURE
otherwise. */
try
gfc_try
gfc_array_dimen_size (gfc_expr *array, int dimen, mpz_t *result)
{
gfc_ref *ref;
......@@ -2064,13 +2064,13 @@ gfc_array_dimen_size (gfc_expr *array, int dimen, mpz_t *result)
array. Returns SUCCESS if this is possible, and sets the 'result'
variable. Otherwise returns FAILURE. */
try
gfc_try
gfc_array_size (gfc_expr *array, mpz_t *result)
{
expand_info expand_save;
gfc_ref *ref;
int i, flag;
try t;
gfc_try t;
switch (array->expr_type)
{
......@@ -2129,7 +2129,7 @@ gfc_array_size (gfc_expr *array, mpz_t *result)
/* Given an array reference, return the shape of the reference in an
array of mpz_t integers. */
try
gfc_try
gfc_array_ref_shape (gfc_array_ref *ar, mpz_t *shape)
{
int d;
......
......@@ -574,7 +574,7 @@ gfc_cpp_init (void)
pp_dir_change (cpp_in, get_src_pwd ());
}
try
gfc_try
gfc_cpp_preprocess (const char *source_file)
{
if (!gfc_cpp_enabled ())
......
......@@ -36,7 +36,7 @@ int gfc_cpp_handle_option(size_t scode, const char *arg, int value);
void gfc_cpp_post_options (void);
try gfc_cpp_preprocess (const char *source_file);
gfc_try gfc_cpp_preprocess (const char *source_file);
void gfc_cpp_done (void);
......
......@@ -46,7 +46,7 @@ get_array_index (gfc_array_ref *ar, mpz_t *offset)
{
gfc_expr *e;
int i;
try re;
gfc_try re;
mpz_t delta;
mpz_t tmp;
......@@ -247,7 +247,7 @@ create_character_intializer (gfc_expr *init, gfc_typespec *ts,
LVALUE already has an initialization, we extend this, otherwise we
create a new one. */
try
gfc_try
gfc_assign_data_value (gfc_expr *lvalue, gfc_expr *rvalue, mpz_t index)
{
gfc_ref *ref;
......
......@@ -19,6 +19,6 @@ along with GCC; see the file COPYING3. If not see
void gfc_formalize_init_value (gfc_symbol *);
void gfc_get_section_index (gfc_array_ref *, mpz_t *, mpz_t *);
try gfc_assign_data_value (gfc_expr *, gfc_expr *, mpz_t);
gfc_try gfc_assign_data_value (gfc_expr *, gfc_expr *, mpz_t);
void gfc_assign_data_value_range (gfc_expr *, gfc_expr *, mpz_t, mpz_t);
void gfc_advance_section (mpz_t *, gfc_array_ref *, mpz_t *);
......@@ -867,11 +867,11 @@ get_proc_name (const char *name, gfc_symbol **result, bool module_fcn_entry)
the compiler could have automatically handled the varying sizes
across platforms. */
try
gfc_try
verify_c_interop_param (gfc_symbol *sym)
{
int is_c_interop = 0;
try retval = SUCCESS;
gfc_try retval = SUCCESS;
/* We check implicitly typed variables in symbol.c:gfc_set_default_type().
Don't repeat the checks here. */
......@@ -1009,7 +1009,7 @@ verify_c_interop_param (gfc_symbol *sym)
/* Function called by variable_decl() that adds a name to the symbol table. */
static try
static gfc_try
build_sym (const char *name, gfc_charlen *cl,
gfc_array_spec **as, locus *var_locus)
{
......@@ -1185,7 +1185,7 @@ gfc_free_enum_history (void)
/* Function called by variable_decl() that adds an initialization
expression to a symbol. */
static try
static gfc_try
add_init_expr_to_sym (const char *name, gfc_expr **initp, locus *var_locus)
{
symbol_attribute attr;
......@@ -1362,7 +1362,7 @@ add_init_expr_to_sym (const char *name, gfc_expr **initp, locus *var_locus)
/* Function called by variable_decl() that adds a name to a structure
being built. */
static try
static gfc_try
build_struct (const char *name, gfc_charlen *cl, gfc_expr **init,
gfc_array_spec **as)
{
......@@ -1548,7 +1548,7 @@ variable_decl (int elem)
gfc_charlen *cl;
locus var_locus;
match m;
try t;
gfc_try t;
gfc_symbol *sym;
locus old_locus;
......@@ -2786,7 +2786,7 @@ match_attr_spec (void)
decl_types d;
const char *attr;
match m;
try t;
gfc_try t;
gfc_clear_attr (&current_attr);
start = gfc_current_locus;
......@@ -3248,7 +3248,7 @@ cleanup:
(J3/04-007, section 15.4.1). If a binding label was given and
there is more than one argument (num_idents), it is an error. */
try
gfc_try
set_binding_label (char *dest_label, const char *sym_name, int num_idents)
{
if (num_idents > 1 && has_name_equals)
......@@ -3288,10 +3288,10 @@ set_com_block_bind_c (gfc_common_head *com_block, int is_bind_c)
/* Verify that the given gfc_typespec is for a C interoperable type. */
try
gfc_try
verify_c_interop (gfc_typespec *ts, const char *name, locus *where)
{
try t;
gfc_try t;
/* Make sure the kind used is appropriate for the type.
The f90_type is unknown if an integer constant was
......@@ -3326,11 +3326,11 @@ verify_c_interop (gfc_typespec *ts, const char *name, locus *where)
interoperable type. Errors will be reported here, if
encountered. */
try
gfc_try
verify_com_block_vars_c_interop (gfc_common_head *com_block)
{
gfc_symbol *curr_sym = NULL;
try retval = SUCCESS;
gfc_try retval = SUCCESS;
curr_sym = com_block->head;
......@@ -3354,11 +3354,11 @@ verify_com_block_vars_c_interop (gfc_common_head *com_block)
/* Verify that a given BIND(C) symbol is C interoperable. If it is not,
an appropriate error message is reported. */
try
gfc_try
verify_bind_c_sym (gfc_symbol *tmp_sym, gfc_typespec *ts,
int is_in_common, gfc_common_head *com_block)
{
try retval = SUCCESS;
gfc_try retval = SUCCESS;
if (tmp_sym->attr.function && tmp_sym->result != NULL)
{
......@@ -3478,10 +3478,10 @@ verify_bind_c_sym (gfc_symbol *tmp_sym, gfc_typespec *ts,
the type is C interoperable. Errors are reported by the functions
used to set/test these fields. */
try
gfc_try
set_verify_bind_c_sym (gfc_symbol *tmp_sym, int num_idents)
{
try retval = SUCCESS;
gfc_try retval = SUCCESS;
/* TODO: Do we need to make sure the vars aren't marked private? */
......@@ -3499,10 +3499,10 @@ set_verify_bind_c_sym (gfc_symbol *tmp_sym, int num_idents)
/* Set the fields marking the given common block as BIND(C), including
a binding label, and report any errors encountered. */
try
gfc_try
set_verify_bind_c_com_block (gfc_common_head *com_block, int num_idents)
{
try retval = SUCCESS;
gfc_try retval = SUCCESS;
/* destLabel, common name, typespec (which may have binding label). */
if (set_binding_label (com_block->binding_label, com_block->name, num_idents)
......@@ -3519,7 +3519,7 @@ set_verify_bind_c_com_block (gfc_common_head *com_block, int num_idents)
/* Retrieve the list of one or more identifiers that the given bind(c)
attribute applies to. */
try
gfc_try
get_bind_c_idents (void)
{
char name[GFC_MAX_SYMBOL_LEN + 1];
......@@ -3792,7 +3792,7 @@ loop:
/* Copy attributes matched by gfc_match_prefix() to attributes on a symbol. */
static try
static gfc_try
copy_prefix (symbol_attribute *dest, locus *where)
{
if (current_attr.pure && gfc_add_pure (dest, where) == FAILURE)
......@@ -6400,7 +6400,7 @@ gfc_match_derived_decl (void)
is the case. Since there is no bounds-checking for Cray Pointees,
this will be okay. */
try
gfc_try
gfc_mod_pointee_as (gfc_array_spec *as)
{
as->cray_pointee = true; /* This will be useful to know later. */
......@@ -6454,7 +6454,7 @@ enumerator_decl (void)
gfc_symbol *sym;
locus var_locus;
match m;
try t;
gfc_try t;
locus old_locus;
initializer = NULL;
......@@ -6537,7 +6537,7 @@ match
gfc_match_enumerator_def (void)
{
match m;
try t;
gfc_try t;
gfc_clear_ts (&current_ts);
......
......@@ -754,7 +754,7 @@ gfc_notification_std (int std)
standard does not contain the requested bits. Return FAILURE if
an error is generated. */
try
gfc_try
gfc_notify_std (int std, const char *nocmsgid, ...)
{
va_list argp;
......
......@@ -824,7 +824,7 @@ is_subref_array (gfc_expr * e)
/* Try to collapse intrinsic expressions. */
static try
static gfc_try
simplify_intrinsic_op (gfc_expr *p, int type)
{
gfc_intrinsic_op op;
......@@ -960,7 +960,7 @@ simplify_intrinsic_op (gfc_expr *p, int type)
/* Subroutine to simplify constructor expressions. Mutually recursive
with gfc_simplify_expr(). */
static try
static gfc_try
simplify_constructor (gfc_constructor *c, int type)
{
gfc_expr *p;
......@@ -996,7 +996,7 @@ simplify_constructor (gfc_constructor *c, int type)
/* Pull a single array element out of an array constructor. */
static try
static gfc_try
find_array_element (gfc_constructor *cons, gfc_array_ref *ar,
gfc_constructor **rval)
{
......@@ -1007,7 +1007,7 @@ find_array_element (gfc_constructor *cons, gfc_array_ref *ar,
mpz_t span;
mpz_t tmp;
gfc_expr *e;
try t;
gfc_try t;
t = SUCCESS;
e = NULL;
......@@ -1115,7 +1115,7 @@ remove_subobject_ref (gfc_expr *p, gfc_constructor *cons)
/* Pull an array section out of an array constructor. */
static try
static gfc_try
find_array_section (gfc_expr *expr, gfc_ref *ref)
{
int idx;
......@@ -1142,7 +1142,7 @@ find_array_section (gfc_expr *expr, gfc_ref *ref)
gfc_expr *upper;
gfc_expr *lower;
gfc_constructor *vecsub[GFC_MAX_DIMENSIONS], *c;
try t;
gfc_try t;
t = SUCCESS;
......@@ -1373,7 +1373,7 @@ cleanup:
/* Pull a substring out of an expression. */
static try
static gfc_try
find_substring_ref (gfc_expr *p, gfc_expr **newp)
{
int end;
......@@ -1405,7 +1405,7 @@ find_substring_ref (gfc_expr *p, gfc_expr **newp)
/* Simplify a subobject reference of a constructor. This occurs when
parameter variable values are substituted. */
static try
static gfc_try
simplify_const_ref (gfc_expr *p)
{
gfc_constructor *cons;
......@@ -1479,7 +1479,7 @@ simplify_const_ref (gfc_expr *p)
/* Simplify a chain of references. */
static try
static gfc_try
simplify_ref_chain (gfc_ref *ref, int type)
{
int n;
......@@ -1517,11 +1517,11 @@ simplify_ref_chain (gfc_ref *ref, int type)
/* Try to substitute the value of a parameter variable. */
static try
static gfc_try
simplify_parameter_variable (gfc_expr *p, int type)
{
gfc_expr *e;
try t;
gfc_try t;
e = gfc_copy_expr (p->symtree->n.sym->value);
if (e == NULL)
......@@ -1562,7 +1562,7 @@ simplify_parameter_variable (gfc_expr *p, int type)
Returns FAILURE on error, SUCCESS otherwise.
NOTE: Will return SUCCESS even if the expression can not be simplified. */
try
gfc_try
gfc_simplify_expr (gfc_expr *p, int type)
{
gfc_actual_arglist *ap;
......@@ -1693,12 +1693,12 @@ et0 (gfc_expr *e)
/* Check an intrinsic arithmetic operation to see if it is consistent
with some type of expression. */
static try check_init_expr (gfc_expr *);
static gfc_try check_init_expr (gfc_expr *);
/* Scalarize an expression for an elemental intrinsic call. */
static try
static gfc_try
scalarize_intrinsic_call (gfc_expr *e)
{
gfc_actual_arglist *a, *b;
......@@ -1831,8 +1831,8 @@ cleanup:
}
static try
check_intrinsic_op (gfc_expr *e, try (*check_function) (gfc_expr *))
static gfc_try
check_intrinsic_op (gfc_expr *e, gfc_try (*check_function) (gfc_expr *))
{
gfc_expr *op1 = e->value.op.op1;
gfc_expr *op2 = e->value.op.op2;
......@@ -2155,11 +2155,11 @@ check_conversion (gfc_expr *e)
intrinsics in the context of initialization expressions. If
FAILURE is returned an error message has been generated. */
static try
static gfc_try
check_init_expr (gfc_expr *e)
{
match m;
try t;
gfc_try t;
if (e == NULL)
return SUCCESS;
......@@ -2334,7 +2334,7 @@ gfc_match_init_expr (gfc_expr **result)
{
gfc_expr *expr;
match m;
try t;
gfc_try t;
m = gfc_match_expr (&expr);
if (m != MATCH_YES)
......@@ -2375,13 +2375,13 @@ gfc_match_init_expr (gfc_expr **result)
}
static try check_restricted (gfc_expr *);
static gfc_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. */
static try
static gfc_try
restricted_args (gfc_actual_arglist *a)
{
for (; a; a = a->next)
......@@ -2399,7 +2399,7 @@ restricted_args (gfc_actual_arglist *a)
/* Make sure a non-intrinsic function is a specification function. */
static try
static gfc_try
external_spec_function (gfc_expr *e)
{
gfc_symbol *f;
......@@ -2441,7 +2441,7 @@ external_spec_function (gfc_expr *e)
/* Check to see that a function reference to an intrinsic is a
restricted expression. */
static try
static gfc_try
restricted_intrinsic (gfc_expr *e)
{
/* TODO: Check constraints on inquiry functions. 7.1.6.2 (7). */
......@@ -2456,11 +2456,11 @@ restricted_intrinsic (gfc_expr *e)
cousin check_init_expr(), an error message is generated if we
return FAILURE. */
static try
static gfc_try
check_restricted (gfc_expr *e)
{
gfc_symbol *sym;
try t;
gfc_try t;
if (e == NULL)
return SUCCESS;
......@@ -2568,7 +2568,7 @@ check_restricted (gfc_expr *e)
/* Check to see that an expression is a specification expression. If
we return FAILURE, an error has been generated. */
try
gfc_try
gfc_specification_expr (gfc_expr *e)
{
......@@ -2611,12 +2611,12 @@ gfc_specification_expr (gfc_expr *e)
/* Given two expressions, make sure that the arrays are conformable. */
try
gfc_try
gfc_check_conformance (const char *optype_msgid, gfc_expr *op1, gfc_expr *op2)
{
int op1_flag, op2_flag, d;
mpz_t op1_size, op2_size;
try t;
gfc_try t;
if (op1->rank == 0 || op2->rank == 0)
return SUCCESS;
......@@ -2661,7 +2661,7 @@ gfc_check_conformance (const char *optype_msgid, gfc_expr *op1, gfc_expr *op2)
/* Given an assignable expression and an arbitrary expression, make
sure that the assignment can take place. */
try
gfc_try
gfc_check_assign (gfc_expr *lvalue, gfc_expr *rvalue, int conform)
{
gfc_symbol *sym;
......@@ -2870,7 +2870,7 @@ gfc_check_assign (gfc_expr *lvalue, gfc_expr *rvalue, int conform)
we only check rvalue if it's not an assignment to NULL() or a
NULLIFY statement. */
try
gfc_try
gfc_check_pointer_assign (gfc_expr *lvalue, gfc_expr *rvalue)
{
symbol_attribute attr;
......@@ -3018,11 +3018,11 @@ gfc_check_pointer_assign (gfc_expr *lvalue, gfc_expr *rvalue)
/* Relative of gfc_check_assign() except that the lvalue is a single
symbol. Used for initialization assignments. */
try
gfc_try
gfc_check_assign_symbol (gfc_symbol *sym, gfc_expr *rvalue)
{
gfc_expr lvalue;
try r;
gfc_try r;
memset (&lvalue, '\0', sizeof (gfc_expr));
......
......@@ -2218,7 +2218,7 @@ pair_cmp (const void *p1, const void *p2)
refer to the same expression. The analysis is conservative.
Returning FAILURE will produce no warning. */
static try
static gfc_try
compare_actual_expr (gfc_expr *e1, gfc_expr *e2)
{
const gfc_ref *r1, *r2;
......@@ -2267,7 +2267,7 @@ compare_actual_expr (gfc_expr *e1, gfc_expr *e2)
another, check that identical actual arguments aren't not
associated with some incompatible INTENTs. */
static try
static gfc_try
check_some_aliasing (gfc_formal_arglist *f, gfc_actual_arglist *a)
{
sym_intent f1_intent, f2_intent;
......@@ -2275,7 +2275,7 @@ check_some_aliasing (gfc_formal_arglist *f, gfc_actual_arglist *a)
gfc_actual_arglist *a1;
size_t n, i, j;
argpair *p;
try t = SUCCESS;
gfc_try t = SUCCESS;
n = 0;
for (f1 = f, a1 = a;; f1 = f1->next, a1 = a1->next)
......@@ -2355,7 +2355,7 @@ compare_parameter_intent (gfc_symbol *formal, gfc_expr *actual)
another, check that they are compatible in the sense that intents
are not mismatched. */
static try
static gfc_try
check_intents (gfc_formal_arglist *f, gfc_actual_arglist *a)
{
sym_intent f_intent;
......@@ -2546,7 +2546,7 @@ find_sym_in_symtree (gfc_symbol *sym)
interface. If one is found, the expression node is replaced with
the appropriate function call. */
try
gfc_try
gfc_extend_expr (gfc_expr *e)
{
gfc_actual_arglist *actual;
......@@ -2677,7 +2677,7 @@ gfc_extend_expr (gfc_expr *e)
SUCCESS if the node was replaced. On FAILURE, no error is
generated. */
try
gfc_try
gfc_extend_assign (gfc_code *c, gfc_namespace *ns)
{
gfc_actual_arglist *actual;
......@@ -2731,7 +2731,7 @@ gfc_extend_assign (gfc_code *c, gfc_namespace *ns)
the given interface list. Ambiguity isn't checked yet since module
procedures can be present without interfaces. */
static try
static gfc_try
check_new_interface (gfc_interface *base, gfc_symbol *new_sym)
{
gfc_interface *ip;
......@@ -2752,7 +2752,7 @@ check_new_interface (gfc_interface *base, gfc_symbol *new_sym)
/* Add a symbol to the current interface. */
try
gfc_try
gfc_add_interface (gfc_symbol *new_sym)
{
gfc_interface **head, *intr;
......
......@@ -175,7 +175,7 @@ find_char_conv (gfc_typespec *from, gfc_typespec *to)
and call the proper check function rather than forcing each
function to manipulate the argument list. */
static try
static gfc_try
do_check (gfc_intrinsic_sym *specific, gfc_actual_arglist *arg)
{
gfc_expr *a1, *a2, *a3, *a4, *a5;
......@@ -334,7 +334,7 @@ add_sym (const char *name, gfc_isym_id id, enum klass cl, int actual_ok, bt type
static void
add_sym_0 (const char *name, gfc_isym_id id, enum klass cl, int actual_ok, bt type,
int kind, int standard,
try (*check) (void),
gfc_try (*check) (void),
gfc_expr *(*simplify) (void),
void (*resolve) (gfc_expr *))
{
......@@ -376,7 +376,7 @@ add_sym_0s (const char *name, gfc_isym_id id, int standard, void (*resolve) (gfc
static void
add_sym_1 (const char *name, gfc_isym_id id, enum klass cl, int actual_ok, bt type,
int kind, int standard,
try (*check) (gfc_expr *),
gfc_try (*check) (gfc_expr *),
gfc_expr *(*simplify) (gfc_expr *),
void (*resolve) (gfc_expr *, gfc_expr *),
const char *a1, bt type1, int kind1, int optional1)
......@@ -400,7 +400,7 @@ add_sym_1 (const char *name, gfc_isym_id id, enum klass cl, int actual_ok, bt ty
static void
add_sym_1s (const char *name, gfc_isym_id id, enum klass cl, bt type, int kind, int standard,
try (*check) (gfc_expr *),
gfc_try (*check) (gfc_expr *),
gfc_expr *(*simplify) (gfc_expr *),
void (*resolve) (gfc_code *),
const char *a1, bt type1, int kind1, int optional1)
......@@ -425,7 +425,7 @@ add_sym_1s (const char *name, gfc_isym_id id, enum klass cl, bt type, int kind,
static void
add_sym_1m (const char *name, gfc_isym_id id, enum klass cl, int actual_ok, bt type,
int kind, int standard,
try (*check) (gfc_actual_arglist *),
gfc_try (*check) (gfc_actual_arglist *),
gfc_expr *(*simplify) (gfc_expr *),
void (*resolve) (gfc_expr *, gfc_actual_arglist *),
const char *a1, bt type1, int kind1, int optional1,
......@@ -452,7 +452,7 @@ add_sym_1m (const char *name, gfc_isym_id id, enum klass cl, int actual_ok, bt t
static void
add_sym_2 (const char *name, gfc_isym_id id, enum klass cl, int actual_ok, bt type,
int kind, int standard,
try (*check) (gfc_expr *, gfc_expr *),
gfc_try (*check) (gfc_expr *, gfc_expr *),
gfc_expr *(*simplify) (gfc_expr *, gfc_expr *),
void (*resolve) (gfc_expr *, gfc_expr *, gfc_expr *),
const char *a1, bt type1, int kind1, int optional1,
......@@ -478,7 +478,7 @@ add_sym_2 (const char *name, gfc_isym_id id, enum klass cl, int actual_ok, bt ty
static void
add_sym_2s (const char *name, gfc_isym_id id, enum klass cl, bt type, int kind, int standard,
try (*check) (gfc_expr *, gfc_expr *),
gfc_try (*check) (gfc_expr *, gfc_expr *),
gfc_expr *(*simplify) (gfc_expr *, gfc_expr *),
void (*resolve) (gfc_code *),
const char *a1, bt type1, int kind1, int optional1,
......@@ -505,7 +505,7 @@ add_sym_2s (const char *name, gfc_isym_id id, enum klass cl, bt type, int kind,
static void
add_sym_3 (const char *name, gfc_isym_id id, enum klass cl, int actual_ok, bt type,
int kind, int standard,
try (*check) (gfc_expr *, gfc_expr *, gfc_expr *),
gfc_try (*check) (gfc_expr *, gfc_expr *, gfc_expr *),
gfc_expr *(*simplify) (gfc_expr *, gfc_expr *, gfc_expr *),
void (*resolve) (gfc_expr *, gfc_expr *, gfc_expr *, gfc_expr *),
const char *a1, bt type1, int kind1, int optional1,
......@@ -534,7 +534,7 @@ add_sym_3 (const char *name, gfc_isym_id id, enum klass cl, int actual_ok, bt ty
static void
add_sym_3ml (const char *name, gfc_isym_id id, enum klass cl, int actual_ok, bt type,
int kind, int standard,
try (*check) (gfc_actual_arglist *),
gfc_try (*check) (gfc_actual_arglist *),
gfc_expr *(*simplify) (gfc_expr *, gfc_expr *, gfc_expr *),
void (*resolve) (gfc_expr *, gfc_expr *, gfc_expr *, gfc_expr *),
const char *a1, bt type1, int kind1, int optional1,
......@@ -563,7 +563,7 @@ add_sym_3ml (const char *name, gfc_isym_id id, enum klass cl, int actual_ok, bt
static void
add_sym_3red (const char *name, gfc_isym_id id, enum klass cl, int actual_ok, bt type,
int kind, int standard,
try (*check) (gfc_actual_arglist *),
gfc_try (*check) (gfc_actual_arglist *),
gfc_expr *(*simplify) (gfc_expr *, gfc_expr *, gfc_expr *),
void (*resolve) (gfc_expr *, gfc_expr *, gfc_expr *, gfc_expr *),
const char *a1, bt type1, int kind1, int optional1,
......@@ -591,7 +591,7 @@ add_sym_3red (const char *name, gfc_isym_id id, enum klass cl, int actual_ok, bt
static void
add_sym_3s (const char *name, gfc_isym_id id, enum klass cl, bt type, int kind, int standard,
try (*check) (gfc_expr *, gfc_expr *, gfc_expr *),
gfc_try (*check) (gfc_expr *, gfc_expr *, gfc_expr *),
gfc_expr *(*simplify) (gfc_expr *, gfc_expr *, gfc_expr *),
void (*resolve) (gfc_code *),
const char *a1, bt type1, int kind1, int optional1,
......@@ -620,7 +620,7 @@ add_sym_3s (const char *name, gfc_isym_id id, enum klass cl, bt type, int kind,
static void
add_sym_4 (const char *name, gfc_isym_id id, enum klass cl, int actual_ok, bt type,
int kind, int standard,
try (*check) (gfc_expr *, gfc_expr *, gfc_expr *, gfc_expr *),
gfc_try (*check) (gfc_expr *, gfc_expr *, gfc_expr *, gfc_expr *),
gfc_expr *(*simplify) (gfc_expr *, gfc_expr *, gfc_expr *,
gfc_expr *),
void (*resolve) (gfc_expr *, gfc_expr *, gfc_expr *, gfc_expr *,
......@@ -652,7 +652,7 @@ add_sym_4 (const char *name, gfc_isym_id id, enum klass cl, int actual_ok, bt ty
static void
add_sym_4s (const char *name, gfc_isym_id id, enum klass cl, bt type, int kind, int standard,
try (*check) (gfc_expr *, gfc_expr *, gfc_expr *, gfc_expr *),
gfc_try (*check) (gfc_expr *, gfc_expr *, gfc_expr *, gfc_expr *),
gfc_expr *(*simplify) (gfc_expr *, gfc_expr *, gfc_expr *,
gfc_expr *),
void (*resolve) (gfc_code *),
......@@ -683,7 +683,7 @@ add_sym_4s (const char *name, gfc_isym_id id, enum klass cl, bt type, int kind,
static void
add_sym_5s (const char *name, gfc_isym_id id, enum klass cl, bt type, int kind, int standard,
try (*check) (gfc_expr *, gfc_expr *, gfc_expr *, gfc_expr *,
gfc_try (*check) (gfc_expr *, gfc_expr *, gfc_expr *, gfc_expr *,
gfc_expr *),
gfc_expr *(*simplify) (gfc_expr *, gfc_expr *, gfc_expr *,
gfc_expr *, gfc_expr *),
......@@ -3024,7 +3024,7 @@ remove_nullargs (gfc_actual_arglist **ap)
wrong (say, a missing required argument) we abort sorting and
return FAILURE. */
static try
static gfc_try
sort_actual (const char *name, gfc_actual_arglist **ap,
gfc_intrinsic_arg *formal, locus *where)
{
......@@ -3145,7 +3145,7 @@ do_sort:
list. The lists are checked for agreement of type. We don't check
for arrayness here. */
static try
static gfc_try
check_arglist (gfc_actual_arglist **ap, gfc_intrinsic_sym *sym,
int error_flag)
{
......@@ -3277,7 +3277,7 @@ resolve_intrinsic (gfc_intrinsic_sym *specific, gfc_expr *e)
of the simplification, SUCCESS if the simplification worked, even
if nothing has changed in the expression itself. */
static try
static gfc_try
do_simplify (gfc_intrinsic_sym *specific, gfc_expr *e)
{
gfc_expr *result, *a1, *a2, *a3, *a4, *a5;
......@@ -3406,11 +3406,11 @@ init_arglist (gfc_intrinsic_sym *isym)
intrinsic's formal argument list. Return SUCCESS if the expression
and intrinsic match, FAILURE otherwise. */
static try
static gfc_try
check_specific (gfc_intrinsic_sym *specific, gfc_expr *expr, int error_flag)
{
gfc_actual_arglist *arg, **ap;
try t;
gfc_try t;
ap = &expr->value.function.actual;
......@@ -3487,7 +3487,7 @@ check_specific (gfc_intrinsic_sym *specific, gfc_expr *expr, int error_flag)
can be used to construct a detailed warning/error message in case of
a FAILURE. */
try
gfc_try
gfc_check_intrinsic_standard (const gfc_intrinsic_sym* isym,
const char** symstd, bool silent, locus where)
{
......@@ -3744,7 +3744,7 @@ fail:
/* Call gfc_convert_type() with warning enabled. */
try
gfc_try
gfc_convert_type (gfc_expr *expr, gfc_typespec *ts, int eflag)
{
return gfc_convert_type_warn (expr, ts, eflag, 1);
......@@ -3761,7 +3761,7 @@ gfc_convert_type (gfc_expr *expr, gfc_typespec *ts, int eflag)
'wflag' controls the warning related to conversion. */
try
gfc_try
gfc_convert_type_warn (gfc_expr *expr, gfc_typespec *ts, int eflag, int wflag)
{
gfc_intrinsic_sym *sym;
......@@ -3860,7 +3860,7 @@ bad:
}
try
gfc_try
gfc_convert_chartype (gfc_expr *expr, gfc_typespec *ts)
{
gfc_intrinsic_sym *sym;
......
......@@ -474,7 +474,7 @@ format_lex (void)
by itself, and we are checking it for validity. The dual origin
means that the warning message is a little less than great. */
static try
static gfc_try
check_format (bool is_input)
{
const char *posint_required = _("Positive width required");
......@@ -489,7 +489,7 @@ check_format (bool is_input)
format_token t, u;
int level;
int repeat;
try rv;
gfc_try rv;
use_last_char = 0;
saved_token = FMT_NONE;
......@@ -981,7 +981,7 @@ finished:
/* Given an expression node that is a constant string, see if it looks
like a format string. */
static try
static gfc_try
check_format_string (gfc_expr *e, bool is_input)
{
if (!e || e->ts.type != BT_CHARACTER || e->expr_type != EXPR_CONSTANT)
......@@ -1191,7 +1191,7 @@ match_ltag (const io_tag *tag, gfc_st_label ** label)
/* Resolution of the FORMAT tag, to be called from resolve_tag. */
static try
static gfc_try
resolve_tag_format (const gfc_expr *e)
{
if (e->expr_type == EXPR_CONSTANT
......@@ -1260,7 +1260,7 @@ resolve_tag_format (const gfc_expr *e)
/* Do expression resolution and type-checking on an expression tag. */
static try
static gfc_try
resolve_tag (const io_tag *tag, gfc_expr *e)
{
if (e == NULL)
......@@ -1417,7 +1417,7 @@ gfc_free_open (gfc_open *open)
/* Resolve everything in a gfc_open structure. */
try
gfc_try
gfc_resolve_open (gfc_open *open)
{
......@@ -2017,7 +2017,7 @@ cleanup:
/* Resolve everything in a gfc_close structure. */
try
gfc_try
gfc_resolve_close (gfc_close *close)
{
RESOLVE_TAG (&tag_unit, close->unit);
......@@ -2141,7 +2141,7 @@ cleanup:
}
try
gfc_try
gfc_resolve_filepos (gfc_filepos *fp)
{
RESOLVE_TAG (&tag_unit, fp->unit);
......@@ -2467,7 +2467,7 @@ gfc_free_dt (gfc_dt *dt)
/* Resolve everything in a gfc_dt structure. */
try
gfc_try
gfc_resolve_dt (gfc_dt *dt)
{
gfc_expr *e;
......@@ -3705,7 +3705,7 @@ cleanup:
/* Resolve everything in a gfc_inquire structure. */
try
gfc_try
gfc_resolve_inquire (gfc_inquire *inquire)
{
RESOLVE_TAG (&tag_unit, inquire->unit);
......@@ -3764,7 +3764,7 @@ gfc_free_wait (gfc_wait *wait)
}
try
gfc_try
gfc_resolve_wait (gfc_wait *wait)
{
RESOLVE_TAG (&tag_unit, wait->unit);
......
......@@ -175,10 +175,10 @@ match gfc_match_volatile (void);
/* Fortran 2003 c interop.
TODO: some of these should be moved to another file rather than decl.c */
void set_com_block_bind_c (gfc_common_head *, int);
try set_binding_label (char *, const char *, int);
try set_verify_bind_c_sym (gfc_symbol *, int);
try set_verify_bind_c_com_block (gfc_common_head *, int);
try get_bind_c_idents (void);
gfc_try set_binding_label (char *, const char *, int);
gfc_try set_verify_bind_c_sym (gfc_symbol *, int);
gfc_try set_verify_bind_c_com_block (gfc_common_head *, int);
gfc_try get_bind_c_idents (void);
match gfc_match_bind_c_stmt (void);
match gfc_match_suffix (gfc_symbol *, gfc_symbol **);
match gfc_match_bind_c (gfc_symbol *, bool);
......
......@@ -923,7 +923,7 @@ pop_state (void)
/* Try to find the given state in the state stack. */
try
gfc_try
gfc_find_state (gfc_compile_state state)
{
gfc_state_data *p;
......@@ -1575,7 +1575,7 @@ typedef struct
}
st_state;
static try
static gfc_try
verify_st_order (st_state *p, gfc_statement st)
{
......@@ -3563,7 +3563,7 @@ add_global_program (void)
/* Top level parser. */
try
gfc_try
gfc_parse_file (void)
{
int seen_program, errors_before, errors;
......
......@@ -61,7 +61,7 @@ extern gfc_state_data *gfc_state_stack;
#define gfc_current_state() (gfc_state_stack->state)
int gfc_check_do_variable (gfc_symtree *);
try gfc_find_state (gfc_compile_state);
gfc_try gfc_find_state (gfc_compile_state);
gfc_state_data *gfc_enclosing_unit (gfc_compile_state *);
const char *gfc_ascii_statement (gfc_statement);
match gfc_match_enum (void);
......
......@@ -1672,7 +1672,7 @@ preprocessor_line (gfc_char_t *c)
}
static try load_file (const char *, const char *, bool);
static gfc_try load_file (const char *, const char *, bool);
/* include_line()-- Checks a line buffer to see if it is an include
line. If so, we call load_file() recursively to load the included
......@@ -1751,7 +1751,7 @@ include_line (gfc_char_t *line)
/* Load a file into memory by calling load_line until the file ends. */
static try
static gfc_try
load_file (const char *realfilename, const char *displayedname, bool initial)
{
gfc_char_t *line;
......@@ -1921,10 +1921,10 @@ load_file (const char *realfilename, const char *displayedname, bool initial)
it tries to determine the source form from the filename, defaulting
to free form. */
try
gfc_try
gfc_new_file (void)
{
try result;
gfc_try result;
if (gfc_cpp_enabled ())
{
......
......@@ -3942,7 +3942,7 @@ gfc_simplify_shape (gfc_expr *source)
gfc_expr *result, *e, *f;
gfc_array_ref *ar;
int n;
try t;
gfc_try t;
if (source->rank == 0)
return gfc_start_constructor (BT_INTEGER, gfc_default_integer_kind,
......
......@@ -454,7 +454,7 @@ gfc_trans_omp_array_reduction (tree c, gfc_symbol *sym, locus where)
tree decl, backend_decl, stmt;
locus old_loc = gfc_current_locus;
const char *iname;
try t;
gfc_try t;
decl = OMP_CLAUSE_DECL (c);
gfc_current_locus = where;
......
......@@ -124,14 +124,14 @@ int gfc_character_storage_size;
if a mismatch occurs between ts->f90_type and ts->type; SUCCESS if
they match. */
try
gfc_try
gfc_validate_c_kind (gfc_typespec *ts)
{
return ((ts->type == ts->f90_type) ? SUCCESS : FAILURE);
}
try
gfc_try
gfc_check_any_c_kind (gfc_typespec *ts)
{
int i;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment