public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/56852] New: ICE on invalid: "Bad array reference" for an undeclared loop variable
@ 2013-04-05 23:12 bugs at stellardeath dot org
  2013-04-06  9:33 ` [Bug fortran/56852] [4.6/4.7/4.8/4.9 Regression] " dominiq at lps dot ens.fr
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: bugs at stellardeath dot org @ 2013-04-05 23:12 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 56852
           Summary: ICE on invalid: "Bad array reference" for an
                    undeclared loop variable
    Classification: Unclassified
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: bugs@stellardeath.org


Created attachment 29811
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29811
Minimal testcase, invalid code, uncomment line 4 to make it valid (and compile)

The following (invalid code) example produces an internal error, hit this with
4.7.2, seems to also affect my self-compiled 4.9.0 (which is used in the
following transcript).

The only thing remotely similar I could find is #55172, which however seems to
involve OOP.

If I declare "i" as integer to make the code valid, it compiles flawlessly.

Here the transcript, minimal.f90 is also appended as attachment:

$> cat minimal.f90
program test
  implicit none
  real :: a(4)
  ! integer :: i
  read(0) (a(i),i=1,4)
end program
$> gfortran minimal.f90 
minimal.f90:5.14:

  read(0) (a(i),i=1,4)
              1
Error: Symbol 'i' at (1) has no IMPLICIT type
minimal.f90:1.12:

program test
            1
Internal Error at (1):
gfc_variable_attr(): Bad array reference
$> gfortran --version
GNU Fortran (GCC) 4.9.0 20130405 (experimental)
Copyright (C) 2013 Free Software Foundation, Inc.

GNU Fortran comes with NO WARRANTY, to the extent permitted by law.
You may redistribute copies of GNU Fortran
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING

$>


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2015-10-19 19:36 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-05 23:12 [Bug fortran/56852] New: ICE on invalid: "Bad array reference" for an undeclared loop variable bugs at stellardeath dot org
2013-04-06  9:33 ` [Bug fortran/56852] [4.6/4.7/4.8/4.9 Regression] " dominiq at lps dot ens.fr
2013-04-07 11:48 ` mikael at gcc dot gnu.org
2013-05-15 13:27 ` [Bug fortran/56852] [4.7/4.8/4.9 " rguenth at gcc dot gnu.org
2014-06-12 13:41 ` [Bug fortran/56852] [4.7/4.8/4.9/4.10 " rguenth at gcc dot gnu.org
2014-12-19 13:25 ` [Bug fortran/56852] [4.8/4.9/5 " jakub at gcc dot gnu.org
2015-02-18 13:29 ` dominiq at lps dot ens.fr
2015-04-09  7:41 ` pault at gcc dot gnu.org
2015-06-23  8:15 ` [Bug fortran/56852] [4.8/4.9/5/6 " rguenth at gcc dot gnu.org
2015-06-26 19:52 ` [Bug fortran/56852] [4.9/5/6 " jakub at gcc dot gnu.org
2015-06-26 20:26 ` jakub at gcc dot gnu.org
2015-10-19  5:07 ` [Bug fortran/56852] [4.9 " pault at gcc dot gnu.org
2015-10-19 19:33 ` pault at gcc dot gnu.org
2015-10-19 19:36 ` pault at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).