This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH][ARM] pr50193: ICE on a | (b << negative-constant)


On Thu, 1 Sep 2011, Andrew Stubbs wrote:

> This patch fixes the problem by merely checking that the constant is positive.
> I've confirmed that values larger than the mode-size are not a problem because
> the compiler optimizes those away earlier, even at -O0.

Do you mean that you have observed for some testcases that they get 
optimized away - or do you have reasons (if so, please state them) to 
believe that any possible path through the compiler that would result in a 
larger constant here (possibly as a result of constant propagation and 
other optimizations) will always result in it being optimized away as 
well?  If it's just observation it would be better to put the complete 
check in here.

Quite of few of the Csmith-generated bug reports from John Regehr have 
involved constants appearing in unexpected places as a result of 
transformations in the compiler.  It would probably be a good idea for 
someone to try using Csmith to find ARM compiler bugs (both ICEs and 
wrong-code); pretty much all the bugs reported have been testing on x86 
and x86_64, so it's likely there are quite a few bugs in the ARM back end 
that could be found that way.

-- 
Joseph S. Myers
joseph@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]