diff options
author | domob <domob@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-04-11 16:44:37 +0000 |
---|---|---|
committer | domob <domob@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-04-11 16:44:37 +0000 |
commit | a4abf8a025da416d5e41c6069e5b508e8e62a174 (patch) | |
tree | d9c8e4e6f33f22a9ccaeca5a72eb199f6b40e246 /gcc/testsuite/gfortran.fortran-torture | |
parent | 72ac71f6b3cb6dcc7341021b7cb3b396145ceb3e (diff) | |
download | gcc-a4abf8a025da416d5e41c6069e5b508e8e62a174.tar.gz |
2009-04-11 Daniel Kraft <d@domob.eu>
PR fortran/37746
* gfortran.h (struct gfc_charlen): New field `passed_length' to store
the actual passed string length for dummy arguments.
* trans-decl.c (gfc_create_string_length): Formatting fixes and added
assertion, moved a local variable into the innermost block it is needed.
(create_function_arglist): Removed TODO about the check being
implemented and initialize cl->passed_length here.
(add_argument_checking): New method.
(gfc_generate_function_code): Call the argument checking method.
2009-04-11 Daniel Kraft <d@domob.eu>
PR fortran/37746
* gfortran.dg/bounds_check_strlen_1.f90: New test.
* gfortran.dg/bounds_check_strlen_2.f90: New test.
* gfortran.dg/bounds_check_strlen_3.f90: New test.
* gfortran.dg/bounds_check_strlen_4.f90: New test.
* gfortran.dg/bounds_check_strlen_5.f90: New test.
* gfortran.dg/bounds_check_strlen_6.f90: New test.
* gfortran.dg/bounds_check_strlen_7.f90: New test.
* gfortran.fortran-torture/execute/intrinsic_index.f90: Fix wrong
expected string length that failed with -fbounds-check now.
* gfortran.fortran-torture/execute/intrinsic_trim.f90: Ditto.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@145958 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gfortran.fortran-torture')
-rw-r--r-- | gcc/testsuite/gfortran.fortran-torture/execute/intrinsic_index.f90 | 2 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.fortran-torture/execute/intrinsic_trim.f90 | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/gcc/testsuite/gfortran.fortran-torture/execute/intrinsic_index.f90 b/gcc/testsuite/gfortran.fortran-torture/execute/intrinsic_index.f90 index 9b181775f9c..76f0aae532a 100644 --- a/gcc/testsuite/gfortran.fortran-torture/execute/intrinsic_index.f90 +++ b/gcc/testsuite/gfortran.fortran-torture/execute/intrinsic_index.f90 @@ -8,7 +8,7 @@ program test end function w(str) - character(len=8) str + character(len=7) str integer w w = index(str, "R") end diff --git a/gcc/testsuite/gfortran.fortran-torture/execute/intrinsic_trim.f90 b/gcc/testsuite/gfortran.fortran-torture/execute/intrinsic_trim.f90 index 90e4131685a..d57610cca52 100644 --- a/gcc/testsuite/gfortran.fortran-torture/execute/intrinsic_trim.f90 +++ b/gcc/testsuite/gfortran.fortran-torture/execute/intrinsic_trim.f90 @@ -3,7 +3,7 @@ program intrinsic_trim character(len=8) a character(len=4) b,work a='1234 ' - b=work(9,a) + b=work(8,a) if (llt(b,"1234")) call abort() a=' ' b=trim(a) |