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/49416] New: wrong -fbounds-check with 2 dimensional arrays reshape


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

           Summary: wrong -fbounds-check with 2 dimensional arrays reshape
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: koval.peter@gmail.com


The bug arises when -fbounds-check option and reshape intrinsic are used.
 gfortran --version
GNU Fortran (Ubuntu 4.4.3-4ubuntu5) 4.4.3
Copyright (C) 2010 Free Software Foundation, Inc.

The program below results in a runtime error (when compiled with -fbounds-check
option), although it runs normally without -fbounds-check option.

program check_reshape

  implicit none
  real(8), allocatable :: a(:,:)
  allocate(a(2,-2:2))

  write(6,*) reshape(a, (/ 10 /))

end program !check_reshape


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