Operating System - OpenVMS
cancel
Showing results for 
Search instead for 
Did you mean: 

HP Fortran V8.2-104939-50H96 optimizer has a bug

 
Mario Dhaenens
Frequent Advisor

HP Fortran V8.2-104939-50H96 optimizer has a bug

In a Fortran application I use embedded sql to select a record from an Oracle 10g database.

When I compile the fortran application with optimize (Default) it returns no record but it should. (sqlstate = 02000 no record found)
When I compile the same program with no optimize option it is working OK.

Has anyone else had the same problem?
All help is welcome.

I use these versions:
Database : Oracle 10gR2
Operating system : OpenVMS 8.3 on I64
PROFOR compiler : Pro*FORTRAN: 1.8.79.2.0
Fortran compiler: HP Fortran V8.2-104939-50H96

In the attachment you can find the application.
2 REPLIES 2
Hein van den Heuvel
Honored Contributor

Re: HP Fortran V8.2-104939-50H96 optimizer has a bug


It is really very very rare to find a fortran compiler bug.

99 out of a 100 times someone indicates a compiler bug, it turns out to be an application issue, for example an uninitialized variable.

Of course you may well be that 1 real bug, but honestly, the problem description while much better than the average 'it does not work', and very nicely detailed indeed, it does not sound 'solid' enough to make me think that.

Why do I say that?

First and foremost the time of submission :-)
Friday afternoon!
Anyone having worked in support will know :-)

Secondly, real bugs tend to be behind subject lines like "Please help me understand what I am doing wrong".

Finally, the reported error ... a basic SQL error, with no indication that SQL was asked the right thing. So for me, right away it is either a Pro*for or Oracle issue.. if not simply a coding error.

What I would have hoped to see to make this a solid bug indicator is a statement that the application was debugged with a breakpoint on the call into Oracle and all bind-variable values were triple checked to be binary correct.

Or rather, that is probably where the difference is between the working and failing code.
So that would take SQL out of the picture as you would have indicated an unexplainable value being passed, rather than a boring result deep down from a bad value.

So... my advice to you is to go hit the debugger, first with optimizer OFF and verify and record the exact parameters being passed to SQL. Then switch the optimizer ON, and again use the debugger setting a break on the same call into oracle and re-verify the arguments.
Spot the difference and work your way back!

An other interesting alternative might be to produce a stub-routine instead of the SQL function where all the stub routine does it print the exact arguments.

Ready to eat my words!

Good luck,

Hein.
Mario Dhaenens
Frequent Advisor

Re: HP Fortran V8.2-104939-50H96 optimizer has a bug

closed