This is the mail archive of the 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/33282] New: ICE in find_array_section when using vector subscripts

The following Fortran 90 program crashes gfortran-4.2.1:

program test
     real(kind=8),parameter :: beta0(3) = (/ 1.0, 1.0, 1.0 /)
     integer :: i(3)
     real(kind=8) :: beta(3), beta_coef

     i = (/ 1, 2, 3 /)
     beta_coef = 1.0
     beta = beta0(i) * beta_coef
end program test

(Workaround: "beta = beta0(i) ; beta = beta * beta_coef")

Compiler output:

$ gfortran -g -O2 -march=pentium4 -mfpmath=sse -ffree-form
-ffree-line-length-none -Wall -W -Wno-unused -Wimplicit-interface -Wtabs
-fimplicit-none -ffpe-trap=invalid,zero,overflow -o arraybug arraybug.f90
arraybug.f90:0: internal compiler error: in find_array_section, at
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:> for instructions.

$ gfortran -v
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../gcc-4.2.1/configure --prefix=/home/r6144/apps/gcc-4.2.1
--enable-languages=c,fortran --with-mpfr=/home/r6144/apps/mpfr-2.3.0
Thread model: posix
gcc version 4.2.1

$ gfortran --version
GNU Fortran (GCC) 4.2.1
Copyright (C) 2007 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

           Summary: ICE in find_array_section when using vector subscripts
           Product: gcc
           Version: 4.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: rainy6144 at gmail dot com
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu

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