OSDN Git Service

gcc/ada/
[pf3gnuchains/gcc-fork.git] / gcc / fortran / gfortran.h
index bfd1af8..52ebe93 100644 (file)
@@ -510,6 +510,38 @@ enum gfc_isym_id
 typedef enum gfc_isym_id gfc_isym_id;
 
 
+typedef enum
+{
+  GFC_INIT_REAL_OFF = 0,
+  GFC_INIT_REAL_ZERO,
+  GFC_INIT_REAL_NAN,
+  GFC_INIT_REAL_INF,
+  GFC_INIT_REAL_NEG_INF
+}
+init_local_real;
+
+typedef enum
+{
+  GFC_INIT_LOGICAL_OFF = 0,
+  GFC_INIT_LOGICAL_FALSE,
+  GFC_INIT_LOGICAL_TRUE
+}
+init_local_logical;
+
+typedef enum
+{
+  GFC_INIT_CHARACTER_OFF = 0,
+  GFC_INIT_CHARACTER_ON
+}
+init_local_character;
+
+typedef enum
+{
+  GFC_INIT_INTEGER_OFF = 0,
+  GFC_INIT_INTEGER_ON
+}
+init_local_integer;
+
 /************************* Structures *****************************/
 
 /* Used for keeping things in balanced binary trees.  */
@@ -578,7 +610,7 @@ typedef struct
   unsigned allocatable:1, dimension:1, external:1, intrinsic:1,
     optional:1, pointer:1, target:1, value:1, volatile_:1,
     dummy:1, result:1, assign:1, threadprivate:1, not_always_present:1,
-    implied_index:1;
+    implied_index:1, subref_array_pointer:1;
 
   ENUM_BITFIELD (save_state) save:2;
 
@@ -586,6 +618,7 @@ typedef struct
     protected:1,               /* Symbol has been marked as protected.  */
     use_assoc:1,               /* Symbol has been use-associated.  */
     use_only:1,                        /* Symbol has been use-associated, with ONLY.  */
+    use_rename:1,              /* Symbol has been use-associated and renamed.  */
     imported:1;                        /* Symbol has been associated by IMPORT.  */
 
   unsigned in_namelist:1, in_common:1, in_equivalence:1;
@@ -633,9 +666,7 @@ typedef struct
   /* Set if the symbol has ambiguous interfaces.  */
   unsigned ambiguous_interfaces:1;
 
-  /* Set if the is the symbol for the main program.  This is the least
-     cumbersome way to communicate this function property without
-     strcmp'ing with __MAIN everywhere.  */
+  /* Set if this is the symbol for the main program.  */
   unsigned is_main_program:1;
 
   /* Mutually exclusive multibit attributes.  */
@@ -650,8 +681,9 @@ 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.  */
-  unsigned alloc_comp:1, pointer_comp:1, private_comp:1;
+     components or private components, possibly nested.  zer_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;
 
   /* The namespace where the VOLATILE attribute has been set.  */
   struct gfc_namespace *volatile_ns;
@@ -690,12 +722,19 @@ typedef struct gfc_linebuf
   struct gfc_linebuf *next;
 
   int truncated;
+  bool dbg_emitted;
 
   char line[1];
 } gfc_linebuf;
 
 #define gfc_linebuf_header_size (offsetof (gfc_linebuf, line))
 
+#ifdef USE_MAPPED_LOCATION
+#define gfc_linebuf_linenum(LBUF) (LOCATION_LINE ((LBUF)->location))
+#else
+#define gfc_linebuf_linenum(LBUF) ((LBUF)->linenum)
+#endif
+
 typedef struct
 {
   char *nextc;
@@ -1736,7 +1775,7 @@ gfc_data_variable;
 
 typedef struct gfc_data_value
 {
-  unsigned int repeat;
+  mpz_t repeat;
   gfc_expr *expr;
   struct gfc_data_value *next;
 }
@@ -1753,10 +1792,6 @@ typedef struct gfc_data
 }
 gfc_data;
 
-#define gfc_get_data_variable() gfc_getmem(sizeof(gfc_data_variable))
-#define gfc_get_data_value() gfc_getmem(sizeof(gfc_data_value))
-#define gfc_get_data() gfc_getmem(sizeof(gfc_data))
-
 
 /* Structure for holding compile options */
 typedef struct
@@ -1816,6 +1851,13 @@ typedef struct
   int flag_sign_zero;
   int flag_module_private;
   int flag_recursive;
+  int flag_init_local_zero;
+  int flag_init_integer;
+  int flag_init_integer_value;
+  int flag_init_real;
+  int flag_init_logical;
+  int flag_init_character;
+  char flag_init_character_value;
 
   int fpe;
 
@@ -1862,16 +1904,8 @@ extern iterator_stack *iter_stack;
 
 /************************ Function prototypes *************************/
 
-/* data.c  */
-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);
-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 *);
-
 /* decl.c */
 bool gfc_in_match_data (void);
-void gfc_set_in_match_data (bool);
 
 /* scanner.c */
 void gfc_scanner_done_1 (void);
@@ -1889,6 +1923,7 @@ int gfc_at_bol (void);
 int gfc_at_eol (void);
 void gfc_advance_line (void);
 int gfc_check_include (void);
+int gfc_define_undef_line (void);
 
 void gfc_skip_comments (void);
 int gfc_next_char_literal (int);
@@ -2166,6 +2201,7 @@ 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 *);
+bool is_subref_array (gfc_expr *);
 
 gfc_expr *gfc_build_conversion (gfc_expr *);
 void gfc_free_ref_list (gfc_ref *);
@@ -2196,6 +2232,9 @@ try gfc_check_assign_symbol (gfc_symbol *, gfc_expr *);
 gfc_expr *gfc_default_initializer (gfc_typespec *);
 gfc_expr *gfc_get_variable_expr (gfc_symtree *);
 
+bool gfc_traverse_expr (gfc_expr *, gfc_symbol *,
+                       bool (*)(gfc_expr *, gfc_symbol *, int*),
+                       int);
 void gfc_expr_set_symbols_referenced (gfc_expr *);
 
 /* st.c */
@@ -2215,6 +2254,7 @@ int gfc_impure_variable (gfc_symbol *);
 int gfc_pure (gfc_symbol *);
 int gfc_elemental (gfc_symbol *);
 try gfc_resolve_iterator (gfc_iterator *, bool);
+try find_forall_index (gfc_expr *, gfc_symbol *, int);
 try gfc_resolve_index (gfc_expr *, int);
 try gfc_resolve_dim_arg (gfc_expr *);
 int gfc_is_formal_arg (void);
@@ -2269,6 +2309,8 @@ try gfc_extend_expr (gfc_expr *);
 void gfc_free_formal_arglist (gfc_formal_arglist *);
 try gfc_extend_assign (gfc_code *, gfc_namespace *);
 try gfc_add_interface (gfc_symbol *);
+gfc_interface *gfc_current_interface_head (void);
+void gfc_set_current_interface_head (gfc_interface *);
 
 /* io.c */
 extern gfc_st_label format_asterisk;
@@ -2322,7 +2364,7 @@ void gfc_show_typespec (gfc_typespec *);
 
 /* parse.c */
 try gfc_parse_file (void);
-void global_used (gfc_gsymbol *, locus *);
+void gfc_global_used (gfc_gsymbol *, locus *);
 
 /* dependency.c */
 int gfc_dep_compare_expr (gfc_expr *, gfc_expr *);