Re: optimization question

2015-05-21 Thread mark maule
On 5/20/2015 2:13 PM, Martin Uecker wrote: mark maule : On 5/20/2015 3:27 AM, Richard Biener wrote: On Mon, May 18, 2015 at 10:01 PM, mark maule wrote: The usual issue with this kind of behavior is out-of-bound accesses of arrays in a loop or invoking undefined behavior when signed

Re: optimization question

2015-05-20 Thread mark maule
On 5/20/2015 3:27 AM, Richard Biener wrote: On Mon, May 18, 2015 at 10:01 PM, mark maule wrote: I have a loop which hangs when compiled with -O2, but runs fine when compiled with -O1. Not sure what information is required to get an answer, so starting with the full src code. I have not

Re: optimization question

2015-05-19 Thread mark maule
On 5/19/2015 10:28 AM, Andrew Haley wrote: On 05/19/2015 04:14 PM, mark maule wrote: Thanks again Martin. I started going down that road yesterday, and got lost in the forest of options. What I was looking for was some option that would tell me what was being done with dgHandle

Re: optimization question

2015-05-19 Thread mark maule
On 5/19/2015 10:09 AM, Martin Sebor wrote: I'm not very familiar with the optimizations that are done in O2 vs O1, or even what happens in these optimizations. So, I'm wondering if this is a bug, or a subtle valid optimization that I don't understand. Any help would be appreciated. Another

Re: optimization question

2015-05-18 Thread mark maule
is volatile or when a lower -O level is used. dgHandle_t is a uint16_t (unsigned short int) and BS_CFG_DRIVE_GROUPS is the value 480. thanks again. Mark On 5/18/2015 7:05 PM, Martin Sebor wrote: On 05/18/2015 02:01 PM, mark maule wrote: I have a loop which hangs when compiled with -O2, but