- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Weird Error when compiled Proc code with +Ofas...
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
Forums
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
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
тАО06-17-2009 10:34 AM
тАО06-17-2009 10:34 AM
Wierd Error when compiled Proc code with +Ofast compiler option
Today I have faced really a wierd error. I have a Pro C code which is first converted to c file and then I compiled it with aCC compiler using +Ofast compiler option. Then the code behaves in way different from when it is compiled without Ofast option. And later behaviour is the expected one.
I have debug statement immediately after the END-EXEC; statement in the file, which is the end of the pl/sql block. This debug statement is making the difference. It works fine if i remove the debug statement or remove Ofast from the compiler option or when i run the debug_binary.
Can anyone throw some lite on why this is happening??
Thanks in advance
- Tags:
- ProC
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-17-2009 10:57 AM
тАО06-17-2009 10:57 AM
Re: Wierd Error when compiled Proc code with +Ofast compiler option
2) "This debug statement is making the difference."
3) "It works fine if i remove the debug statement or remove Ofast from the compiler option or when i run the debug_binary"
Well...depending upon which of the above statements is really the case, then you have 4 (or possibly more) cases.
Knowing nothing of ProC, I think the first step would be to capture the .c files emitted by ProC to see what changes occur with and without the referenced debug statement.
Then compile both of them, once with and once without the -Ofast option and see which ones work as expected.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-17-2009 02:22 PM
тАО06-17-2009 02:22 PM
Re: Wierd Error when compiled Proc code with +Ofast compiler option
I have a code which i compile to get a shared library. In that I have a small function which I used in different there code peices by include/linking the correct headers/library. And the function I just logs the statments to a file when debug is on.
Here are my observations
1. When I have the debug statement and I have +Ofast option.
This case does not work fine.
2. When I have the debug statement and I do not use +Ofast option.
This case is good.
And I have tried to look into the c file in both the cases it is the same.
3. With Ofast option if I remove the debug statement the result is good.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-17-2009 07:52 PM
тАО06-17-2009 07:52 PM
Re: Wierd Error when compiled Proc code with +Ofast compiler option
1. I can't see any of the code.
2. I don't have a program that I can test.
3. My psychic powers are very weak.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-17-2009 08:20 PM - edited тАО02-08-2014 07:49 PM
тАО06-17-2009 08:20 PM - edited тАО02-08-2014 07:49 PM
Re: Weird Error when compiled Proc code with +Ofast compiler option
What OS are you using? What aC++ version are you using? The latest aCC6 version is A.06.23.
(Previous threads had 11.23 and A.06.15.)
Have you removed +Ofast and replaced by +O2?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-17-2009 11:55 PM
тАО06-17-2009 11:55 PM
Re: Wierd Error when compiled Proc code with +Ofast compiler option
HP C/aC++ Version A.06.20
My OS is
B.11.23 U ia64
Attached is the code. And the last line is the one which creates the problem.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-17-2009 11:58 PM
тАО06-17-2009 11:58 PM
Re: Wierd Error when compiled Proc code with +Ofast compiler option
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-18-2009 12:41 AM - edited тАО02-08-2014 07:49 PM
тАО06-18-2009 12:41 AM - edited тАО02-08-2014 07:49 PM
Re: Weird Error when compiled Proc code with +Ofast compiler option
>HP C/aC++ Version A.06.20
You should install the latest patch, PHSS_39823.
>Attached is the code.
That is useless, I would need a .i. And unless you could run it, that wouldn't be that helpful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-18-2009 12:57 AM
тАО06-18-2009 12:57 AM
Re: Wierd Error when compiled Proc code with +Ofast compiler option
#ifndef SQL_CRSR
# define SQL_CRSR
struct sql_cursor
{
unsigned int curocn;
void *ptr1;
void *ptr2;
unsigned int magic;
};
typedef struct sql_cursor sql_cursor;
typedef struct sql_cursor SQL_CURSOR;
#endif /* SQL_CRSR */
This code is generated by the proc compiler.
When I compile the above code with ofasat option my result is invalid cursor
And when I compile it without ofast option I get the data.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-18-2009 01:16 AM - edited тАО02-08-2014 07:48 PM
тАО06-18-2009 01:16 AM - edited тАО02-08-2014 07:48 PM
Re: Weird Error when compiled Proc code with +Ofast compiler option
>result is invalid cursor
You could print out struct sql_cursor in gdb and compare the good and bad.