This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug testsuite/82093] gfortran.dg/vect/pr70043.f90 contains out-of-bounds references


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82093

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2017-09-04
           Assignee|unassigned at gcc dot gnu.org      |marxin at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Thanks for that, can be fixed by:

diff --git a/gcc/testsuite/gfortran.dg/vect/pr70043.f90
b/gcc/testsuite/gfortran.dg/vect/pr70043.f90
index 36d6a0b3b90..bdd03a5bd10 100644
--- a/gcc/testsuite/gfortran.dg/vect/pr70043.f90
+++ b/gcc/testsuite/gfortran.dg/vect/pr70043.f90
@@ -6,7 +6,7 @@ subroutine fn1(a, b)
   real(8), intent(in) ::  b(100)
   real(8), intent(inout) :: a(100)
   real(8) c
-  do i=0,100
+  do i=0,99
      if( a(i) < 0.0 ) then
         c =  a(i) * b(i)
         a(i) = a(i) - c / b(i)

Am I right?

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]