This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/44352] ICE in string_to_single_character
- From: "pault at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 7 Dec 2010 05:39:58 +0000
- Subject: [Bug fortran/44352] ICE in string_to_single_character
- Auto-submitted: auto-generated
- References: <bug-44352-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44352
--- Comment #8 from Paul Thomas <pault at gcc dot gnu.org> 2010-12-07 05:39:47 UTC ---
(In reply to comment #7)
> Paul, this involves (for me) some heavy voodoo regarding conversion of
> strings to trees.
>
> Do you have any idea, by any chance?
Thomas,
The odd thing is that:
implicit real*8 (a-h,o-z)
character*32 ddname,dname
character*4 :: c
dname(c) = 'h810 e=0.01 '//c
ddname=dname("w")
print *, ddname
END
works, whilst removing the "//c" produces the same failure as the original.
This works too:
implicit real*8 (a-h,o-z)
character*32 ddname,dname
dname(x)= 'h810 e=0.01 '//foo(x)
ddname=dname(42.0d0)
print *, ddname
contains
character*12 function foo (x)
real*8 :: x
write (foo, "(e12.5)") x
end function
END
The ICE arises because the result string is not POINTER_TYPE_P in spite of line
trans-expr.c:3965
tmp = gfc_build_addr_expr (build_pointer_type (type), tmp);
I don't see it at all, right now :-(
Paul