blob: ddcedc7e238d5173e0fbb48f5f47b9e48bba79f8 [file] [log] [blame]
/* { dg-do run } */
/* { dg-options "-O2 -fdump-tree-optimized -save-temps" } */
__attribute__ ((weak))
int
f (char a)
{
return __builtin_memchr ("aEgZ", a, 3) == 0;
}
__attribute__ ((weak))
int
g (char a)
{
return a != 'a' && a != 'E' && a != 'g';
}
int
main ()
{
for (int i = 0; i < 255; i++)
if (f (i) != g (i))
__builtin_abort ();
return 0;
}
/* { dg-final { scan-assembler-not "memchr" } } */