2006-04-06 16:56:54 +00:00
|
|
|
2006-04-06 Jakub Jelinek <jakub@redhat.com>
|
2006-03-28 13:28:54 +00:00
|
|
|
|
|
|
|
PR middle-end/20297
|
|
|
|
* gcc.dg/visibility-11.c: Moved to...
|
|
|
|
* gcc.target/i386/visibility-1.c: ... here. Only run on
|
|
|
|
32-bit linux and bsds.
|
|
|
|
|
|
|
|
--- gcc/testsuite/gcc.dg/visibility-11.c.jj 2006-03-24 17:07:15.000000000 +0100
|
|
|
|
+++ gcc/testsuite/gcc.dg/visibility-11.c 2006-03-28 14:59:27.000000000 +0200
|
|
|
|
@@ -1,24 +0,0 @@
|
|
|
|
-/* PR middle-end/20297 */
|
|
|
|
-/* The memcpy FUNCTION_DECL built in the middle-end for block moves got
|
|
|
|
- hidden visibility from the first push, so the call didn't use the PLT. */
|
|
|
|
-
|
|
|
|
-/* { dg-do compile { target i?86-*-* x86_64-*-* } } */
|
|
|
|
-/* { dg-require-visibility "" } */
|
2006-03-29 06:34:39 +00:00
|
|
|
-/* { dg-options "-Os -fpic" }
|
2006-03-28 13:28:54 +00:00
|
|
|
-/* { dg-final { scan-assembler "memcpy@PLT" } } */
|
|
|
|
-
|
|
|
|
-#pragma GCC visibility push(hidden)
|
|
|
|
-#pragma GCC visibility push(default)
|
|
|
|
-extern void* memcpy (void *, const void *, __SIZE_TYPE__);
|
|
|
|
-#pragma GCC visibility pop
|
|
|
|
-
|
2006-08-02 21:29:50 +00:00
|
|
|
-struct a { int a[1024]; };
|
2006-03-28 13:28:54 +00:00
|
|
|
-
|
|
|
|
-extern void *bar (struct a *, struct a *, int);
|
|
|
|
-
|
|
|
|
-void *
|
|
|
|
-foo (struct a *a, struct a *b, int c)
|
|
|
|
-{
|
|
|
|
- struct a cc = *b;
|
|
|
|
- return bar (a, &cc, 4 * c);
|
|
|
|
-}
|
|
|
|
--- gcc/testsuite/gcc.target/i386/visibility-1.c.jj 2006-03-28 14:30:17.000000000 +0200
|
|
|
|
+++ gcc/testsuite/gcc.target/i386/visibility-1.c 2006-03-28 14:58:48.000000000 +0200
|
2006-04-06 16:56:54 +00:00
|
|
|
@@ -0,0 +1,25 @@
|
2006-03-28 13:28:54 +00:00
|
|
|
+/* PR middle-end/20297 */
|
|
|
|
+/* The memcpy FUNCTION_DECL built in the middle-end for block moves got
|
|
|
|
+ hidden visibility from the first push, so the call didn't use the PLT. */
|
|
|
|
+
|
2006-04-06 16:56:54 +00:00
|
|
|
+/* { dg-do compile { target { { *-*-linux* *-*-*bsd* *-*-solaris2* *-*-elf* *-*-gnu* *-*-sysv[45]* } && ilp32 } } } */
|
|
|
|
+/* { dg-require-effective-target fpic } */
|
2006-03-28 13:28:54 +00:00
|
|
|
+/* { dg-require-visibility "" } */
|
|
|
|
+/* { dg-options "-Os -fpic" } */
|
|
|
|
+/* { dg-final { scan-assembler "memcpy@PLT" } } */
|
|
|
|
+
|
|
|
|
+#pragma GCC visibility push(hidden)
|
|
|
|
+#pragma GCC visibility push(default)
|
|
|
|
+extern void* memcpy (void *, const void *, __SIZE_TYPE__);
|
|
|
|
+#pragma GCC visibility pop
|
|
|
|
+
|
2006-08-02 21:29:50 +00:00
|
|
|
+struct a { int a[1024]; };
|
2006-03-28 13:28:54 +00:00
|
|
|
+
|
|
|
|
+extern void *bar (struct a *, struct a *, int);
|
|
|
|
+
|
|
|
|
+void *
|
|
|
|
+foo (struct a *a, struct a *b, int c)
|
|
|
|
+{
|
|
|
|
+ struct a cc = *b;
|
|
|
|
+ return bar (a, &cc, 4 * c);
|
|
|
|
+}
|