Re: generic bug in fixed-point constant folding

2009-03-17 Thread Sean D'Epagnier
Hi, I found a few more cases that still cause internal compiler errors, I managed to fix them. I have attached an updated patch. Sean On Tue, Mar 17, 2009 at 12:45 PM, Fu, Chao-Ying wrote: > Sean D'Epagnier wrote: >> >> I think I found a generic problem for fixed point constant folding. >> >>

RE: generic bug in fixed-point constant folding

2009-03-17 Thread Fu, Chao-Ying
Sean D'Epagnier wrote: > > I think I found a generic problem for fixed point constant folding. > > In fold-const.c:11872 gcc tries to apply: > /* Transform (x >> c) << c into x & (-1< c) >> c > into x & ((unsigned)-1 >> c) for unsigned types. */ > > I attached a simple patch whic

generic bug in fixed-point constant folding

2009-03-16 Thread Sean D'Epagnier
Hi, I think I found a generic problem for fixed point constant folding. In fold-const.c:11872 gcc tries to apply: /* Transform (x >> c) << c into x & (-1<> c into x & ((unsigned)-1 >> c) for unsigned types. */ I attached a simple patch which fixes the problem by not applying this