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>
- Cc: Fortran List <fortran at gcc dot gnu dot org>, gcc-patches at gcc dot gnu dot org
- Date: Mon, 19 May 2008 08:38:49 +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:in-reply-to:references:mime-version:content-type:message-id:cc:content-transfer-encoding:from:subject:date:to:x-mailer; bh=BHPurNdua+2Etmj+4xVGM20LX06spITZ9g1uDwaNop8=; b=q5hb4XXEuULfuAc601crR+XNiEAYcYifilNl+Dpx3/Ub0gVg+qdCNTV2QBbcBRUU8tWznhvr4HWK/sp6lwuUXz8xky6fweNY+9ETI6caKqaAgN/+8H9ZXW4m3cxppn92NuCNt7Wx98GHjJgxxac6WNQfyGIy+znxMftv+MULYHg=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=in-reply-to:references:mime-version:content-type:message-id:cc:content-transfer-encoding:from:subject:date:to:x-mailer; b=B/6Tfa5RxS1gASh155dS+Kqb026mU+ZkTJaYqrSKFoa5Y+EnHSb/EnAhNLeSGWsnvJQezWUg0EAvUgyDmN7dUCxQzMGPB5SKwhSm9zK8DBiRbOCSU/QY+uvqn3KH/ClL9yncy3UbJgWNxiR3nGYrShq5Gk40Plk2GB1zh482f2Q=
- References: <48306230.9040604@domob.eu> <F985D8F4-0685-4828-8E0D-63EDE33C7692@gmail.com> <483149D0.1070609@domob.eu>
Did I? AFAIK, I added this NULL thing only to
get_array_ctor_strlen, and not to any of the others (as this
function not only calculates the length but also is_const); there
it is called with NULL argument for sub-array-constructors not at
the first position (thus where we are not interested in the length).
You're right, I misread the patch. Please update the comment on top
of get_array_ctor_strlen() accordingly/
I'm not sure about how important is_const is, another (faster)
approach would of course be to break the loop after we've found our
length; but then we don't know about constness of following elements.
The current way is fine with me.
I'll provide an updated patch (with the condition on the error
message and the XXX-mark removed) when the point above (and every
other review details) are cleared, ok?
I think it'll be OK, please submit an updated patch and I'll approve
and commit.
FX
--
François-Xavier Coudert
http://www.homepages.ucl.ac.uk/~uccafco/