------- Comment #6 from domob at gcc dot gnu dot org 2008-06-17 20:25 ------- Subject: Bug 36112
Author: domob Date: Tue Jun 17 20:24:20 2008 New Revision: 136872 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=136872 Log: 2008-06-17 Daniel Kraft <[EMAIL PROTECTED]> PR fortran/36112 * array.c (gfc_resolve_character_array_constructor): Check that all elements with constant character length have the same one rather than fixing it if no typespec is given, emit an error if they don't. Changed return type to "try" and return FAILURE for the case above. (gfc_resolve_array_constructor): Removed unneeded call to gfc_resolve_character_array_constructor in this function. * gfortran.h (gfc_resolve_character_array_constructor): Returns try. * trans-array.c (get_array_ctor_strlen): Return length of first element rather than last element. * resolve.c (gfc_resolve_expr): Handle FAILURE return from gfc_resolve_character_array_constructor. 2008-06-17 Daniel Kraft <[EMAIL PROTECTED]> PR fortran/36112 * gfortran.dg/bounds_check_array_ctor_1.f90: New test. * gfortran.dg/bounds_check_array_ctor_2.f90: New test. * gfortran.dg/bounds_check_array_ctor_3.f90: New test. * gfortran.dg/bounds_check_array_ctor_4.f90: New test. * gfortran.dg/bounds_check_array_ctor_5.f90: New test. * gfortran.dg/bounds_check_array_ctor_6.f90: New test. * gfortran.dg/bounds_check_array_ctor_7.f90: New test. * gfortran.dg/bounds_check_array_ctor_8.f90: New test. * gfortran.dg/arrayio_0.f90: Fixed invalid array constructor. * gfortran.dg/char_cons_len.f90: Ditto. * gfortran.dg/char_initializer_actual.f90: Ditto. * gfortran.dg/pr15959.f90: Ditto. * gfortran.dg/transfer_simplify_2.f90: Ditto. * gfortran.dg/char_length_1.f90: Changed expected error messages. Added: trunk/gcc/testsuite/gfortran.dg/bounds_check_array_ctor_1.f90 trunk/gcc/testsuite/gfortran.dg/bounds_check_array_ctor_2.f90 trunk/gcc/testsuite/gfortran.dg/bounds_check_array_ctor_3.f90 trunk/gcc/testsuite/gfortran.dg/bounds_check_array_ctor_4.f90 trunk/gcc/testsuite/gfortran.dg/bounds_check_array_ctor_5.f90 trunk/gcc/testsuite/gfortran.dg/bounds_check_array_ctor_6.f90 trunk/gcc/testsuite/gfortran.dg/bounds_check_array_ctor_7.f90 trunk/gcc/testsuite/gfortran.dg/bounds_check_array_ctor_8.f90 Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/array.c trunk/gcc/fortran/gfortran.h trunk/gcc/fortran/resolve.c trunk/gcc/fortran/trans-array.c trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/gfortran.dg/arrayio_0.f90 trunk/gcc/testsuite/gfortran.dg/char_cons_len.f90 trunk/gcc/testsuite/gfortran.dg/char_initialiser_actual.f90 trunk/gcc/testsuite/gfortran.dg/char_length_1.f90 trunk/gcc/testsuite/gfortran.dg/pr15959.f90 trunk/gcc/testsuite/gfortran.dg/transfer_simplify_2.f90 -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36112