aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/decl.c
diff options
context:
space:
mode:
authorFrancois-Xavier Coudert <fxcoudert@gcc.gnu.org>2007-10-05 12:33:07 +0000
committerFrançois-Xavier Coudert <fxcoudert@gcc.gnu.org>2007-10-05 12:33:07 +0000
commitca39e6f200109cd52ad6102a6b272cc95f6f9aea (patch)
tree1a0937b7cea055b0e5838091ab9a1ea3d9396460 /gcc/fortran/decl.c
parentb691d4b02ae11b0326092e0e677e561b35af38d7 (diff)
downloadgcc-ca39e6f200109cd52ad6102a6b272cc95f6f9aea.zip
gcc-ca39e6f200109cd52ad6102a6b272cc95f6f9aea.tar.gz
gcc-ca39e6f200109cd52ad6102a6b272cc95f6f9aea.tar.bz2
gfortran.h (gfc_get_data_variable, [...]): Move to decl.c.
* gfortran.h (gfc_get_data_variable, gfc_get_data_value, gfc_get_data): Move to decl.c. (global_used): Rename into gfc_global_used. (gfc_formalize_init_value, gfc_get_section_index, gfc_assign_data_value, gfc_assign_data_value_range, gfc_advance_section): Move to data.h. (gfc_set_in_match_data): Remove. * decl.c (gfc_get_data_variable, gfc_get_data_value, gfc_get_data): Move here. (gfc_set_in_match_data): Rename into set_in_match_data. (gfc_match_data): Likewise. (add_global_entry): Rename global_used into gfc_global_used. * data.c: Include data.h. * trans.h (gfc_todo_error): Remove. * trans-array.c (gfc_trans_array_constructor, gfc_conv_ss_startstride, gfc_conv_loop_setup): Change gfc_todo_error into assertions. * resolve.c (resolve_global_procedure): Rename global_used into gfc_global_used. * parse.c (gfc_global_used, parse_module, add_global_procedure, add_global_program): Likewise. * trans-intrinsic.c (gfc_walk_intrinsic_function): Rename global_used into gfc_global_used. * Make-lang.in: Add dependencies on fortran/data.h. * data.h: New file. From-SVN: r129034
Diffstat (limited to 'gcc/fortran/decl.c')
-rw-r--r--gcc/fortran/decl.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/gcc/fortran/decl.c b/gcc/fortran/decl.c
index d0eb0ef..d2c94a1 100644
--- a/gcc/fortran/decl.c
+++ b/gcc/fortran/decl.c
@@ -25,6 +25,14 @@ along with GCC; see the file COPYING3. If not see
#include "match.h"
#include "parse.h"
+
+/* Macros to access allocate memory for gfc_data_variable,
+ gfc_data_value and 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))
+
+
/* This flag is set if an old-style length selector is matched
during a type-declaration statement. */
@@ -92,8 +100,8 @@ gfc_in_match_data (void)
return in_match_data;
}
-void
-gfc_set_in_match_data (bool set_value)
+static void
+set_in_match_data (bool set_value)
{
in_match_data = set_value;
}
@@ -496,7 +504,7 @@ gfc_match_data (void)
gfc_data *new;
match m;
- gfc_set_in_match_data (true);
+ set_in_match_data (true);
for (;;)
{
@@ -520,7 +528,7 @@ gfc_match_data (void)
gfc_match_char (','); /* Optional comma */
}
- gfc_set_in_match_data (false);
+ set_in_match_data (false);
if (gfc_pure (NULL))
{
@@ -531,7 +539,7 @@ gfc_match_data (void)
return MATCH_YES;
cleanup:
- gfc_set_in_match_data (false);
+ set_in_match_data (false);
gfc_free_data (new);
return MATCH_ERROR;
}
@@ -4256,7 +4264,7 @@ add_global_entry (const char *name, int sub)
if (s->defined
|| (s->type != GSYM_UNKNOWN
&& s->type != (sub ? GSYM_SUBROUTINE : GSYM_FUNCTION)))
- global_used(s, NULL);
+ gfc_global_used(s, NULL);
else
{
s->type = sub ? GSYM_SUBROUTINE : GSYM_FUNCTION;