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/29507] INDEX in an array initialization causes ICE



------- 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


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