Update: - parentheses did not fix the problem: testWord = (valueToTest >>= 32);
- splitting it into two instructions did not fix the problem: valueToTest >>= 32; testWord = valueToTest; - recompiling just the single module with Opt(0) rather than Opt(2) did fix the problem. Everything else 100% the same. It may well be the surrounding code that causes the problem but I don't have the time at this point to try a hundred different test cases. I think we definitely have a compiler bug here. I may try the union approach, or the "pure C" (no call to ffs()) code that David suggested. I might try un-inlining the function, although that is basically a part of the "try a hundred different things" approach. Also, thanks David, not sure why I pulled that GONUMBER out of there. I will give that some thought. Charles -----Original Message----- From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf Of David Crayford Sent: Monday, July 22, 2013 4:22 AM To: [email protected] Subject: Re: Looking for help with an obscure C integer problem On 22/07/2013 12:17 PM, Charles Mills wrote: > > # 0 and NOINLINE TEST or 2 and INLINE NOTEST > # OPT(0) NOINLINE TEST GONUMBER > OPT(2) INLINE NOTEST NOGONUMBER COMPRESS Are you concerned about the size of your load modules? I can understand that in C++ code that uses STL templates but I would trade off bigger load modules for the better diagnostics that OFFSET GONUMBER give me. ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
