On Wed, Nov 27, 2013 at 12:26:08AM +0100, Marek Polacek wrote: > Ran the testsuite on x86_64-linux. Ok for trunk?
Ok, with a minor nit. > --- gcc/testsuite/c-c++-common/ubsan/undefined-1.c.mp3 2013-11-26 > 23:56:42.151624262 +0100 > +++ gcc/testsuite/c-c++-common/ubsan/undefined-1.c 2013-11-27 > 00:12:46.053851104 +0100 > @@ -0,0 +1,25 @@ > +/* { dg-do run } */ > +/* { dg-options "-fsanitize=undefined" } */ > +/* { dg-skip-if "" { *-*-* } { "-flto" } { "" } } */ > + > +int > +foo (int x, int y) > +{ > + if (2 & 1) Please use here: int z = 2; if (z & 1) or similar instead, to make sure it is only early GIMPLE optimization passes that optimize it away, if already the front end knows it isn't needed, perhaps in the future it could just avoid instrumenting it. Jakub