This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [PATCH, Fortran] Fix PR36112: Bounds-checking on character-array-constructors
- From: Daniel Kraft <d at domob dot eu>
- To: Fortran List <fortran at gcc dot gnu dot org>, gcc-patches at gcc dot gnu dot org
- Date: Tue, 17 Jun 2008 22:29:40 +0200
- Subject: Re: [PATCH, Fortran] Fix PR36112: Bounds-checking on character-array-constructors
- References: <4852A3BC.8000506@domob.eu> <B247C0EE-F6A4-4578-85C1-1B0BF9B2C530@gmail.com>
FX wrote:
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.
Committed as revision 136872, resolved PR 36112 to fixed.
Daniel
--
Done: Bar-Sam-Val-Wiz, Dwa-Elf-Hum-Orc, Cha-Law, Fem-Mal
Underway: Ran-Gno-Neu-Fem
To go: Arc-Cav-Hea-Kni-Mon-Pri-Rog-Tou