This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/29507] INDEX in an array initialization causes ICE
- From: "pault at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 23 Oct 2006 10:02:30 -0000
- Subject: [Bug fortran/29507] INDEX in an array initialization causes ICE
- References: <bug-29507-10110@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from pault at gcc dot gnu dot org 2006-10-23 10:02 -------
Created an attachment (id=12479)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12479&action=view)
Provisional general fix for the PR
This patch fixes the the following:
real, parameter :: a(2,2) = reshape ((/1.0, 2.0, 3.0, 4.0/), (/2,2/))
real, parameter :: b(2,2) = sin (a)
character(6), parameter :: ch(3) = (/"animal", "person", "mantee"/)
character(1), parameter :: ch2(3) = (/"n", "r", "t"/)
integer, parameter :: i(3) = index (ch, ch2)
print *, a, b
print *, ch, i
end
There are still several things to do:
(i) Understand why *e needs to be copied to old and then freed; ideally, *e
should be assigned to old and expr assigned to it, at exit;
(ii) Add conformance checks;
(iii) Check if the branch to the new function is in the correct place - it is
certainly the earliest opportunity to identify an elemental intrinsic; and
(iv) Check that none of the non-elemental intrinsics are screwed up.
Paul
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29507