- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Re: Possible Fortran 8.2 compiler bug on Itanium
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-19-2012 08:16 PM
07-19-2012 08:16 PM
Possible Fortran 8.2 compiler bug on Itanium
HIi,
I am helping a customer port their Fortran applications from OpenVMS Alpha V7.2-2 to OpenVMS IA64 V8.4.
The code (mostly) compiles cleanly but some programs are giving wrong results. For example, when compiling and running the attached file (TMINUSPLUS.FOR) we get wrong values displayed:
$ sho sym fortran %DCL-W-UNDSYM, undefined symbol - check validity and spelling $ fortran tminusplus $ link tminusplus $ run tminusplus 18 20 20 18 20 20 $
The value being output by the program should be '20' on every line; '18' is incorrect.
It looks like the compiler is evaluatiing the expression
result = FILE.INFO.SEG(1).END - FILE.INFO.SEG(1).START + 1
as if it was written
result = FILE.INFO.SEG(1).END - (FILE.INFO.SEG(1).START + 1)
and in fact the erroneous instruction, as seen in the Debugger, is
sub r9 = r9, r10, 1
The trailing ", 1" has the effect of subtracting 1 from the result, whereas the expression requires 1 be added to the result.
I've tried both the Fortran 8.2 compiler and the 8.2 ECO1 compiler and both give the same results.
I am going to try to report this to HP. If anyone has seen this before, and/or knows a workaround (which hopefully doesn't require extensive code changes!) I'd like to know about it.
Thanks,
Jeremy Begg
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-19-2012 09:50 PM
07-19-2012 09:50 PM
Re: Possible Fortran 8.2 compiler bug on Itanium
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-19-2012 11:14 PM
07-19-2012 11:14 PM
Re: Possible Fortran 8.2 compiler bug on Itanium
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2012 12:26 AM
07-20-2012 12:26 AM
Re: Possible Fortran 8.2 compiler bug on Itanium
There is a newer fortran version available:
$ fortran/version
HP Fortran V8.2-104953-50M2N
Eberhard
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2012 12:37 AM
07-20-2012 12:37 AM
Re: Possible Fortran 8.2 compiler bug on Itanium
Hi Eberhad,
That's the Fortran 8.2 ECO1 release, which gives the same results. In fact that's where we first noticed it.
Jeremy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2012 01:07 AM
07-20-2012 01:07 AM
Re: Possible Fortran 8.2 compiler bug on Itanium
I tried this on alpha (8.4) with the same result (error)
$fortran/vers
Hp Fortran v8.2-104679-48H9K
If I use the old f77 compiler (fortran/old) the result is correct (all 20s)
$fortran/old/version
HP Fortran 77 V7.6-198-48H9K (this version reports 7.6 while it really is the 8.2 version, another bug)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2012 03:35 AM
07-20-2012 03:35 AM
Re: Possible Fortran 8.2 compiler bug on Itanium
Dan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2012 06:28 AM
07-20-2012 06:28 AM
Re: Possible Fortran 8.2 compiler bug on Itanium
You could be right, but the image is installed from the fortran 8.2 kit. This kit installs both the fort$main as the f90$main. I find it highly confusing. If they wat to distribute different version for the f90 and the f77 compiler they should have deliverd 2 kits. As far aas I rmember the 8.1 kit distributes an 8.1 version for both compilers.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2012 08:57 AM
07-20-2012 08:57 AM
Re: Possible Fortran 8.2 compiler bug on Itanium
It worked correctly under the Fortran 95 compiler on a much older Alpha version - running OpenVMS Alpha V7.3-2 and Fortran V7.5-1961-48BCD
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2012 02:48 PM
07-20-2012 02:48 PM
Re: Possible Fortran 8.2 compiler bug on Itanium
This was fixed recently. Please contact your Support Centre for a remedial side image.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2012 02:58 PM
07-23-2012 02:58 PM
Re: Possible Fortran 8.2 compiler bug on Itanium
Jeremy,
If only all "I've found a compiler bug" reports were so well researched, characterised and documented with such a simple and unarguable reproducer! :-)