This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, Fortran] Fix PR36112: Bounds-checking on character-array-constructors
- From: FX <fxcoudert at gmail dot com>
- To: Daniel Kraft <d at domob dot eu>, "fortran at gcc dot gnu dot org List" <fortran at gcc dot gnu dot org>, Gcc Patch List <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 13 Jun 2008 17:54:05 +0100
- Subject: Re: [PATCH, Fortran] Fix PR36112: Bounds-checking on character-array-constructors
- References: <4852A3BC.8000506@domob.eu>
2008-05-18 Daniel Kraft <d@domob.eu>
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.
OK to commit.
I don't think you have commit rights, but I think you should ask for
it, it'll make all our lives easier during the course of the
summer... See http://gcc.gnu.org/svnwrite.html for the details. On
the sourceware.org form (http://sourceware.org/cgi-bin/pdw/
ps_form.cgi), where it asks for the email of person who approved
request, put my mail.
Thanks for the good work,
FX
--
François-Xavier Coudert
http://www.homepages.ucl.ac.uk/~uccafco/