summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/execute/builtins/lib/bfill.c
blob: deb6cf5228e3f1889300fb4d4dc0f4906e09df7b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
extern int inside_main;

__attribute__ ((__noinline__))
void
bfill (void *s, __SIZE_TYPE__ n, int ch)
{
  char *p;

  for (p = s; n-- > 0; p++)
    *p = ch;

#ifdef __OPTIMIZE__
  if (inside_main)
    abort ();
#endif
}