This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/25669] New: LBOUND (assumed-size-array), as actual arg,causes fatal error.
- From: "paul dot richard dot thomas at cea dot fr" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 4 Jan 2006 13:31:45 -0000
- Subject: [Bug fortran/25669] New: LBOUND (assumed-size-array), as actual arg,causes fatal error.
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
subroutine foo (a)
real a(*)
call bar (a, LBOUND(a),2)
end subroutine foo
subroutine bar (b, i, j)
real b(i:j)
print *, i, j
print *, b(i:j)
end subroutine bar
real x(10)
x = 0.0
call foo (x)
end
???
This runs fine with other brand compilers but gfortran, patched or not, gives:
tobi.f90: In function ?foo?:
tobi.f90:1: fatal error: gfc_todo: Not Implemented: Unable to determine rank of
expression
compilation terminated.
If LBOUND (a) is replaced with LBOUND(a, 1), all is well. Alternatively,
assigning LBOUND (a) to an integer vector and using the vector as an actual
argument for bar works as well.
The message is emitted from trans-array.c:2393
void
gfc_conv_ss_startstride (gfc_loopinfo * loop)
{
.....
if (loop->dimen == 0)
gfc_todo_error ("Unable to determine rank of expression");
Since scalarization is not needed here, I am not sure how we got to
gfc_conv_ss_startstride.
--
Summary: LBOUND (assumed-size-array), as actual arg,causes fatal
error.
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: paul dot richard dot thomas at cea dot fr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25669
- Follow-Ups:
- [Bug fortran/25669] LBOUND (assumed-size-array), as actual arg,causes fatal error.
- From: pinskia at gcc dot gnu dot org
- [Bug fortran/25669] LBOUND (assumed-size-array), as actual arg,causes fatal error.
- From: pinskia at gcc dot gnu dot org
- [Bug fortran/25669] LBOUND (array), as actual arg,causes fatal error.
- From: paul dot richard dot thomas at cea dot fr
- [Bug fortran/25669] LBOUND (array), as actual arg,causes fatal error.
- From: paul dot richard dot thomas at cea dot fr
- [Bug fortran/25669] LBOUND (array), as actual arg,causes fatal error.
- From: pinskia at gcc dot gnu dot org
- [Bug fortran/25669] LBOUND (array), as actual arg,causes fatal error.
- From: paul dot richard dot thomas at cea dot fr