This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/34828] ICE: GNU MP: Cannot reallocate memory for gfortran.dg/parameter_array_init_3.f90
- From: "jvdelisle at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 29 Jan 2008 03:33:16 -0000
- Subject: [Bug fortran/34828] ICE: GNU MP: Cannot reallocate memory for gfortran.dg/parameter_array_init_3.f90
- References: <bug-34828-13404@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #10 from jvdelisle at gcc dot gnu dot org 2008-01-29 03:33 -------
Here is a modified test case that illustrates the problem better. It was just
dumb luck that the test case was passing on some platforms. The following
segfaults on x86-64 with current trunk.
module abuse_mod
implicit none
integer i
character(8), parameter :: HEX1 = '40490FDB'
integer(1), parameter :: MSKa1(len(HEX1)/2) = (/(i,i=1,len(HEX1),2)/)
integer(1), parameter :: ARR1(len(HEX1)/2) = (/( MSKa1(i),
i=1,len(HEX1),2)/)
end module abuse_mod
program test
use abuse_mod
print '(8i2)', (/(i,i=1,len(HEX1),2)/)
print '(8i2)', MSKa1
print '(8i2)', ARR1
end program test
Just the right memory locations in ar->as->upper[i]->value.integer happen to be
zero. There is no ar->as->upper[i]->value.integer in this test case.
ar->as->upper[i] has expr_type == EXPR_FUNCTION.
Now to figure out the proper fix. ;)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34828