Debian Codegraph @

gcc/testsuite/c-c++-common/pr103798-7.c

raw
1 /* { dg-do run { target int128 } } */
2 /* { dg-options "-O2 -fdump-tree-optimized -save-temps" } */
3
4 __attribute__ ((weak))
5 int f(char a)
6 {
7 return __builtin_memchr ("aEgiHjZ", a, 7) == 0;
8 }
9
10 __attribute__ ((weak))
11 int g(char a)
12 {
13 return (a != 'a' && a != 'E' && a != 'g' && a != 'i' && a != 'H'
14 && a != 'j' && a != 'Z');
15 }
16
17 int
18 main ()
19 {
20 for (int i = 0; i < 255; i++)
21 if (f (i) != g (i))
22 __builtin_abort ();
23
24 return 0;
25 }
26
27 /* { dg-final { scan-assembler-not "memchr" } } */