/* Major control parameters. */
-#define GFC_MAX_SYMBOL_LEN 63
-#define GFC_MAX_LINE 132 /* Characters beyond this are not seen. */
+#define GFC_MAX_SYMBOL_LEN 63 /* Must be at least 63 for F2003. */
#define GFC_MAX_DIMENSIONS 7 /* Maximum dimensions in an array. */
#define GFC_LETTERS 26 /* Number of letters in the alphabet. */
the backend (eg. KIND). */
GFC_ISYM_NONE = 0,
GFC_ISYM_ABS,
+ GFC_ISYM_ACCESS,
GFC_ISYM_ACHAR,
GFC_ISYM_ACOS,
GFC_ISYM_ACOSH,
GFC_ISYM_CEILING,
GFC_ISYM_CHAR,
GFC_ISYM_CHDIR,
+ GFC_ISYM_CHMOD,
GFC_ISYM_CMPLX,
GFC_ISYM_COMMAND_ARGUMENT_COUNT,
GFC_ISYM_COMPLEX,
GFC_ISYM_IERRNO,
GFC_ISYM_INDEX,
GFC_ISYM_INT,
+ GFC_ISYM_INT2,
+ GFC_ISYM_INT8,
GFC_ISYM_IOR,
GFC_ISYM_IRAND,
GFC_ISYM_ISATTY,
GFC_ISYM_LGT,
GFC_ISYM_LLE,
GFC_ISYM_LLT,
- GFC_ISYM_LOG,
GFC_ISYM_LOC,
+ GFC_ISYM_LOG,
GFC_ISYM_LOG10,
GFC_ISYM_LOGICAL,
+ GFC_ISYM_LONG,
+ GFC_ISYM_LSHIFT,
+ GFC_ISYM_LSTAT,
GFC_ISYM_MALLOC,
GFC_ISYM_MATMUL,
GFC_ISYM_MAX,
GFC_ISYM_MAXLOC,
GFC_ISYM_MAXVAL,
+ GFC_ISYM_MCLOCK,
+ GFC_ISYM_MCLOCK8,
GFC_ISYM_MERGE,
GFC_ISYM_MIN,
GFC_ISYM_MINLOC,
GFC_ISYM_RENAME,
GFC_ISYM_REPEAT,
GFC_ISYM_RESHAPE,
+ GFC_ISYM_RSHIFT,
GFC_ISYM_RRSPACING,
GFC_ISYM_SCALE,
GFC_ISYM_SCAN,
{
/* Variable attributes. */
unsigned allocatable:1, dimension:1, external:1, intrinsic:1,
- optional:1, pointer:1, save:1, target:1,
+ optional:1, pointer:1, save:1, target:1, volatile_:1,
dummy:1, result:1, assign:1, threadprivate:1;
unsigned data:1, /* Symbol is named in a DATA statement. */
/* Special attributes for Cray pointers, pointees. */
unsigned cray_pointer:1, cray_pointee:1;
+ /* The symbol is a derived type with allocatable components, possibly nested.
+ */
+ unsigned alloc_comp:1;
}
symbol_attribute;
const char *name;
gfc_typespec ts;
- int pointer, dimension;
+ int pointer, allocatable, dimension;
gfc_array_spec *as;
tree backend_decl;
order. */
int dummy_order;
+ int entry_id;
+
gfc_namelist *namelist, *namelist_tail;
/* Change management fields. Symbols that might be modified by the
/* Nonzero if all equivalences associated with this symbol have been
processed. */
unsigned equiv_built:1;
+ /* Set if this variable is used as an index name in a FORALL. */
+ unsigned forall_index:1;
int refs;
struct gfc_namespace *ns; /* namespace containing this symbol */
typedef struct
{
/* Values really representable by the target. */
- mpz_t huge, pedantic_min_int, min_int, max_int;
+ mpz_t huge, pedantic_min_int, min_int;
int kind, radix, digits, bit_size, range;
{
gfc_symbol *sym;
HOST_WIDE_INT offset;
+ HOST_WIDE_INT length;
struct gfc_equiv_info *next;
} gfc_equiv_info;
gfc_expr *unit, *file, *iostat, *exist, *opened, *number, *named,
*name, *access, *sequential, *direct, *form, *formatted,
*unformatted, *recl, *nextrec, *blank, *position, *action, *read,
- *write, *readwrite, *delim, *pad, *iolength, *iomsg, *convert;
+ *write, *readwrite, *delim, *pad, *iolength, *iomsg, *convert, *strm_pos;
gfc_st_label *err;
typedef enum
{
EXEC_NOP = 1, EXEC_ASSIGN, EXEC_LABEL_ASSIGN, EXEC_POINTER_ASSIGN,
- EXEC_GOTO, EXEC_CALL, EXEC_RETURN, EXEC_ENTRY,
- EXEC_PAUSE, EXEC_STOP, EXEC_CONTINUE,
+ EXEC_GOTO, EXEC_CALL, EXEC_ASSIGN_CALL, EXEC_RETURN, EXEC_ENTRY,
+ EXEC_PAUSE, EXEC_STOP, EXEC_CONTINUE, EXEC_INIT_ASSIGN,
EXEC_IF, EXEC_ARITHMETIC_IF, EXEC_DO, EXEC_DO_WHILE, EXEC_SELECT,
EXEC_FORALL, EXEC_WHERE, EXEC_CYCLE, EXEC_EXIT,
EXEC_ALLOCATE, EXEC_DEALLOCATE,
{
char *module_dir;
gfc_source_form source_form;
- /* When fixed_line_length or free_line_length are 0, the whole line is used.
-
- Default is -1, the maximum line length mandated by the respective source
- form is used:
- for FORM_FREE GFC_MAX_LINE (132)
- else 72.
-
- If fixed_line_length or free_line_length is not 0 nor -1 then the user has
- requested a specific line-length.
+ /* Maximum line lengths in fixed- and free-form source, respectively.
+ When fixed_line_length or free_line_length are 0, the whole line is used,
+ regardless of length.
If the user requests a fixed_line_length <7 then gfc_init_options()
emits a fatal error. */
- int fixed_line_length; /* maximum line length in fixed-form. */
- int free_line_length; /* maximum line length in free-form. */
+ int fixed_line_length;
+ int free_line_length;
+ /* Maximum number of continuation lines in fixed- and free-form source,
+ respectively. */
+ int max_continue_fixed;
+ int max_continue_free;
int max_identifier_length;
int verbose;
int warn_surprising;
int warn_tabs;
int warn_underflow;
- int warn_unused_labels;
+ int max_errors;
+ int flag_all_intrinsics;
int flag_default_double;
int flag_default_integer;
int flag_default_real;
int flag_second_underscore;
int flag_implicit_none;
int flag_max_stack_var_size;
- int flag_module_access_private;
- int flag_no_backend;
+ int flag_range_check;
int flag_pack_derived;
int flag_repack_arrays;
int flag_preprocessed;
int flag_f2c;
int flag_automatic;
int flag_backslash;
+ int flag_external_blas;
+ int blas_matmul_limit;
int flag_cray_pointer;
int flag_d_lines;
int flag_openmp;
- int q_kind;
-
int fpe;
int warn_std;
int warn_nonstd_intrinsics;
int fshort_enums;
int convert;
+ int record_marker;
}
gfc_option_t;
void gfc_internal_error (const char *, ...) ATTRIBUTE_NORETURN ATTRIBUTE_GCC_GFC(1,2);
void gfc_clear_error (void);
int gfc_error_check (void);
+int gfc_error_flag_test (void);
notification gfc_notification_std (int);
try gfc_notify_std (int, const char *, ...) ATTRIBUTE_GCC_GFC(2,3);
extern int gfc_default_logical_kind;
extern int gfc_default_complex_kind;
extern int gfc_c_int_kind;
+extern int gfc_intio_kind;
/* symbol.c */
void gfc_clear_new_implicit (void);
void gfc_set_sym_referenced (gfc_symbol * sym);
-try gfc_add_attribute (symbol_attribute *, locus *, unsigned int);
+try gfc_add_attribute (symbol_attribute *, locus *);
try gfc_add_allocatable (symbol_attribute *, locus *);
try gfc_add_dimension (symbol_attribute *, const char *, locus *);
try gfc_add_external (symbol_attribute *, locus *);
try gfc_add_recursive (symbol_attribute *, locus *);
try gfc_add_function (symbol_attribute *, const char *, locus *);
try gfc_add_subroutine (symbol_attribute *, const char *, locus *);
+try gfc_add_volatile (symbol_attribute *, const char *, locus *);
try gfc_add_access (symbol_attribute *, gfc_access, const char *, locus *);
try gfc_add_flavor (symbol_attribute *, sym_flavor, const char *, locus *);
int gfc_generic_intrinsic (const char *);
int gfc_specific_intrinsic (const char *);
int gfc_intrinsic_name (const char *, int);
+int gfc_intrinsic_actual_ok (const char *, const bool);
gfc_intrinsic_sym *gfc_find_function (const char *);
match gfc_intrinsic_func_interface (gfc_expr *, int);
void gfc_free_data (gfc_data *);
void gfc_free_case_list (gfc_case *);
+/* matchexp.c -- FIXME too? */
+gfc_expr *gfc_get_parentheses (gfc_expr *);
+
/* openmp.c */
void gfc_free_omp_clauses (gfc_omp_clauses *);
void gfc_resolve_omp_directive (gfc_code *, gfc_namespace *);
void gfc_free_actual_arglist (gfc_actual_arglist *);
gfc_actual_arglist *gfc_copy_actual_arglist (gfc_actual_arglist *);
const char *gfc_extract_int (gfc_expr *, int *);
+gfc_expr *gfc_expr_to_initialize (gfc_expr *);
gfc_expr *gfc_build_conversion (gfc_expr *);
void gfc_free_ref_list (gfc_ref *);
try gfc_expand_constructor (gfc_expr *);
int gfc_constant_ac (gfc_expr *);
int gfc_expanded_ac (gfc_expr *);
+void gfc_resolve_character_array_constructor (gfc_expr *);
try gfc_resolve_array_constructor (gfc_expr *);
try gfc_check_constructor_type (gfc_expr *);
try gfc_check_iter_variable (gfc_expr *);
void gfc_delete_bbt (void *, void *, compare_fn);
/* dump-parse-tree.c */
+void gfc_show_actual_arglist (gfc_actual_arglist *);
+void gfc_show_array_ref (gfc_array_ref *);
+void gfc_show_array_spec (gfc_array_spec *);
+void gfc_show_attr (symbol_attribute *);
+void gfc_show_code (int, gfc_code *);
+void gfc_show_components (gfc_symbol *);
+void gfc_show_constructor (gfc_constructor *);
+void gfc_show_equiv (gfc_equiv *);
+void gfc_show_expr (gfc_expr *);
+void gfc_show_namelist (gfc_namelist *);
void gfc_show_namespace (gfc_namespace *);
+void gfc_show_ref (gfc_ref *);
+void gfc_show_symbol (gfc_symbol *);
+void gfc_show_typespec (gfc_typespec *);
/* parse.c */
try gfc_parse_file (void);