[fortran,patch] Fix PR 34956 by not checking bounds of absent optional arguments

FX Coudert fxcoudert@gmail.com
Fri Feb 29 22:53:00 GMT 2008


valgrind revealed the use of an uninitialized value in gfortran.dg/ 
bounds_check_9.f90 compiled with -fbounds-check, due to bounds- 
checking being performend on an absent optional argument. There  
already was some code to check for optional args, but it only covered  
half of the bound-checking; IIRC, I was the one who wrote it in the  
first place, so I can only apologize for the bad initial fix.

Bootstrapped and regtested on x86_64-linux, checked the tree dump and  
with valgrind that the issue was take care of. No testcase, because I  
can't seem to think of a way to get it to appear without valgrind  
(and the original testcase, of course, is already in the testsuite).

OK to commit?

FX

-- 
François-Xavier Coudert
http://www.homepages.ucl.ac.uk/~uccafco/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr34956.ChangeLog
Type: application/octet-stream
Size: 195 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20080229/374480bd/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr34956.diff
Type: application/octet-stream
Size: 4446 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20080229/374480bd/attachment-0001.obj>


More information about the Gcc-patches mailing list