diff options
author | Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> | 2007-10-05 12:33:07 +0000 |
---|---|---|
committer | François-Xavier Coudert <fxcoudert@gcc.gnu.org> | 2007-10-05 12:33:07 +0000 |
commit | ca39e6f200109cd52ad6102a6b272cc95f6f9aea (patch) | |
tree | 1a0937b7cea055b0e5838091ab9a1ea3d9396460 /gcc/fortran/trans-array.c | |
parent | b691d4b02ae11b0326092e0e677e561b35af38d7 (diff) | |
download | gcc-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/trans-array.c')
-rw-r--r-- | gcc/fortran/trans-array.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/gcc/fortran/trans-array.c b/gcc/fortran/trans-array.c index 64a62db..2edc95b 100644 --- a/gcc/fortran/trans-array.c +++ b/gcc/fortran/trans-array.c @@ -1636,8 +1636,10 @@ gfc_trans_array_constructor (gfc_loopinfo * loop, gfc_ss * ss) if (ss->expr->ts.type == BT_CHARACTER) { bool const_string = get_array_ctor_strlen (&loop->pre, c, &ss->string_length); - if (!ss->string_length) - gfc_todo_error ("complex character array constructors"); + + /* Complex character array constructors should have been taken care of + and not end up here. */ + gcc_assert (ss->string_length); ss->expr->ts.cl->backend_decl = ss->string_length; @@ -2787,9 +2789,9 @@ gfc_conv_ss_startstride (gfc_loopinfo * loop) } } - if (loop->dimen == 0) - gfc_todo_error ("Unable to determine rank of expression"); - + /* We should have determined the rank of the expression by now. If + not, that's bad news. */ + gcc_assert (loop->dimen != 0); /* Loop over all the SS in the chain. */ for (ss = loop->ss; ss != gfc_ss_terminator; ss = ss->loop_chain) @@ -3280,8 +3282,9 @@ gfc_conv_loop_setup (gfc_loopinfo * loop) loopspec[n] = ss; */ } - if (!loopspec[n]) - gfc_todo_error ("Unable to find scalarization loop specifier"); + /* We should have found the scalarization loop specifier. If not, + that's bad news. */ + gcc_assert (loopspec[n]); info = &loopspec[n]->data.info; |