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/28849] New: Missed array shape violation with RESHAPE despite -fbounds-check


The assignment of a RESHAPE()d array does not trigger
a run-time error with bounds-checking turned on.

% gfortran -O0 -g -fbounds-check gfcbug39_bounds_check.f90 && ./a.out
 Assignments with correct shapes after RESHAPE...
 a(:,1) =   1.000000    
 b(:,1) =   1.000000       2.000000    
 ...and with wrong shape (should fail with bounds checking on)
 a(:,1) =   1.000000    
 b(:,1) =   1.000000       2.000000    
 Must have missed an array bound violation after RESHAPE...


See the attached sample program for details.

Cheers,
-ha


-- 
           Summary: Missed array shape violation with RESHAPE despite -
                    fbounds-check
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: anlauf at gmx dot de
  GCC host triplet: i686-pc-linux-gnu


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


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