diff options
author | pault <pault@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-01-05 14:45:20 +0000 |
---|---|---|
committer | pault <pault@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-01-05 14:45:20 +0000 |
commit | 1bfea7e8f3c85545c73e4395bc593e176c556690 (patch) | |
tree | 2999345f4ce5653de4bd004643e637f2cce6e449 /gcc/fortran/array.c | |
parent | f45380bec377ff65a271ff739c3943bc8c41ad81 (diff) | |
download | gcc-1bfea7e8f3c85545c73e4395bc593e176c556690.tar.gz |
2007-01-05 Paul Thomas <pault@gcc.gnu.org>
PR fortran/23232
* decl.c (gfc_in_match_data, gfc_set_in_match_data): New
functions to signal that a DATA statement is being matched.
(gfc_match_data): Call gfc_set_in_match_data on entry and on
exit.
* gfortran.h : Add prototypes for above.
* expr.c (check_init_expr): Avoid check on parameter or
variable if gfc_in_match_data is true.
(gfc_match_init_expr): Do not call error on non-reduction of
expression if gfc_in_match_data is true.
PR fortran/27996
PR fortran/27998
* decl.c (gfc_set_constant_character_len): Add boolean arg to
flag array constructor resolution. Warn if string is being
truncated. Standard dependent error if string is padded. Set
new arg to false for all three calls to
gfc_set_constant_character_len.
* match.h : Add boolean arg to prototype for
gfc_set_constant_character_len.
* gfortran.h : Add warn_character_truncation to gfc_options.
* options.c (set_Wall): Set warn_character_truncation if -Wall
is set.
* resolve.c (resolve_code): Warn if rhs string in character
assignment has to be truncated.
* array.c (gfc_resolve_character_array_constructor): Set new
argument to true for call to gfc_set_constant_character_len.
2007-01-05 Paul Thomas <pault@gcc.gnu.org>
PR fortran/23232
* gfortran.dg/data_implied_do_1.f90: New test.
PR fortran/27996
PR fortran/27998
* gfortran.dg/char_length_1.f90: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@120485 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/array.c')
-rw-r--r-- | gcc/fortran/array.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/fortran/array.c b/gcc/fortran/array.c index 479e60bdc7b..d3606f52d81 100644 --- a/gcc/fortran/array.c +++ b/gcc/fortran/array.c @@ -1587,7 +1587,7 @@ got_charlen: /* Update the element constructors. */ for (p = expr->value.constructor; p; p = p->next) if (p->expr->expr_type == EXPR_CONSTANT) - gfc_set_constant_character_len (max_length, p->expr); + gfc_set_constant_character_len (max_length, p->expr, true); } } } |