On Thu, Mar 03, 2016 at 12:04:31PM +0100, Marek Polacek wrote: > We crashed on the attached testcase because we were trying to apply the > X % -Y -> X % Y transformation even on vectors. That doesn't go well with the > check for !TYPE_UNSIGNED. So I think let's limit the pattern to only work on > integral types.
I think TYPE_UNSIGNED is fine, but TYPE_MIN_VALUE is not. > Bootstrapped/regtested on x86_64-linux, ok for trunk? > > 2016-03-03 Marek Polacek <pola...@redhat.com> > > PR middle-end/70050 > * match.pd (X % -Y): Add INTEGRAL_TYPE_P check. > > * gcc.dg/pr70050.c: New test. Ok, thanks. Jakub