/* Header for code translation functions
- Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
- Free Software Foundation, Inc.
+ Copyright (C) 2002-2015 Free Software Foundation, Inc.
Contributed by Paul Brook
This file is part of GCC.
#ifndef GFC_TRANS_H
#define GFC_TRANS_H
+#include "predict.h" /* For enum br_predictor and PRED_*. */
+
/* Mangled symbols take the form __module__name. */
#define GFC_MAX_MANGLED_SYMBOL_LEN (GFC_MAX_SYMBOL_LEN*2+4)
/* The length of a character string value. */
tree string_length;
+ /* When expr is a reference to a class object, store its vptr access
+ here. */
+ tree class_vptr;
+
/* If set gfc_conv_variable will return an expression for the array
descriptor. When set, want_pointer should also be set.
If not set scalarizing variables will be substituted. */
args alias. */
unsigned force_tmp:1;
+ /* Unconditionally calculate offset for array segments and constant
+ arrays in gfc_conv_expr_descriptor. */
+ unsigned use_offset:1;
+
+ unsigned want_coarray:1;
+
/* Scalarization parameters. */
struct gfc_se *parent;
struct gfc_ss *ss;
gfc_se;
-/* Scalarization State chain. Created by walking an expression tree before
- creating the scalarization loops. Then passed as part of a gfc_se structure
- to translate the expression inside the loop. Note that these chains are
- terminated by gfc_se_terminator, not NULL. A NULL pointer in a gfc_se
- indicates to gfc_conv_* that this is a scalar expression.
- Note that some member arrays correspond to scalarizer rank and others
- are the variable rank. */
+/* Denotes different types of coarray.
+ Please keep in sync with libgfortran/caf/libcaf.h. */
+typedef enum
+{
+ GFC_CAF_COARRAY_STATIC,
+ GFC_CAF_COARRAY_ALLOC,
+ GFC_CAF_LOCK_STATIC,
+ GFC_CAF_LOCK_ALLOC,
+ GFC_CAF_CRITICAL
+}
+gfc_coarray_type;
-typedef struct gfc_ss_info
+
+/* The array-specific scalarization information. The array members of
+ this struct are indexed by actual array index, and thus can be sparse. */
+
+typedef struct gfc_array_info
{
- int dimen;
+ mpz_t *shape;
+
/* The ref that holds information on this section. */
gfc_ref *ref;
/* The descriptor of this array. */
tree end[GFC_MAX_DIMENSIONS];
tree stride[GFC_MAX_DIMENSIONS];
tree delta[GFC_MAX_DIMENSIONS];
-
- /* Translation from loop dimensions to actual dimensions.
- actual_dim = dim[loop_dim] */
- int dim[GFC_MAX_DIMENSIONS];
}
-gfc_ss_info;
+gfc_array_info;
typedef enum
{
GFC_SS_SCALAR,
/* Like GFC_SS_SCALAR it evaluates the expression outside the
- loop. Is always evaluated as a reference to the temporary.
- Used for elemental function arguments. */
+ loop. Is always evaluated as a reference to the temporary, unless
+ temporary evaluation can result in a NULL pointer dereferencing (case of
+ optional arguments). Used for elemental function arguments. */
GFC_SS_REFERENCE,
/* An array section. Scalarization indices will be substituted during
/* An intrinsic function call. Many intrinsic functions which map directly
to library calls are created as GFC_SS_FUNCTION nodes. */
GFC_SS_INTRINSIC,
-
+
/* A component of a derived type. */
GFC_SS_COMPONENT
}
gfc_ss_type;
-/* SS structures can only belong to a single loopinfo. They must be added
- otherwise they will not get freed. */
-typedef struct gfc_ss
+
+typedef struct gfc_ss_info
{
+ int refcount;
gfc_ss_type type;
gfc_expr *expr;
- mpz_t *shape;
tree string_length;
+
union
{
/* If type is GFC_SS_SCALAR or GFC_SS_REFERENCE. */
struct
{
- tree expr;
+ tree value;
}
scalar;
/* GFC_SS_TEMP. */
struct
{
- /* The rank of the temporary. May be less than the rank of the
- assigned expression. */
- int dimen;
tree type;
}
temp;
+
/* All other types. */
- gfc_ss_info info;
+ gfc_array_info array;
}
data;
+ /* This is used by assignments requiring temporaries. The bits specify which
+ loops the terms appear in. This will be 1 for the RHS expressions,
+ 2 for the LHS expressions, and 3(=1|2) for the temporary. */
+ unsigned useflags:2;
+
+ /* Suppresses precalculation of scalars in WHERE assignments. */
+ unsigned where:1;
+
+ /* This set for an elemental function that contains expressions for
+ external arrays, thereby triggering creation of a temporary. */
+ unsigned array_outer_dependency:1;
+
+ /* Tells whether the SS is for an actual argument which can be a NULL
+ reference. In other words, the associated dummy argument is OPTIONAL.
+ Used to handle elemental procedures. */
+ bool can_be_null_ref;
+}
+gfc_ss_info;
+
+#define gfc_get_ss_info() XCNEW (gfc_ss_info)
+
+
+/* Scalarization State chain. Created by walking an expression tree before
+ creating the scalarization loops. Then passed as part of a gfc_se structure
+ to translate the expression inside the loop. Note that these chains are
+ terminated by gfc_ss_terminator, not NULL. A NULL pointer in a gfc_se
+ indicates to gfc_conv_* that this is a scalar expression.
+ SS structures can only belong to a single loopinfo. They must be added
+ otherwise they will not get freed. */
+
+typedef struct gfc_ss
+{
+ gfc_ss_info *info;
+
+ int dimen;
+ /* Translation from loop dimensions to actual array dimensions.
+ actual_dim = dim[loop_dim] */
+ int dim[GFC_MAX_DIMENSIONS];
+
/* All the SS in a loop and linked through loop_chain. The SS for an
expression are linked by the next pointer. */
struct gfc_ss *loop_chain;
struct gfc_ss *next;
- /* This is used by assignments requiring temporaries. The bits specify which
- loops the terms appear in. This will be 1 for the RHS expressions,
- 2 for the LHS expressions, and 3(=1|2) for the temporary. The bit
- 'where' suppresses precalculation of scalars in WHERE assignments. */
- unsigned useflags:2, where:1;
+ /* Non-null if the ss is part of a nested loop. */
+ struct gfc_ss *parent;
+
+ /* If the evaluation of an expression requires a nested loop (for example
+ if the sum intrinsic is evaluated inline), this points to the nested
+ loop's gfc_ss. */
+ struct gfc_ss *nested_ss;
+
+ /* The loop this gfc_ss is in. */
+ struct gfc_loopinfo *loop;
+
+ unsigned is_alloc_lhs:1;
}
gfc_ss;
#define gfc_get_ss() XCNEW (gfc_ss)
/* The SS describing the temporary used in an assignment. */
gfc_ss *temp_ss;
+ /* Non-null if this loop is nested in another one. */
+ struct gfc_loopinfo *parent;
+
+ /* Chain of nested loops. */
+ struct gfc_loopinfo *nested, *next;
+
/* The scalarization loop index variables. */
tree loopvar[GFC_MAX_DIMENSIONS];
}
gfc_loopinfo;
+#define gfc_get_loopinfo() XCNEW (gfc_loopinfo)
/* Information about a symbol that has been shadowed by a temporary. */
typedef struct
}
gfc_wrapped_block;
+/* Class API functions. */
+tree gfc_class_set_static_fields (tree, tree, tree);
+tree gfc_class_data_get (tree);
+tree gfc_class_vptr_get (tree);
+tree gfc_class_len_get (tree);
+gfc_expr * gfc_find_and_cut_at_last_class_ref (gfc_expr *);
+/* Get an accessor to the class' vtab's * field, when a class handle is
+ 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_vtpr_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);
+void gfc_reset_vptr (stmtblock_t *, gfc_expr *);
+void gfc_reset_len (stmtblock_t *, gfc_expr *);
+tree gfc_get_vptr_from_expr (tree);
+tree gfc_get_class_array_ref (tree, tree);
+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);
+
+void gfc_conv_derived_to_class (gfc_se *, gfc_expr *, gfc_typespec, tree, bool,
+ bool);
+void gfc_conv_class_to_class (gfc_se *, gfc_expr *, gfc_typespec, bool, bool,
+ bool, bool);
/* Initialize an init/cleanup block. */
void gfc_start_wrapped_block (gfc_wrapped_block* block, tree code);
/* Compare two strings. */
tree gfc_build_compare_string (tree, tree, tree, tree, int, enum tree_code);
-/* Add an item to the end of TREE_LIST. */
-tree gfc_chainon_list (tree, tree);
-
/* When using the gfc_conv_* make sure you understand what they do, i.e.
when a POST chain may be created, and what the returned expression may be
used for. Note that character strings have special handling. This
void gfc_conv_expr_reference (gfc_se * se, gfc_expr *);
void gfc_conv_expr_type (gfc_se * se, gfc_expr *, tree);
+tree gfc_conv_scalar_to_descriptor (gfc_se *, tree, symbol_attribute);
+
+
/* trans-expr.c */
void gfc_conv_scalar_char_value (gfc_symbol *sym, gfc_se *se, gfc_expr **expr);
tree gfc_string_to_single_character (tree len, tree str, int kind);
+tree gfc_get_tree_for_caf_expr (gfc_expr *);
+void gfc_get_caf_token_offset (tree *, tree *, tree, tree, gfc_expr *);
+tree gfc_caf_get_image_index (stmtblock_t *, gfc_expr *, tree);
/* Find the decl containing the auxiliary variables for assigned variables. */
void gfc_conv_label_variable (gfc_se * se, gfc_expr * expr);
/* Find the appropriate variant of a math intrinsic. */
tree gfc_builtin_decl_for_float_kind (enum built_in_function, int);
-/* Intrinsic function handling. */
+tree size_of_string_in_bytes (int, tree);
+
+/* Intrinsic procedure handling. */
+tree gfc_conv_intrinsic_subroutine (gfc_code *);
void gfc_conv_intrinsic_function (gfc_se *, gfc_expr *);
+bool gfc_conv_ieee_arithmetic_function (gfc_se *, gfc_expr *);
+tree gfc_save_fp_state (stmtblock_t *);
+void gfc_restore_fp_state (stmtblock_t *, tree);
-/* Is the intrinsic expanded inline. */
-bool gfc_inline_intrinsic_function_p (gfc_expr *);
/* Does an intrinsic map directly to an external library call
This is true for array-returning intrinsics, unless
gfc_inline_intrinsic_function_p returns true. */
int gfc_is_intrinsic_libcall (gfc_expr *);
-tree gfc_conv_intrinsic_move_alloc (gfc_code *);
-
/* Used to call ordinary functions/subroutines
and procedure pointer components. */
int gfc_conv_procedure_call (gfc_se *, gfc_symbol *, gfc_actual_arglist *,
- gfc_expr *, VEC(tree,gc) *);
+ gfc_expr *, vec<tree, va_gc> *);
void gfc_conv_subref_array_arg (gfc_se *, gfc_expr *, int, sym_intent, bool);
-/* gfc_trans_* shouldn't call push/poplevel, use gfc_push/pop_scope */
-
/* Generate code for a scalar assignment. */
tree gfc_trans_scalar_assign (gfc_se *, gfc_se *, gfc_typespec, bool, bool,
bool);
/* Add an expression to the end of a block. */
void gfc_add_expr_to_block (stmtblock_t *, tree);
+/* Add an expression to the beginning of a block. */
+void gfc_prepend_expr_to_block (stmtblock_t *, tree);
/* Add a block to the end of a block. */
void gfc_add_block_to_block (stmtblock_t *, stmtblock_t *);
/* Add a MODIFY_EXPR to a block. */
tree gfc_build_addr_expr (tree, tree);
/* Build an ARRAY_REF. */
-tree gfc_build_array_ref (tree, tree, tree);
+tree gfc_build_array_ref (tree, tree, tree, tree vptr = NULL_TREE);
/* Creates a label. Decl is artificial if label_id == NULL_TREE. */
tree gfc_build_label_decl (tree);
/* Set the backend source location of a decl. */
void gfc_set_decl_location (tree, locus *);
+/* Get a module symbol backend_decl if possible. */
+bool gfc_get_module_backend_decl (gfc_symbol *);
+
/* Return the variable decl for a symbol. */
tree gfc_get_symbol_decl (gfc_symbol *);
/* Returns true if a variable of specified size should go on the stack. */
int gfc_can_put_var_on_stack (tree);
+/* Set GFC_DECL_SCALAR_* on decl from sym if needed. */
+void gfc_finish_decl_attrs (tree, symbol_attribute *);
+
/* Allocate the lang-specific part of a decl node. */
void gfc_allocate_lang_decl (tree);
/* Get the appropriate return statement for a procedure. */
tree gfc_generate_return (void);
-struct GTY(()) module_htab_entry {
+struct module_decl_hasher : ggc_hasher<tree_node *>
+{
+ typedef const char *compare_type;
+
+ static hashval_t hash (tree);
+ static bool equal (tree, const char *);
+};
+
+struct GTY((for_user)) module_htab_entry {
const char *name;
tree namespace_decl;
- htab_t GTY ((param_is (union tree_node))) decls;
+ hash_table<module_decl_hasher> *GTY (()) decls;
};
struct module_htab_entry *gfc_find_module (const char *);
/* Get the string length of an array constructor. */
bool get_array_ctor_strlen (stmtblock_t *, gfc_constructor_base, tree *);
+/* Mark a condition as likely or unlikely. */
+tree gfc_likely (tree, enum br_predictor);
+tree gfc_unlikely (tree, enum br_predictor);
+
+/* Return the string length of a deferred character length component. */
+bool gfc_deferred_strlen (gfc_component *, tree *);
+
/* Generate a runtime error call. */
tree gfc_trans_runtime_error (bool, locus*, const char*, ...);
/* Build a memcpy call. */
tree gfc_build_memcpy_call (tree, tree, tree);
-/* Allocate memory for arrays, with optional status variable. */
-tree gfc_allocate_array_with_status (stmtblock_t*, tree, tree, tree, gfc_expr*);
+/* Allocate memory for allocatable variables, with optional status variable. */
+void gfc_allocate_allocatable (stmtblock_t*, tree, tree, tree, tree,
+ tree, tree, tree, gfc_expr*);
/* Allocate memory, with optional status variable. */
-tree gfc_allocate_with_status (stmtblock_t *, tree, tree);
+void gfc_allocate_using_malloc (stmtblock_t *, tree, tree, tree);
/* Generate code to deallocate an array. */
-tree gfc_deallocate_with_status (tree, tree, bool, gfc_expr*);
+tree gfc_deallocate_with_status (tree, tree, tree, tree, tree, bool,
+ gfc_expr *, bool);
+tree gfc_deallocate_scalar_with_status (tree, tree, bool, gfc_expr*, gfc_typespec);
/* Generate code to call realloc(). */
tree gfc_call_realloc (stmtblock_t *, tree, tree);
/* Initialize function decls for library functions. */
void gfc_build_intrinsic_lib_fndecls (void);
/* Create function decls for IO library functions. */
-void gfc_trans_io_runtime_check (tree, tree, int, const char *, stmtblock_t *);
void gfc_build_io_library_fndecls (void);
/* Build a function decl for a library function. */
tree gfc_build_library_function_decl (tree, tree, int, ...);
tree rettype, int nargs, ...);
/* Process the local variable decls of a block construct. */
-void gfc_process_block_locals (gfc_namespace*, gfc_association_list*);
+void gfc_process_block_locals (gfc_namespace*);
/* Output initialization/clean-up code that was deferred. */
void gfc_trans_deferred_vars (gfc_symbol*, gfc_wrapped_block *);
/* In f95-lang.c. */
tree pushdecl (tree);
tree pushdecl_top_level (tree);
-void pushlevel (int);
-tree poplevel (int, int, int);
+void pushlevel (void);
+tree poplevel (int, int);
tree getdecls (void);
-tree gfc_truthvalue_conversion (tree);
-tree gfc_builtin_function (tree);
/* In trans-types.c. */
struct array_descr_info;
tree gfc_omp_clause_default_ctor (tree, tree, tree);
tree gfc_omp_clause_copy_ctor (tree, tree, tree);
tree gfc_omp_clause_assign_op (tree, tree, tree);
+tree gfc_omp_clause_linear_ctor (tree, tree, tree, tree);
tree gfc_omp_clause_dtor (tree, tree);
+void gfc_omp_finish_clause (tree, gimple_seq *);
bool gfc_omp_disregard_value_expr (tree, bool);
bool gfc_omp_private_debug_clause (tree, bool);
bool gfc_omp_private_outer_ref (tree);
extern GTY(()) tree gfor_fndecl_in_pack;
extern GTY(()) tree gfor_fndecl_in_unpack;
extern GTY(()) tree gfor_fndecl_associated;
+extern GTY(()) tree gfor_fndecl_system_clock4;
+extern GTY(()) tree gfor_fndecl_system_clock8;
+
+
+/* Coarray run-time library function decls. */
+extern GTY(()) tree gfor_fndecl_caf_init;
+extern GTY(()) tree gfor_fndecl_caf_finalize;
+extern GTY(()) tree gfor_fndecl_caf_this_image;
+extern GTY(()) tree gfor_fndecl_caf_num_images;
+extern GTY(()) tree gfor_fndecl_caf_register;
+extern GTY(()) tree gfor_fndecl_caf_deregister;
+extern GTY(()) tree gfor_fndecl_caf_get;
+extern GTY(()) tree gfor_fndecl_caf_send;
+extern GTY(()) tree gfor_fndecl_caf_sendget;
+extern GTY(()) tree gfor_fndecl_caf_sync_all;
+extern GTY(()) tree gfor_fndecl_caf_sync_memory;
+extern GTY(()) tree gfor_fndecl_caf_sync_images;
+extern GTY(()) tree gfor_fndecl_caf_error_stop;
+extern GTY(()) tree gfor_fndecl_caf_error_stop_str;
+extern GTY(()) tree gfor_fndecl_caf_atomic_def;
+extern GTY(()) tree gfor_fndecl_caf_atomic_ref;
+extern GTY(()) tree gfor_fndecl_caf_atomic_cas;
+extern GTY(()) tree gfor_fndecl_caf_atomic_op;
+extern GTY(()) tree gfor_fndecl_caf_lock;
+extern GTY(()) tree gfor_fndecl_caf_unlock;
+extern GTY(()) tree gfor_fndecl_co_broadcast;
+extern GTY(()) tree gfor_fndecl_co_max;
+extern GTY(()) tree gfor_fndecl_co_min;
+extern GTY(()) tree gfor_fndecl_co_reduce;
+extern GTY(()) tree gfor_fndecl_co_sum;
+
/* Math functions. Many other math functions are handled in
trans-intrinsic.c. */
extern GTY(()) tree gfor_fndecl_si_kind;
extern GTY(()) tree gfor_fndecl_sr_kind;
+/* IEEE-related. */
+extern GTY(()) tree gfor_fndecl_ieee_procedure_entry;
+extern GTY(()) tree gfor_fndecl_ieee_procedure_exit;
+
/* True if node is an integer constant. */
#define INTEGER_CST_P(node) (TREE_CODE(node) == INTEGER_CST)
GFC_ARRAY_UNKNOWN,
GFC_ARRAY_ASSUMED_SHAPE,
GFC_ARRAY_ASSUMED_SHAPE_CONT,
+ GFC_ARRAY_ASSUMED_RANK,
+ GFC_ARRAY_ASSUMED_RANK_CONT,
GFC_ARRAY_ALLOCATABLE,
GFC_ARRAY_POINTER,
GFC_ARRAY_POINTER_CONT
};
/* Array types only. */
-/* FIXME: the variable_size annotation here is needed because these types are
- variable-sized in some other frontends. Due to gengtype deficiency the GTY
- options of such types have to agree across all frontends. */
-struct GTY((variable_size)) lang_type {
- int rank;
+struct GTY(()) lang_type {
+ int rank, corank;
enum gfc_array_kind akind;
tree lbound[GFC_MAX_DIMENSIONS];
tree ubound[GFC_MAX_DIMENSIONS];
tree dataptr_type;
tree span;
tree base_decl[2];
+ tree nonrestricted_type;
+ tree caf_token;
+ tree caf_offset;
};
-struct GTY((variable_size)) lang_decl {
+struct GTY(()) lang_decl {
/* Dummy variables. */
tree saved_descriptor;
/* Assigned integer nodes. Stringlength is the IO format string's length.
tree stringlen;
tree addr;
tree span;
+ /* For assumed-shape coarrays. */
+ tree token, caf_offset;
+ unsigned int scalar_allocatable : 1;
+ unsigned int scalar_pointer : 1;
};
#define GFC_DECL_ASSIGN_ADDR(node) DECL_LANG_SPECIFIC(node)->addr
#define GFC_DECL_STRING_LEN(node) DECL_LANG_SPECIFIC(node)->stringlen
#define GFC_DECL_SPAN(node) DECL_LANG_SPECIFIC(node)->span
+#define GFC_DECL_TOKEN(node) DECL_LANG_SPECIFIC(node)->token
+#define GFC_DECL_CAF_OFFSET(node) DECL_LANG_SPECIFIC(node)->caf_offset
#define GFC_DECL_SAVED_DESCRIPTOR(node) \
(DECL_LANG_SPECIFIC(node)->saved_descriptor)
+#define GFC_DECL_SCALAR_ALLOCATABLE(node) \
+ (DECL_LANG_SPECIFIC (node)->scalar_allocatable)
+#define GFC_DECL_SCALAR_POINTER(node) \
+ (DECL_LANG_SPECIFIC (node)->scalar_pointer)
+#define GFC_DECL_GET_SCALAR_ALLOCATABLE(node) \
+ (DECL_LANG_SPECIFIC (node) ? GFC_DECL_SCALAR_ALLOCATABLE (node) : 0)
+#define GFC_DECL_GET_SCALAR_POINTER(node) \
+ (DECL_LANG_SPECIFIC (node) ? GFC_DECL_SCALAR_POINTER (node) : 0)
#define GFC_DECL_PACKED_ARRAY(node) DECL_LANG_FLAG_0(node)
#define GFC_DECL_PARTIAL_PACKED_ARRAY(node) DECL_LANG_FLAG_1(node)
#define GFC_DECL_ASSIGN(node) DECL_LANG_FLAG_2(node)
#define GFC_DECL_CRAY_POINTEE(node) DECL_LANG_FLAG_4(node)
#define GFC_DECL_RESULT(node) DECL_LANG_FLAG_5(node)
#define GFC_DECL_SUBREF_ARRAY_P(node) DECL_LANG_FLAG_6(node)
+#define GFC_DECL_ASSOCIATE_VAR_P(node) DECL_LANG_FLAG_7(node)
+#define GFC_DECL_CLASS(node) DECL_LANG_FLAG_8(node)
/* An array descriptor. */
#define GFC_DESCRIPTOR_TYPE_P(node) TYPE_LANG_FLAG_1(node)
/* An array without a descriptor. */
#define GFC_ARRAY_TYPE_P(node) TYPE_LANG_FLAG_2(node)
-/* Fortran POINTER type. */
-#define GFC_POINTER_TYPE_P(node) TYPE_LANG_FLAG_3(node)
+/* Fortran CLASS type. */
+#define GFC_CLASS_TYPE_P(node) TYPE_LANG_FLAG_4(node)
/* The GFC_TYPE_ARRAY_* members are present in both descriptor and
descriptorless array types. */
#define GFC_TYPE_ARRAY_LBOUND(node, dim) \
#define GFC_TYPE_ARRAY_STRIDE(node, dim) \
(TYPE_LANG_SPECIFIC(node)->stride[dim])
#define GFC_TYPE_ARRAY_RANK(node) (TYPE_LANG_SPECIFIC(node)->rank)
+#define GFC_TYPE_ARRAY_CORANK(node) (TYPE_LANG_SPECIFIC(node)->corank)
+#define GFC_TYPE_ARRAY_CAF_TOKEN(node) (TYPE_LANG_SPECIFIC(node)->caf_token)
+#define GFC_TYPE_ARRAY_CAF_OFFSET(node) (TYPE_LANG_SPECIFIC(node)->caf_offset)
#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)
(TYPE_LANG_SPECIFIC(node)->base_decl[(internal)])
-/* Create _loc version of build[0-9]. */
-
-static inline tree
-build1_stat_loc (location_t loc, enum tree_code code, tree type,
- tree op MEM_STAT_DECL)
-{
- tree t = build1_stat (code, type, op PASS_MEM_STAT);
- SET_EXPR_LOCATION (t, loc);
- return t;
-}
-#define build1_loc(l,c,t1,t2) build1_stat_loc (l,c,t1,t2 MEM_STAT_INFO)
-
-static inline tree
-build2_stat_loc (location_t loc, enum tree_code code, tree type, tree arg0,
- tree op MEM_STAT_DECL)
-{
- tree t = build2_stat (code, type, arg0, op PASS_MEM_STAT);
- SET_EXPR_LOCATION (t, loc);
- return t;
-}
-#define build2_loc(l,c,t1,t2,t3) build2_stat_loc (l,c,t1,t2,t3 MEM_STAT_INFO)
-
-static inline tree
-build3_stat_loc (location_t loc, enum tree_code code, tree type, tree arg0,
- tree arg1, tree op MEM_STAT_DECL)
-{
- tree t = build3_stat (code, type, arg0, arg1, op PASS_MEM_STAT);
- SET_EXPR_LOCATION (t, loc);
- return t;
-}
-#define build3_loc(l,c,t1,t2,t3,t4) \
- build3_stat_loc (l,c,t1,t2,t3,t4 MEM_STAT_INFO)
-
-static inline tree
-build4_stat_loc (location_t loc, enum tree_code code, tree type, tree arg0,
- tree arg1, tree arg2, tree op MEM_STAT_DECL)
-{
- tree t = build4_stat (code, type, arg0, arg1, arg2, op PASS_MEM_STAT);
- SET_EXPR_LOCATION (t, loc);
- return t;
-}
-#define build4_loc(l,c,t1,t2,t3,t4,t5) \
- build4_stat_loc (l,c,t1,t2,t3,t4,t5 MEM_STAT_INFO)
-
-
/* Build an expression with void type. */
#define build1_v(code, arg) \
fold_build1_loc (input_location, code, void_type_node, arg)