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: 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
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:mime-version:in-reply-to :references:content-type:message-id:content-transfer-encoding:from :subject:date:to:x-mailer; bh=4kLxAYmOICBZ6aDy7efhSj+CfyNsCdyjLEiJhfQ4uKM=; b=dd3DDK1WldKqYXpQ4KZUFuic5YcLa+WvSB89YPAGyRlrPso8rV6mdpV9svxVhWBZ+I mqKs6Wc5vlOcXKVzTRrXTACPWXXmtmp7rN5ZJWqBKIYxKDffHe319ZOV0yJdq8gcdecP N9dpGHnZypnQ5abzy8OT7jS7IKaXw66gSnxCw=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:content-type:message-id :content-transfer-encoding:from:subject:date:to:x-mailer; b=LWZgeKBo7Vz/Gx5KNnJycawI3eiY9tog41I3MCc/i9AQ+3PxIS907wPPPufpFxBetX rJt6DZUF5lc2aDjtveMQ8UeSCUsq+dcpcMRQ0pj3j7mQMf2fuxg6pgKM174bH7NqxN4s QpaEoxsfpJySpcP1WbtLDkXxggIuJ093Y1yF8=
- 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/