Fortran 95 standard compliance warnings

Hello,

Is it possible to get warnings for only F95 standard violations. If I use the

-Mstandard

option, I get a mix of F90 and F95 warnings?

Thanks,

Bil Kleb
http://fun3d.larc.nasa.gov

Hi Bil,

-Mstandard should give warnings for all non-standard Fortran extensions based on the most current Fortran standard that we support. For the warning you’re getting, is this a violation that occurs in both F90 and F95 or is a extension that was added to F95 standard that we should no longer give a warning?

Thanks,
Mat

Sorry, my original question was too light on details.

I’m using,

pgf95 7.2-5 64-bit target on x86-64 Linux -tp k8-64e

with the -O0 -Mstandard options, and getting warnings like,

PGF90-W-0170-F90 extension: PURE attribute (somefile.f90: 3)
PGF90-W-0170-F90 extension: CPU_TIME intrinsic procedure (afile.f90: 148)
PGF90-W-0171-F90 extension: nonstandard statement type FORALL (a.f90: 16)
PGF90-W-0171-F90 extension: nonstandard statement type ENDFORALL (b.f90: 16)

But I also see these,

PGF90-W-0170-F90 extension: c-style #line directive (preprocess.F90: 1)

which were unexpected, because I thought it wouldn’t worry about
the pre-proccessed source, only the source after it passed through
the C-preprocessor (i.e., without #line directives).

Regards,

Bil Kleb
http://fun3d.larc.nasa.gov

Hi Bil,

I agree. The compiler should not be giving warnings about legal F95 that happen to have been an extension in F90. I’ll pass this on to our engineers. Though, I think the warning about using C pragmas is still valid but will pass this on as well.

Thanks,
Mat

Thanks for passing on the F90 extension warning issue.

As far as the pragmas, how would I avoid those warnings for a Fortran code that requires pre-processing before being compiled? No other compilers give such a warning because presumably they are working on the processed source, not the pre-processed source? (I.e., they know that a capital “F” extension means pre-processing is required before compilation.)

Hi Bil,

I talked with our lead compiler engineer about the warnings for “# line” pragmas. While it’s not standard and that we do carry this information forward past the initial pre-processing step, we concluded that the warning doesn’t really provide any useful information. Hence, we plan on removing this warning in the future.

In the meantime, the sub-optimal way of working around this is to first pre-process the file using the “-F” flag, then compile use -Mstandard. For example:

pgf90 test.F90 -F ; pgf90 -o test -Mstandard test.f -Mfree

We appreciate the input,
Mat

FYI, I added this was added as Technical Problem Report (TPR) #15382.

  • Mat

Is there a mechanism to be automatically informed with this issue is repaired? I.e., a publication-subscription service like RSS, email, twitter, SMS, or the like?

Hi Bil,

One of the final steps of our release process is to send out email notifications of fixed TPRs. Though for users who submit reports via the user’s forum, I will usually just post the notification. For this TPR, I’ll ask customer support to send you an email once it’s been fixed.

  • Mat