The attached sample code fails when compiledwith bounds-check, yet there's no
bounds violation. Note that it works correctly if the vector is declared with
v(n) instead of v(*). 
------------------------- i686-pc-linux-gnu --------------------
[EMAIL PROTECTED] TEMP]$ gfortran -fbounds-check -otmp2 tmp2.f90
[EMAIL PROTECTED] TEMP]$ ./tmp2
Fortran runtime error: Array reference out of bounds
[EMAIL PROTECTED] TEMP]$ gfortran -v
Using built-in specs.
Configured with: ../gcc-4.0-20050130/configure --prefix=/usr/local/gfortran
Thread model: posix
gcc version 4.0.0 20050130 (experimental)

-- 
           Summary: -fbounds-check catches non-existent bounds violation
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: sfilippone at uniroma2 dot it
                CC: gcc-bugs at gcc dot gnu dot org
  GCC host triplet: i686-pc-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19777

Reply via email to