diff options
author | Mikael Morin <mikael@gcc.gnu.org> | 2010-08-04 14:17:31 +0000 |
---|---|---|
committer | Mikael Morin <mikael@gcc.gnu.org> | 2010-08-04 14:17:31 +0000 |
commit | 4bc20f3a3f95e0aceb4800fb3992d9eeec41b199 (patch) | |
tree | 0a936edc696b208450d6f74b52a070d1b105b8f1 /gcc/fortran/parse.c | |
parent | 455e6d5ba7c8c2501cad22f3ecee229cc130b87f (diff) | |
download | gcc-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/parse.c')
-rw-r--r-- | gcc/fortran/parse.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/gcc/fortran/parse.c b/gcc/fortran/parse.c index d65ff1f..c7f55c9 100644 --- a/gcc/fortran/parse.c +++ b/gcc/fortran/parse.c @@ -236,9 +236,7 @@ decode_statement (void) match m; char c; -#ifdef GFC_DEBUG - gfc_symbol_state (); -#endif + gfc_enforce_clean_symbol_state (); gfc_clear_error (); /* Clear any pending errors. */ gfc_clear_warning (); /* Clear any pending warnings. */ @@ -484,9 +482,7 @@ decode_omp_directive (void) locus old_locus; char c; -#ifdef GFC_DEBUG - gfc_symbol_state (); -#endif + gfc_enforce_clean_symbol_state (); gfc_clear_error (); /* Clear any pending errors. */ gfc_clear_warning (); /* Clear any pending warnings. */ @@ -588,9 +584,7 @@ decode_gcc_attribute (void) { locus old_locus; -#ifdef GFC_DEBUG - gfc_symbol_state (); -#endif + gfc_enforce_clean_symbol_state (); gfc_clear_error (); /* Clear any pending errors. */ gfc_clear_warning (); /* Clear any pending warnings. */ @@ -879,7 +873,6 @@ blank_line: return ST_NONE; } -extern gfc_symbol *changed_syms; /* Return the next non-ST_NONE statement to the caller. We also worry about including files and the ends of include files at this stage. */ @@ -890,8 +883,7 @@ next_statement (void) gfc_statement st; locus old_locus; - /* We start with a clean state. */ - gcc_assert (changed_syms == NULL); + gfc_enforce_clean_symbol_state (); gfc_new_block = NULL; |