------- Comment #7 from domob at gcc dot gnu dot org 2009-04-11 16:44 ------- Subject: Bug 37746
Author: domob Date: Sat Apr 11 16:44:37 2009 New Revision: 145958 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=145958 Log: 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. Added: trunk/gcc/testsuite/gfortran.dg/bounds_check_strlen_1.f90 trunk/gcc/testsuite/gfortran.dg/bounds_check_strlen_2.f90 trunk/gcc/testsuite/gfortran.dg/bounds_check_strlen_3.f90 trunk/gcc/testsuite/gfortran.dg/bounds_check_strlen_4.f90 trunk/gcc/testsuite/gfortran.dg/bounds_check_strlen_5.f90 trunk/gcc/testsuite/gfortran.dg/bounds_check_strlen_6.f90 trunk/gcc/testsuite/gfortran.dg/bounds_check_strlen_7.f90 Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/gfortran.h trunk/gcc/fortran/trans-decl.c trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/gfortran.fortran-torture/execute/intrinsic_index.f90 trunk/gcc/testsuite/gfortran.fortran-torture/execute/intrinsic_trim.f90 -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37746