[Bug fortran/33282] New: ICE in find_array_section when using vector subscripts

rainy6144 at gmail dot com gcc-bugzilla@gcc.gnu.org
Sun Sep 2 16:44:00 GMT 2007


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
fortran/expr.c:1079
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> 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
--disable-bootstrap
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


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



More information about the Gcc-bugs mailing list