aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/symbol.c
diff options
context:
space:
mode:
authorMikael Morin <mikael@gcc.gnu.org>2010-08-04 14:17:31 +0000
committerMikael Morin <mikael@gcc.gnu.org>2010-08-04 14:17:31 +0000
commit4bc20f3a3f95e0aceb4800fb3992d9eeec41b199 (patch)
tree0a936edc696b208450d6f74b52a070d1b105b8f1 /gcc/fortran/symbol.c
parent455e6d5ba7c8c2501cad22f3ecee229cc130b87f (diff)
downloadgcc-4bc20f3a3f95e0aceb4800fb3992d9eeec41b199.zip
gcc-4bc20f3a3f95e0aceb4800fb3992d9eeec41b199.tar.gz
gcc-4bc20f3a3f95e0aceb4800fb3992d9eeec41b199.tar.bz2
re PR fortran/42051 ([OOP] ICE on array-valued function with CLASS formal argument)
2010-08-04 Mikael Morin <mikael@gcc.gnu.org> PR fortran/42051 PR fortran/44064 * symbol.c (changed_syms): Made static again. (gfc_symbol_state): Don't conditionalize on GFC_DEBUG. Changed conditional internal error into assert. Rename function to ... (gfc_enforce_clean_symbol_state): ... this. * gfortran.h (gfc_symbol_state, gfc_enforce_clean_symbol_state): Rename the former to the latter. * parse.c (decode_statement, decode_omp_directive, decode_gcc_attribute): Update callers accordingly. Don't conditionalize on GFC_DEBUG. (changed_syms): Remove declaration. (next_statement): Use gfc_enforce_clean_symbol_state. From-SVN: r162865
Diffstat (limited to 'gcc/fortran/symbol.c')
-rw-r--r--gcc/fortran/symbol.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/gcc/fortran/symbol.c b/gcc/fortran/symbol.c
index a4d0ec3..87e94e7 100644
--- a/gcc/fortran/symbol.c
+++ b/gcc/fortran/symbol.c
@@ -98,7 +98,7 @@ gfc_namespace *gfc_global_ns_list;
gfc_gsymbol *gfc_gsym_root = NULL;
-gfc_symbol *changed_syms = NULL;
+static gfc_symbol *changed_syms = NULL;
gfc_dt_list *gfc_derived_types;
@@ -2503,6 +2503,7 @@ gfc_free_symbol (gfc_symbol *sym)
/* Decrease the reference counter and free memory when we reach zero. */
+
void
gfc_release_symbol (gfc_symbol *sym)
{
@@ -3442,16 +3443,13 @@ gfc_save_all (gfc_namespace *ns)
}
-#ifdef GFC_DEBUG
/* Make sure that no changes to symbols are pending. */
void
-gfc_symbol_state(void) {
-
- if (changed_syms != NULL)
- gfc_internal_error("Symbol changes still pending!");
+gfc_enforce_clean_symbol_state(void)
+{
+ gcc_assert (changed_syms == NULL);
}
-#endif
/************** Global symbol handling ************/