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 fortran/27786] New: Bad interaction between Cray pointer, assumed-size array and bounds checking


This reduced testcase is originally from the testsuite
gfortran.dg/cray_pointers_2.f90. It generates an incorrect out-of-bounds error
message when run with bounds-checking enabled.

$ cat cray_pointers_2.f90 
  integer targ(2)
  integer pte
  pointer(ptr,pte(*))
  ptr = loc(targ)

  targ(2) = -1
  print *, pte(2)
  end
$ gfortran -fbounds-check -fcray-pointer cray_pointers_2.f90 && ./a.out
Fortran runtime error: Array reference out of bounds


-- 
           Summary: Bad interaction between Cray pointer, assumed-size array
                    and bounds checking
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: fxcoudert at gcc dot gnu dot org
OtherBugsDependingO 27766
             nThis:


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


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