This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch, Fortran] PR fortran/37746: -fbounds-check for string lengths of dummy arguments
- From: Daniel Kraft <d at domob dot eu>
- To: Fortran List <fortran at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Sun, 21 Dec 2008 19:58:22 +0100
- Subject: Re: [Patch, Fortran] PR fortran/37746: -fbounds-check for string lengths of dummy arguments
- References: <494E8529.9070002@domob.eu>
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