From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4210 invoked by alias); 13 Jun 2007 06:25:51 -0000 Received: (qmail 4162 invoked by uid 48); 13 Jun 2007 06:25:39 -0000 Date: Wed, 13 Jun 2007 06:25:00 -0000 Subject: [Bug fortran/32315] New: DATA with implied-do: Bounds checks missing X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "burnus at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2007-06/txt/msg00980.txt.bz2 Found at: http://groups.google.com/group/comp.lang.fortran/browse_thread/thread/34f509b6b4241c6d/ program chkdata character(len=20), dimension(4) :: string data ( string(i) ,i=1,5 ) / & 'A', 'B', 'C', 'D', 'E' / write(*,*) string end program chkdata gfortran gives no warning/error whereas NAG f95 rejects it with: Error line 5: First subscript (5) is greater than upper bound (4) for array STRING and g95 rejects it with: Error: Out of bounds array reference at (1) and sunf95 with: ERROR: The upper bound for dimension 1 of the array STRING is out of range. (ifort does the same as gfortran: It accepts it.) -- Summary: DATA with implied-do: Bounds checks missing Product: gcc Version: 4.3.0 Status: UNCONFIRMED Keywords: accepts-invalid, diagnostic Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: burnus at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32315