[Bug rtl-optimization/40679] New: Optimizer handles loops with volatiles and post-incr. wrong

2009-07-08 Thread bastian dot schick at sciopta dot com
If the following code is compiled with -Os for ARM or ColdFire, the exit condition for the loop is removed. Replacing *tbl++ with tbl[i] or using unsigned long instead of volatile unsigned long does not show the problem. I suspect the post-increment optimization to be the problem, because the

Re: [Bug rtl-optimization/40679] New: Optimizer handles loops with volatiles and post-incr. wrong

2009-07-08 Thread Andrew Pinski
Sent from my iPhone On Jul 8, 2009, at 12:32 AM, bastian dot schick at sciopta dot com gcc-bugzi...@gcc.gnu.org wrote: If the following code is compiled with -Os for ARM or ColdFire, the exit condition for the loop is removed. Replacing *tbl++ with tbl[i] or using unsigned long instead