diff options
author | Paul Thomas <pault@gcc.gnu.org> | 2008-01-10 19:10:48 +0000 |
---|---|---|
committer | Paul Thomas <pault@gcc.gnu.org> | 2008-01-10 19:10:48 +0000 |
commit | 32be9f94bfc4c7246f9091764afc55ffca2db9c9 (patch) | |
tree | 859fbc40552efe9c0f56f7d86b1c9c1208aed0f1 /gcc/fortran/trans-array.h | |
parent | 814252befa3cd780269ed0a321e2d83e5683c557 (diff) | |
download | gcc-32be9f94bfc4c7246f9091764afc55ffca2db9c9.zip gcc-32be9f94bfc4c7246f9091764afc55ffca2db9c9.tar.gz gcc-32be9f94bfc4c7246f9091764afc55ffca2db9c9.tar.bz2 |
re PR fortran/34396 (Length of substrings defined by expressions not correctly computed in constructors)
2008-01-10 Paul Thomas <pault@gcc.gnu.org>
PR fortran/34396
* trans-array.c (gfc_trans_array_ctor_element): Use gfc_trans_string_copy
to assign strings and perform bounds checks on the string length.
(get_array_ctor_strlen): Remove bounds checking.
(gfc_trans_array_constructor): Initialize string length checking.
* trans-array.h : Add prototype for gfc_trans_string_copy.
2008-01-10 Paul Thomas <pault@gcc.gnu.org>
PR fortran/34396
* gfortran.dg/bounds_check_12.f90: New test.
From-SVN: r131448
Diffstat (limited to 'gcc/fortran/trans-array.h')
-rw-r--r-- | gcc/fortran/trans-array.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/fortran/trans-array.h b/gcc/fortran/trans-array.h index a377e19..98b6fb1 100644 --- a/gcc/fortran/trans-array.h +++ b/gcc/fortran/trans-array.h @@ -137,3 +137,6 @@ void gfc_add_intrinsic_ss_code (gfc_loopinfo *, gfc_ss *); /* Functions for constant array constructor processing. */ unsigned HOST_WIDE_INT gfc_constant_array_constructor_p (gfc_constructor *); tree gfc_build_constant_array_constructor (gfc_expr *, tree); + +/* Copy a string from src to dest. */ +void gfc_trans_string_copy (stmtblock_t *, tree, tree, tree, tree); |