This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: Error: Parameter array ... cannot be automatic or assumed shape
- From: Daniel Franke <franke dot daniel at gmail dot com>
- To: fortran at gcc dot gnu dot org
- Date: Thu, 26 Jul 2007 18:58:13 +0200
- Subject: Re: Error: Parameter array ... cannot be automatic or assumed shape
- Dkim-signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:from:to:subject:date:user-agent:references:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:message-id; b=KukLmWjlyXyQFCtJHzz1rPbXSGTPSxoiV+Kttc3xa5jRZd/cMlceQS34a+MfR1ljG3cjpfX2Um3P+kN7fVnEBk9KlVAz8AN6dmBmdGPCKZReZsriNN9yO+EznaS22+HZ0t8QhviVbDVpJbQG2j3Ot4byJWgVdu3jSiK0b4lIlyc=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:from:to:subject:date:user-agent:references:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:message-id; b=iOPrDZBXyPJMPsRhN7OtSh+I4rWdPb70b1ZYs3TTpnuUCqCh6EvTn0rqPmLNwhQVwVSz7ysjF1n5U1g/wTVXjSaI3qf6w7bCLONCKqXc2wTbgAEkosowSpD20dSOLAig7o/nK6t+M51mHWsXsvMCbJltTL8s1rO9OGqw9ApD4qA=
- References: <46A8CEA2.3040609@gmx.at>
On Thursday 26 July 2007 18:41:06 Florian Ladstaedter wrote:
> Hi, I am trying to get a software project compiling with gfortran, this
> is the first error I am running in (example code):
[code and messages snipped]
> $ gfortran-4.2 --version
> GNU Fortran (GCC) 4.2.1 (Debian 4.2.1-0)
> This is somehow similar to PR26074 (which is fixed and works). NAG and
> Lahey Fortran compiler work with this code. Is this a gfortran bug or do
> you have any suggestion (apart from using simply a number in the
> dimension specification)?
Florian,
PR26974 has:
integer, parameter :: len = 1
integer :: arr(max(len,1)) = (/1/)
while your testcase contains:
integer, parameter :: l = 1
integer, parameter :: arr(max(l,1)) = (/1/)
where the only difference is the additional PARAMETER declaration for ARR. I
can reproduce the problem with gfortran-{4.1.2|4.2|4.3}. Intel and Sun
compilers remain silent. So, I'd think, this is a bug.
If nobody else objects, please open a new PR.
Thanks :)
Daniel