aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/trans-array.c
diff options
context:
space:
mode:
authorJerry DeLisle <jvdelisle@gcc.gnu.org>2010-01-09 17:47:04 +0000
committerJerry DeLisle <jvdelisle@gcc.gnu.org>2010-01-09 17:47:04 +0000
commitf2ff577a338d9422ee2b35786b3ae873aab933fe (patch)
treefaf22ebd02e6d70418500dc89807d3068c3b0ad2 /gcc/fortran/trans-array.c
parent7c0281633fd3af8f287b51f89906ce3d528216d1 (diff)
downloadgcc-f2ff577a338d9422ee2b35786b3ae873aab933fe.zip
gcc-f2ff577a338d9422ee2b35786b3ae873aab933fe.tar.gz
gcc-f2ff577a338d9422ee2b35786b3ae873aab933fe.tar.bz2
re PR fortran/20923 (gfortran slow for large array constructors)
2010-01-09 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR fortran/20923 PR fortran/32489 * trans-array.c (gfc_conv_array_initializer): Change call to gfc_error_now to call to gfc_fatal_error. * array.c (count_elements): Whitespace. (extract_element): Whitespace. (is_constant_element): Changed name from constant_element. (gfc_constant_ac): Only use expand_construuctor for expression types of EXPR_ARRAY. If expression type is EXPR_CONSTANT, no need to call gfc_is_constant_expr. * expr.c (gfc_reduce_init_expr): Adjust conditionals and delete error message. * resolve.c (gfc_is_expandable_expr): New function that determiners if array expressions should have their constructors expanded. (gfc_resolve_expr): Use new function to determine whether or not to call gfc_expand_constructor. From-SVN: r155769
Diffstat (limited to 'gcc/fortran/trans-array.c')
-rw-r--r--gcc/fortran/trans-array.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/gcc/fortran/trans-array.c b/gcc/fortran/trans-array.c
index 6486bb6..063b262 100644
--- a/gcc/fortran/trans-array.c
+++ b/gcc/fortran/trans-array.c
@@ -4109,11 +4109,11 @@ gfc_conv_array_initializer (tree type, gfc_expr * expr)
{
/* Problems occur when we get something like
integer :: a(lots) = (/(i, i=1, lots)/) */
- gfc_error_now ("The number of elements in the array constructor "
- "at %L requires an increase of the allowed %d "
- "upper limit. See -fmax-array-constructor "
- "option", &expr->where,
- gfc_option.flag_max_array_constructor);
+ gfc_fatal_error ("The number of elements in the array constructor "
+ "at %L requires an increase of the allowed %d "
+ "upper limit. See -fmax-array-constructor "
+ "option", &expr->where,
+ gfc_option.flag_max_array_constructor);
return NULL_TREE;
}
if (mpz_cmp_si (c->n.offset, 0) != 0)