1825810 Members
2547 Online
109688 Solutions
New Discussion

F90 on Itanium

 
ptrskg
Frequent Advisor

F90 on Itanium

Hi,

We have for some time now used a code generator that produces fortran from templates/meta code. In that meta code we emulate "sections" which can be called using a "perform" statement. This statments will be generated as fortran assign/goto lines.

The problem we now have when using F90 on IA64 is that if a "perform" is placed within a fortran block like If - Else - Endif we get the following warning message, "%F90-W-WARNING, A jump into a block from outside the block may have occurred".

I have looked around in the HP doc's but i don't find a way to suppress the message or change it an informational message.

Does anyone have any experience of this or any ideas how to avoid the warnings?

I'm running HP Fortran V8.0-48071-50EAE on OpenVMS/IA64 8.2-1.

Thanks
Peter
4 REPLIES 4
Willem Grooters
Honored Contributor

Re: F90 on Itanium

I know that the IA64 compilers are far less forgiving on non-standard behaviour compared to AXP compilers. At least, the C compiler is, and it is not really surprising the same would apply to the Fortran compiler.
Having said that, it looks that this construct is not acceptable by the F90 standard - hence this warning.

The problem is ASSIGN and GOTO.
Take into account that a compiler on IA64 will have to do extensive code analysis to determine parallellism in the final executable. CALL (the right translation of COBOL's PERFORM statement) isolates processing, where GOTO may corrupt predication and determination.

Willem
Willem Grooters
OpenVMS Developer & System Manager
Wim Van den Wyngaert
Honored Contributor

Re: F90 on Itanium

Peter,

As I understand it you can only suppress whole groups of warning (check help fortran/warning).

But you could direct the compilation listing to a file and do :
$ search/mat=no "A jump into a block from outside the block may have occurred".

Wim
Wim
John Gillings
Honored Contributor

Re: F90 on Itanium

Peter,

At the moment, I think best you can do from the command line is /WARN=NOGENERAL.

Some compilers let you turn warnings on and off within the code, but Fortran directives aren't that detailed (you can only toggle alignment warnings).

That said, I can only get the compiler to generate this message if there is a GOTO from outside the block (but I haven't played with ASSIGN, so that might have an effect). If you ARE branching into an IF-THEN-ELSE-ENDIF block, then the results may not be well defined. It's probably also playing havok with the optimizer, either resulting in much longer than necessary compliation times, or sub optimal code.

Note that the archaic ASSIGNED GOTO has been deleted in the latest Fortran standard. I'd be STRONGLY encouraging your to look at your code generator to see if you can't change the mechanism to something a bit more up to date. Maybe look at using modules?
A crucible of informative mistakes
ptrskg
Frequent Advisor

Re: F90 on Itanium

Thanks for all viewpoints!
I will probably go for a solution based on two F90 compiling steps, one /syntax_only follow by a /warn=nogen if the only warn/err is the "generated" one.
Peter