Do we know anything about "Csmith"? Maybe we should try it?
Andrew -------- Original Message -------- Subject: Re: [PATCH][ARM] pr50193: ICE on a | (b << negative-constant) Date: Thu, 1 Sep 2011 13:21:38 +0000 (UTC) From: Joseph S. Myers <jos...@codesourcery.com> To: Andrew Stubbs <a...@codesourcery.com> CC: gcc-patc...@gcc.gnu.org, patc...@linaro.org Newsgroups: gmane.comp.gcc.patches References: <4e5f6b5f.2020...@codesourcery.com> 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 jos...@codesourcery.com _______________________________________________ linaro-toolchain mailing list linaro-toolchain@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-toolchain