* gcc.dg/visibility-11.c: Enlarge test array to 1024 bytes to
[official-gcc.git] / gcc / testsuite / gcc.dg / visibility-11.c
blob41aeed878013d9ab8cadf1e84ca66868142a324f
1 /* PR middle-end/20297 */
2 /* The memcpy FUNCTION_DECL built in the middle-end for block moves got
3 hidden visibility from the first push, so the call didn't use the PLT. */
5 /* { dg-do compile { target i?86-*-* x86_64-*-* } } */
6 /* { dg-require-visibility "" } */
7 /* { dg-options "-Os -fpic" } */
8 /* { dg-final { scan-assembler "memcpy@PLT" } } */
10 #pragma GCC visibility push(hidden)
11 #pragma GCC visibility push(default)
12 extern void* memcpy (void *, const void *, __SIZE_TYPE__);
13 #pragma GCC visibility pop
15 struct a { int a[1024]; };
17 extern void *bar (struct a *, struct a *, int);
19 void *
20 foo (struct a *a, struct a *b, int c)
22 struct a cc = *b;
23 return bar (a, &cc, 4 * c);