/* Check whether an expression is a structure constructor and whether it has
other values than NULL. */
-bool
+static bool
is_non_empty_structure_constructor (gfc_expr * e)
{
if (e->expr_type != EXPR_STRUCTURE)
extern bool gfc_seen_div0;
/* trans-types.c */
-bool gfc_check_any_c_kind (gfc_typespec *);
int gfc_validate_kind (bt, int, bool);
int gfc_get_int_kind_from_width_isofortranenv (int size);
int gfc_get_real_kind_from_width_isofortranenv (int size);
it. We also make sure the symbol does not refer to another
(active) block. A matched label is pointed to by gfc_new_block. */
-match
+static match
gfc_match_label (void)
{
char name[GFC_MAX_SYMBOL_LEN + 1];
match gfc_match_eos (void);
match gfc_match_small_literal_int (int *, int *);
match gfc_match_st_label (gfc_st_label **);
-match gfc_match_label (void);
match gfc_match_small_int (int *);
match gfc_match_small_int_expr (int *, gfc_expr **);
match gfc_match_name (char *);
gfc_linebuf *lb;
int line;
} *file_changes;
-size_t file_changes_cur, file_changes_count;
-size_t file_changes_allocated;
+static size_t file_changes_cur, file_changes_count;
+static size_t file_changes_allocated;
static gfc_char_t *last_error_char;
/* Calculate the number of characters in a string. */
-tree
+static tree
gfc_get_character_len (tree type)
{
tree len;
/* Try to get the _len component of a class. When the class is not unlimited
poly, i.e. no _len field exists, then return a zero node. */
-tree
+static tree
gfc_class_len_or_zero_get (tree decl)
{
tree len;
VTAB_GET_FIELD_GEN (copy, VTABLE_COPY_FIELD)
VTAB_GET_FIELD_GEN (final, VTABLE_FINAL_FIELD)
VTAB_GET_FIELD_GEN (deallocate, VTABLE_DEALLOCATE_FIELD)
-
+#undef VTAB_GET_FIELD_GEN
/* The size field is returned as an array index type. Therefore treat
it and only it specially. */
/* Given a class array declaration and an index, returns the address
of the referenced element. */
-tree
+static tree
gfc_get_class_array_ref (tree index, tree class_decl, tree data_comp,
bool unlimited)
{
the length of each argument, adding any initialization code to PRE and
any finalization code to POST. */
-void
+static void
gfc_finish_interface_mapping (gfc_interface_mapping * mapping,
stmtblock_t * pre, stmtblock_t * post)
{
tree prvoid_type_node;
tree ppvoid_type_node;
tree pchar_type_node;
-tree pfunc_type_node;
+static tree pfunc_type_node;
tree logical_type_node;
tree logical_true_node;
int gfc_numeric_storage_size;
int gfc_character_storage_size;
-tree dtype_type_node = NULL_TREE;
+static tree dtype_type_node = NULL_TREE;
/* Build the dtype_type_node if necessary. */
return dtype_type_node;
}
-bool
-gfc_check_any_c_kind (gfc_typespec *ts)
-{
- int i;
-
- for (i = 0; i < ISOCBINDING_NUMBER; i++)
- {
- /* Check for any C interoperable kind for the given type/kind in ts.
- This can be used after verify_c_interop to make sure that the
- Fortran kind being used exists in at least some form for C. */
- if (c_interop_kinds_table[i].f90_type == ts->type &&
- c_interop_kinds_table[i].value == ts->kind)
- return true;
- }
-
- return false;
-}
-
-
static int
get_real_kind_from_node (tree type)
{
/* Build a tree node for a procedure pointer component. */
-tree
+static tree
gfc_get_ppc_type (gfc_component* c)
{
tree t;
tree gfc_get_dtype_rank_type (int, tree);
tree gfc_get_dtype (tree, int *rank = NULL);
-tree gfc_get_ppc_type (gfc_component *);
tree gfc_get_caf_vector_type (int dim);
tree gfc_get_caf_reference_type ();
static gfc_file *gfc_current_backend_file;
const char gfc_msg_fault[] = N_("Array reference out of bounds");
-const char gfc_msg_wrong_return[] = N_("Incorrect function return value");
/* Return a location_t suitable for 'tree' for a gfortran locus. The way the
tree gfc_class_data_get (tree);
tree gfc_class_vptr_get (tree);
tree gfc_class_len_get (tree);
-tree gfc_class_len_or_zero_get (tree);
tree gfc_resize_class_size_with_len (stmtblock_t *, tree, tree);
gfc_expr * gfc_find_and_cut_at_last_class_ref (gfc_expr *, bool is_mold = false,
gfc_typespec **ts = NULL);
available. */
tree gfc_class_vtab_hash_get (tree);
tree gfc_class_vtab_size_get (tree);
-tree gfc_class_vtab_extends_get (tree);
tree gfc_class_vtab_def_init_get (tree);
tree gfc_class_vtab_copy_get (tree);
tree gfc_class_vtab_final_get (tree);
/* Get an accessor to the vtab's * field, when a vptr handle is present. */
tree gfc_vptr_hash_get (tree);
tree gfc_vptr_size_get (tree);
-tree gfc_vptr_extends_get (tree);
tree gfc_vptr_def_init_get (tree);
tree gfc_vptr_copy_get (tree);
tree gfc_vptr_final_get (tree);
tree gfc_get_class_from_gfc_expr (gfc_expr *);
tree gfc_get_class_from_expr (tree);
tree gfc_get_vptr_from_expr (tree);
-tree gfc_get_class_array_ref (tree, tree, tree, bool);
tree gfc_copy_class_to_class (tree, tree, tree, bool);
bool gfc_add_finalizer_call (stmtblock_t *, gfc_expr *);
bool gfc_add_comp_finalizer_call (stmtblock_t *, tree, gfc_component *, bool);
/* trans-expr.c */
-tree gfc_get_character_len (tree);
tree gfc_get_character_len_in_bytes (tree);
tree gfc_conv_scalar_to_descriptor (gfc_se *, tree, symbol_attribute);
tree gfc_get_ultimate_alloc_ptr_comps_caf_token (gfc_se *, gfc_expr *);
gfc_actual_arglist *args = NULL,
const char *fnspec = NULL);
-/* Return the decl for a function. */
-tree gfc_get_function_decl (gfc_symbol *);
-
/* Build an ADDR_EXPR. */
tree gfc_build_addr_expr (tree, tree);
void gfc_free_interface_mapping (gfc_interface_mapping *);
void gfc_add_interface_mapping (gfc_interface_mapping *,
gfc_symbol *, gfc_se *, gfc_expr *);
-void gfc_finish_interface_mapping (gfc_interface_mapping *,
- stmtblock_t *, stmtblock_t *);
void gfc_apply_interface_mapping (gfc_interface_mapping *,
gfc_se *, gfc_expr *);
/* Standard error messages used in all the trans-*.c files. */
extern const char gfc_msg_fault[];
-extern const char gfc_msg_wrong_return[];
#define OMPWS_WORKSHARE_FLAG 1 /* Set if in a workshare construct. */
#define OMPWS_CURR_SINGLEUNIT 2 /* Set if current gfc_code in workshare