This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch, Fortran] PR fortran/35846: ICE on character array constructor
- From: Tobias Burnus <burnus at net-b dot de>
- To: gcc-patches at gcc dot gnu dot org, fortran at gcc dot gnu dot org
- Date: Sat, 20 Sep 2008 18:38:22 +0200
- Subject: Re: [Patch, Fortran] PR fortran/35846: ICE on character array constructor
Hi Daniel,
Daniel Kraft wrote:
> this is a fix for PR fortran/35846 where character array constructor
> ICEd in certain situations because gfc_conv_string_length could be
> called with a charlength structure whose length was NULL. [...]
>
> After fixing the ICE, the problem with the global variables pointed out
> broke bounds-checking for the tests, which I fixed by saving & restoring
> their values.
I think you just made it more difficult to hit the bug rather than
fully fixing the bug. If one adds another nested constructor one
still gets:
internal compiler error: in gfc_conv_array_constructor_expr,
at fortran/trans-expr.c:3356
using the following program
implicit none
character(len=3) :: c(3)
c = 'a'
c = (/ (/ 'A'//(/ trim(c(1)), 'a' /)/)//'c', 'dcd' /)
print *, c(1)
print *, c(2)
print *, c(3)
end
NAG f95 and ifort print for this program:
Aac
Aac
dcd
Tobias