]> gcc.gnu.org Git - gcc.git/commit
re PR fortran/37746 (bounds check of string dummy arguments)
authorDaniel Kraft <d@domob.eu>
Sat, 11 Apr 2009 16:44:37 +0000 (18:44 +0200)
committerDaniel Kraft <domob@gcc.gnu.org>
Sat, 11 Apr 2009 16:44:37 +0000 (18:44 +0200)
commitcadb8f42464b17b8dff55942d00378b1d8a1a979
treed9c8e4e6f33f22a9ccaeca5a72eb199f6b40e246
parentd1e49db44333c8a937beebeb21e3c33be60ec162
re PR fortran/37746 (bounds check of string dummy arguments)

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.

From-SVN: r145958
13 files changed:
gcc/fortran/ChangeLog
gcc/fortran/gfortran.h
gcc/fortran/trans-decl.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/bounds_check_strlen_1.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/bounds_check_strlen_2.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/bounds_check_strlen_3.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/bounds_check_strlen_4.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/bounds_check_strlen_5.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/bounds_check_strlen_6.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/bounds_check_strlen_7.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.fortran-torture/execute/intrinsic_index.f90
gcc/testsuite/gfortran.fortran-torture/execute/intrinsic_trim.f90
This page took 0.059385 seconds and 5 git commands to generate.