views:

53

answers:

2

Is there a test suite out there that checks whether a Fortran compiler fully implements the Fortran 2003 standard?

+2  A: 

I don't know of such a test suite. If I'm concerned about it I look here or read this.

High Performance Mark
+2  A: 

Short answer: No

For Fortran 95, there is the SHAPE95 test suite by Spackman & Hendrickson, Inc. But, it never claimed to be a full testsuite, nor was it officially authoritative. Of course, the same applies to the NIST F77 testsuite which, as opposed to SHAPE95, is freely available. Secondly, AFAIK SHAPE95 hasn't been updated for F2003.

So what to do? Well, some discussion about the same thing on c.l.f a few years ago:

Bart Vandewoestyne wrote:
> On 2007-12-14, Richard Maine  wrote:
>> It seems reasonably complete to me. But you can't just use a checklist
>> like that for standard compliance. It is a very nice summary, and I find
>> it quite useful, but I'm sorry, the full standard doesn't compress down
>> to one page like that. Sorry, but it ain't gonna happen. If anyone
>> claims to have such a one-page or so checklist of the things that would
>> make a compiler fully f2003 compliant, then they are wrong.

>> But it is a good summary.

> I completely agree with you, Richard.  But then what are the
> criteria for 'full F2003 compliance'?  If a compiler-writer
> claims that he has a 'full F2003 compliant compiler', then what are
> the criteria that he uses to support his statement?

Ultimately, good faith and his reputation.  It's a hard standard to
read (or to write books about, as Richard can tell you) and there is no
official test or validation program.  Real vendors won't claim
to support it unless they really think they do.  And, they'll do
their best to fix any omissions or errors.  There is an interpretation
process that will get J3 to give an official answer to a specific
question.  For the past many years, essentially all of the interp
questions have come from compiler writers who are trying to understand
the standard.

It's not a great situation.  The best advice is to get several
compilers and try your code on several of them--with full error
checking and standards conformance options turned on.

Dick Hendrickson

FWIW, the "Richard Maine" character above was the editor of the F2003 standard, and "Dick Hendrickson" has IIRC also served on the standards committee, and yes, he's one of the guys behind SHAPE95. IOW, they know what they're talking about.

Finally, the gfortran compiler comes with a fairly large testsuite, which is freely available just like the rest of the compiler. I've seen some remarks from proprietary compiler vendors that they have also used it. But, again, the gfortran testsuite doesn't claim to be a full testsuite; in fact, it's mostly test cases that have previously exposed bugs in the compiler.

janneb