Re: [Bug c++/37685] New: C++ over-eager optimization when working with a pointer

2008-09-30 Thread Andrew Thomas Pinski
Sent from my iPhone On Sep 30, 2008, at 10:26 AM, "jrenggli at gmail dot com" <[EMAIL PROTECTED] > wrote: The following code results in an error when optimized using -O2 or - O3 flag, but works fine with -O1. I've also been able to "confuse" the optimizer by adding some code just after or

[Bug c++/37685] New: C++ over-eager optimization when working with a pointer

2008-09-30 Thread jrenggli at gmail dot com
The following code results in an error when optimized using -O2 or -O3 flag, but works fine with -O1. I've also been able to "confuse" the optimizer by adding some code just after or before the line "iX += pA2->iX;" but I'm not sure how safe that method is. -- Full code starts