On Fri, Feb 15, 2013 at 06:01:05PM -0500, Jack Howarth wrote:
> On Fri, Feb 15, 2013 at 09:54:19PM +0100, Dodji Seketeli wrote:
> FAIL: c-c++-common/asan/no-redundant-instrumentation-7.c  -O0   
> scan-tree-dump-times asan0 "__builtin___asan_report_load" 6
> 
> at both -m32 and -m64. The no-redundant-instrumentation-7.s from the failing 
> -m64
> test case is attached, generated with...

I think
void
foo  (int *a, char *b, char *c)
{
  __builtin_memcmp (s.a, e, 100);
  __builtin_memcmp (s.a, e, 200);
}
is problematic, for -O1 both calls would be definitely removed, because they
are pure, and even at -O0 I guess they might be expanded into nothing.
Perhaps
int
foo ()
{
  int i = __builtin_memcmp (s.a, e, 100);
  i += __builtin_memcmp (s.a, e, 200);
  return i;
}
or similar would work better.  And for pr56330.c testcase, which is there to
verify that we don't ICE on it and I believe there was important that both
builtins are adjacent, perhaps it should be __builtin_memcpy instead.

        Jakub

Reply via email to