1 /* Test whether strncmp has not been "optimized" into memcmp
2 nor any code with memcmp semantics. */
3 /* { dg-do run { target mmap } } */
4 /* { dg-options "-O2" } */
8 /* Darwin spells this differently */
10 #define MAP_ANONYMOUS MAP_ANON
26 static void __attribute__((noinline)) set (struct Flags *);
27 static void set (struct Flags *fp)
33 static int __attribute__((noinline)) bar (int);
34 static int bar(int x) { return !(x==1); }
37 char *p = mmap (NULL, 131072, PROT_READ | PROT_WRITE,
38 MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
42 if (munmap (p + 65536, 65536) < 0)
44 fp = (struct Flags*)(p + 65536 - sizeof(struct Flags));