This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/31564] Error: Type/rank mismatch in argument
- From: "eedelman at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 May 2007 18:51:03 -0000
- Subject: [Bug fortran/31564] Error: Type/rank mismatch in argument
- References: <bug-31564-14284@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #4 from eedelman at gcc dot gnu dot org 2007-05-28 18:51 -------
(In reply to comment #3)
> (In reply to comment #2)
> > Created an attachment (id=13618)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=13618&action=view) [edit]
> > decl.c patch (not check-gfortran tested)
> >
> > Erik, are you still working on this?
>
> Officially, yes :-)
> I.e., I began, but now I haven't had time to look at it for a couple of weeks.
> Just go ahead and fix it if you are interested.
Just to add one more data point: It's not just procedure arguments that are
problematic; it's expression like
foo%array(variable)
in general, where foo is a PARAMETER. E.g. this piece of code is also
rejected:
SUBROUTINE cdf_beta()
TYPE :: the_distribution
INTEGER :: parameters(1)
END TYPE the_distribution
TYPE (the_distribution), PARAMETER :: the_beta = the_distribution((/0/))
INTEGER :: which, pooh
which = 1
pooh = the_beta%parameters(which)
END SUBROUTINE cdf_beta
erik:~/gcc$ gfortran pr31564.f90
pr31564.f90:12.8:
pooh = the_beta%parameters(which)
1
Error: Incompatible ranks 0 and 1 in assignment at (1)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31564