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/33288] ICE (segfault) in mpfr_cmp2 when evaluating array initializers containing addition



------- Comment #3 from dominiq at lps dot ens dot fr  2007-09-03 09:43 -------
If I try to "regtestify" the code (uncomment the commented line):

program initbug
     integer,parameter :: n0 = 3, n = 5
     real(kind=8),parameter :: x0(n0) = (/ 2.0d0, 2.0d0, 2.0d0 /)
     real(kind=8),parameter :: x(n) = (/ -x0, x0(n0-1:1:-1) /) + 1.0d0
     print *, x
!     if (any(x /= (/ -1.0d0, -1.0d0, -1.0d0, 3.0d0, 3.0d0 /))) call abort()
end program initbug

I get:

[karma] f90/bug% gfc pr33288.f90
pr33288.f90:4.37:

     real(kind=8),parameter :: x(n) = (/ -x0, x0(n0-1:1:-1) /) + 1.0d0
                                    1
Error: Array operands are incommensurate at (1)


-- 


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


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