[Patch, Fortran] PR fortran/37746: -fbounds-check for string lengths of dummy arguments

Daniel Kraft d@domob.eu
Sun Dec 21 21:12:00 GMT 2008


Daniel Kraft wrote:
> the attached patch implements a runtime check that the string length of 
> an actual argument matches the expected one for a (non-assumed length) 
> character dummy argument, if -fbounds-check is given.  This fixes PR 
> 37746 (the original test case, although it was meant to mean something 
> else by the reporter, now gives the expected error), you may also want 
> to look at the test cases for what this is supposed to catch.
> 
> I had to change two torture-tests because I believe they are wrong and 
> the new check complained about this; please verify the changes are ok, 
> although I'm quite sure I didn't change anything about the meaning of 
> the test.  I'm not an expert about the code touched, so please feel free 
> to find any things I did miss :D
> 
> Regression-testing at the moment on GNU/Linux-x86-32. Ok for trunk if no 
> regressions?  I'm also open to queue this one up for 4.5, but as only 
> behaviour with -fbounds-check active is affected, I think we can also 
> put this in for 4.4, as it's also a bug fix.

Update: no regressions.

Daniel

-- 
Done:  Arc-Bar-Cav-Rog-Sam-Tou-Val-Wiz
To go: Hea-Kni-Mon-Pri-Ran



More information about the Fortran mailing list