This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/32129] ICE: Procedure call with array-section-actual to scalar dummy
- From: "mikael dot morin at tele2 dot fr" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 2 Jun 2007 00:06:36 -0000
- Subject: [Bug fortran/32129] ICE: Procedure call with array-section-actual to scalar dummy
- References: <bug-32129-13404@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from mikael dot morin at tele2 dot fr 2007-06-02 00:06 -------
Here is an other test case.
program testCode
implicit none
type vec
real, dimension(3) :: coords
end type
integer, parameter :: n = 5
integer :: i
real, dimension(3, n), parameter :: vy =
& reshape( (/ (1.d0, i=1,3*n) /), shape = (/ 3, n /))
i = 1
call Sub(vec(vy(:,i)))
contains
subroutine Sub(xin)
type(vec) :: xin
intent(in) xin
print*, xin
end subroutine
end program
This program produce an ICE (in gfc_trans_call, at fortran/trans-stmt.c:321)
But if vy is a normal variable (not a parameter), it works.
And it works also if we use vy(:,1) instead of vy(:,i).
Hoping it helps...
--
mikael dot morin at tele2 dot fr changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mikael dot morin at tele2
| |dot fr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32129