Re: what is wrong with this code ?
- From: jfh <john.harper@xxxxxxxxx>
- Date: Wed, 24 Jun 2009 16:51:09 -0700 (PDT)
On Jun 25, 7:20 am, dpb <n...@xxxxxxx> wrote:
Richard Maine wrote:The latest Intel compiler available to me still does that with my
...snip usual clear evaluation of what I brushed off... :)
This example is an argument list instead of the list in an implied DO,
but the principle applies pretty generally to most (all?) lists. You
can't generally just add parens around a list or parts of it.
Yeah, I'd have recognized the problem there; it appears to be a habit in
the implied DO lists I've fallen into where it's become a habit.
Yes, there are compilers that accept it as an extension in some cases.
And I don't recall whether you are using the Intel compiler, but if so,
insert my usual complaint about its default setting quietly accepting
far too many extensions. (I don't mind accepting the extensions, but I
do mind the default setting being so quiet about them).
It's actually the now-defunct (sorta') predecessor of the Intel compiler
since I retired or was strongly considering it at the time of the demise
so couldn't really ever justify the switchover cost...
Interestingly, in that incarnation it can't/doesn't find the violation
of the Standard even when /stand:f95 is requested. I guess that is a
Standard violation in not diagnosing the nonstandard usage.
It's possible the current versions have found and now do so of course,
but I can't check...
Anyway, I guess I'll try to remember to not do it from now on... :)
--
little test program:
puka[~]$ cat loopintel.f90
! Has Intel a bug here? The inner ( ) is bad Fortran
PRINT "(3I4)", ( (i,i**2,i**3), i=1,2 )
END
puka[~]$ ifort -V -stand=f95 loopintel.f90
Intel(R) Fortran Compiler Professional for applications running on
IA-32, Version 11.0 Build 20090318 Package ID: l_cprof_p_11.0.083
Copyright (C) 1985-2009 Intel Corporation. All rights reserved.
FOR NON-COMMERCIAL USE ONLY
Intel Fortran 11.0-1578
GNU ld version 2.15.92.0.2 20040927
puka[~]$ ./a.out
1 1 1
2 4 8
puka[~]$
John Harper
.
- Follow-Ups:
- Re: what is wrong with this code ?
- From: dpb
- Re: what is wrong with this code ?
- References:
- what is wrong with this code ?
- From: VICTOR
- Re: what is wrong with this code ?
- From: dpb
- Re: what is wrong with this code ?
- From: dpb
- Re: what is wrong with this code ?
- From: *** Hendrickson
- Re: what is wrong with this code ?
- From: dpb
- Re: what is wrong with this code ?
- From: Richard Maine
- Re: what is wrong with this code ?
- From: dpb
- what is wrong with this code ?
- Prev by Date: Re: Dynamic F03 Interfaces?
- Next by Date: Re: Dynamic F03 Interfaces?
- Previous by thread: Re: what is wrong with this code ?
- Next by thread: Re: what is wrong with this code ?
- Index(es):
Loading