[Patch, Fortran] PR fortran/38137: Runtime check for stringlengths to MERGE
Daniel Kraft
d@domob.eu
Wed Dec 17 11:24:00 GMT 2008
Tobias Burnus wrote:
> Hi Daniel,
>
> Daniel Kraft wrote:
>> this patch adds a runtime check (when -fbounds-check is enabled) that
>> the arguments to MERGE have the same string length; currently this is
>> only checked at compile-time when possible. The patch should be
>> straight forward, if I didn't mess up some of the tree stuff.
>>
>> I'm not sure if other intrinsics are affected as well, but check.c
>> does compile-time checks for same string lengths only for MERGE. But
>> feel free to suggest others and I can add both compile-time and
>> runtime checks for them :)
> I think MERGE is the only Fortran 2003 intrinsic where the length type
> parameter has to be the same. But the same-length check might be
> recycled for PR 31822, which is about pointer assignment rather than
> actual arguments. (Also there: compile-time check works, run-time check
> is missing.)
>
> (Currently, I have the problem that I cannot find the "=>" constrain in
> the standard (95/2003) - as all compilers have the compile-time check I
> surely miss something.)
Tobias, thanks for looking at this and the pointer, I will work on PR
31822 now.
>> Regression test running at the moment on GNU/Linux-x86-32. Ok for
>> trunk if no regressions? I believe this is can go in for 4.4 without
>> problems (but can hold on until 4.5 too if you want).
> Looks harmless and is only active with -fbounds-check. Thus: OK for the
> trunk.
Thanks for the quick review, no regressions, thus committed to trunk as
revision 142791.
Yours,
Daniel
--
Done: Arc-Bar-Cav-Rog-Sam-Tou-Val-Wiz
To go: Hea-Kni-Mon-Pri-Ran
More information about the Fortran
mailing list